3 ms·
Ah, my mistake. I meant registers, not buffers. :help registers As to your "I'm curious" question, I use both. Mostly arglist, and I resort to buffers when th
by nfnaaron 17y ago
Ah, my mistake. I meant registers, not buffers.
:help registers
As to your "I'm curious" question, I use both. Mostly arglist, and I resort to buffers when the arglist has gone squirrely (editing an additional file after starting with a number of files, e.g.).
For example, edit a small number of files (vi *).
:files will show you the list of files.
Repeating :n will take you through each file.
:e newfile to create a new file
:files will show you the list, with newfile at the end.
:rew to rewind the list
:n will get you to the last file on the original list, but not to newfile.
:bn will then get you to newfile.
- 10ren 17y agoI've had that problem, here's what I do: :arge will do the same as :e, but also add it to the arglist. You can prefix with a number to insert it at a particular position, especially :0arge and :99arge for first and last respectively. It only adds one at a time; several can be added with :arga (including recursive wildcards such as /*.java) :argd % will delete the current file (which % expands to) from the arglist. BTW: I dislike pressing : and <CR> so instead of :n, my .vimrc has: :map <C-n> <Esc>:n<CR> " next file, with control-n :map <C-p> <Esc>:N<CR> " prev file, with control-p
- 10ren 17y agoThe recursive wildcard didn't come out right. It should be: **/*.java And the mapping is: :map <C-n> <Esc>:n<CR> " next file, with control-n :map <C-p> <Esc>:N<CR> " prev file, with control-p