vim - 如何在 vim 中创建一个新的单独的缓冲区列表?

标签 vim

有些时候我想打开几个文件作为引用,但不希望它们弄乱我当前的缓冲区列表。我试过:new, sp, vs, and :tabnew, 但是, 新打开的文件总是保存在我当前的缓冲区列表中。有没有办法创建一个全新的缓冲区列表来单独保存这些打开的文件?因此,只要我不再需要查看这些文件,我就可以使用 1,100bd 完全关闭这些文件。我一直在谷歌上搜索它,但仍然没有运气。

最佳答案

你可以试试这个插件:vim-ctrlspace .

来自上述插件的 README.md:

The answer are tabs – a secret weapon of Vim-CtrlSpace. Each tab holds a separate list of buffers. And this is something very different when compared to plain Vim. Tabs powered by the plugin can be seen as piles of documents on the desk.

With tabs you can, for example:

  • group related buffers
  • extract to other tabs
  • name them accordingly
  • move or copy them

Tabs usage in Vim-CtrlSpace is quite more extensive than in Vim. This is because they serve mainly as independent buffer lists, so you are likely to have plenty of them. Tabs can be accessed and managed within Tab List.

All your buffers, tabs, and tab layouts can be persisted as a workspace. It's like taking a picture of your desk with an instant camera. You can save multiple workspaces per project with Workspace List.

关于vim - 如何在 vim 中创建一个新的单独的缓冲区列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32882819/

相关文章:

c++ - vim - 某些折叠未保存

vim - 如何关闭一个窗口并指定剩余窗口的扩展?

vim - 如何在 Vim 中移除屏幕顶部的白条?

Vim 不按空格缩进

linux - 在 Linux 上,我可以让按键在点击时表现不同吗?

vim - 如何从 Vim 递归打印当前工作目录下的所有文件?

vim - 如何在 Vim 脚本中执行外部命令?

linux - 在 shell 脚本中通过 vi 编辑器编辑文件显示错误

ubuntu - 当我处于插入模式时,Vim 没有 `--INSERT--`?

javascript - 为什么某些字符出现在 JS console.log 中的 'broken'?