Skip to content

Commit

Permalink
refactor: replace BufOnly plugin with two commands
Browse files Browse the repository at this point in the history
  • Loading branch information
fidgetingbits committed Jul 19, 2024
1 parent 49cb9f2 commit dd11749
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
"hands-free-vim/talon.nvim",
"vim-scripts/BufOnly.vim",
})

local repo_root = os.getenv("CURSORLESS_REPO_ROOT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ async function openNewTestEditor(
await client.command(":enew");

if (!openBeside) {
// close all the other buffers
// @see: https://stackoverflow.com/questions/4545275/vim-close-all-buffers-but-this-one
await client.command(":BufOnly!");
// close all the other buffers (<C-^> is needed because e# fails on unnamed buffers)
await client.command("execute '%bd!' | execute 'normal! \\<C-^>'");
}

// standardise newlines so we can easily split the lines
Expand Down
2 changes: 0 additions & 2 deletions packages/test-harness/src/config/init.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
local temp_dir = os.getenv("TEMP_DIR")
local repo_root = os.getenv("CURSORLESS_REPO_ROOT")

vim.cmd("source " .. temp_dir .. "/BufOnly.vim/plugin/BufOnly.vim")

vim.opt.runtimepath:append(temp_dir .. "/talon.nvim")
vim.opt.runtimepath:append(repo_root .. "/dist/cursorless.nvim")

Expand Down
1 change: 0 additions & 1 deletion scripts/install-neovim-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ set -euo pipefail

npm install -g [email protected]

git clone https://github.com/vim-scripts/BufOnly.vim ${TEMP_DIR}/BufOnly.vim
git clone https://github.com/hands-free-vim/talon.nvim ${TEMP_DIR}/talon.nvim

0 comments on commit dd11749

Please sign in to comment.