我在Neovim中打开了几个文件,它们被加载到缓冲区中。
我想要能够在这些文件/缓冲区之间进行切换。我应该如何做到这一点?
我想要能够在这些文件/缓冲区之间进行切换。我应该如何做到这一点?
:ls
以打印缓冲区信息。你会看到类似以下的内容:
每行中的第一个数字是缓冲区编号。然后运行命令1 h "foo.txt" line 2 3 h "bar.txt" line 5
:buffer
,后跟缓冲区编号,例如:buffer 3
将打开bar.txt
。:Telescope buffers
来模糊选择要打开的缓冲区。==============================================================================
7. Argument and buffer list commands *buffer-list*
args list buffer list meaning ~
1. :[N]argument [N] 11. :[N]buffer [N] to arg/buf N
2. :[N]next [file ..] 12. :[N]bnext [N] to Nth next arg/buf
3. :[N]Next [N] 13. :[N]bNext [N] to Nth previous arg/buf
4. :[N]previous [N] 14. :[N]bprevious [N] to Nth previous arg/buf
5. :rewind / :first 15. :brewind / :bfirst to first arg/buf
6. :last 16. :blast to last arg/buf
7. :all 17. :ball edit all args/buffers
18. :unhide edit all loaded buffers
19. :[N]bmod [N] to Nth modified buf
. . . . .
. . . . .
. . . . .
从第1200行开始:
:[N]b[uffer][!] [+cmd] [N] *:b* *:bu* *:buf* *:buffer* *E86*
Edit buffer [N] from the buffer list. If [N] is not given,
the current buffer remains being edited. See |:buffer-!| for
[!]. This will also edit a buffer that is not in the buffer
list, without setting the 'buflisted' flag.
Also see |+cmd|.
. . . . .
. . . . .
. . . . .