I think you're confusing something there. A buffer is something like an open file. When you switch to the next file in the argument list using :n you close the current buffer and open the next one, so the changes must either be saved or discarded at this point.
Up vote 2 down vote favorite share g+ share fb share tw.
I'm losing all previous buffers when by mistake I'm trying to switch behind the last buffer n:. If for example I open couple of files in editor :ls 1 # "/etc/moduli" line 1 2 %a "/etc/motd" line 1 :n E163: There is only one file to edit :p E163: There is only one file to edit now I can navigate between tabs just using :b number Please advice how to fix this behavior. How can I prevent buffers from closing in this case?
Vim vi link|improve this question edited Feb 19 '09 at 15:44 asked Feb 19 '09 at 12:32Oleksandr Bolotov1,93111835 94% accept rate.
I think you're confusing something there. A buffer is something like an open file. When you switch to the next file in the argument list using :n you close the current buffer and open the next one, so the changes must either be saved or discarded at this point.
Additionally the default behaviour of vim is to display an error message if you try to go beyond the last file in your argument list, so losing anything is not very easy in vim. Maybe describing your actions (pressed keys) could help here, if this does not answer your question. Edit Ok, now I know what the problem is: There is a difference between a buffer and the list of files to edit that you supply when starting vim.
If you start vim with vim a. Txt b. Txt there are 2 files to edit.
This does not mean, there are multiple buffers. You can navigate using :n and :p (meaning n(ext) file and p(revious) file). If you have the global flag :hidden set, this means that every buffer you close will become a hidden buffer.
The file is still being edited, but it is not shown in any window. This value is possibly set upon startup of vim in your system. Try adding :se nohidden to your .
Vimrc and try the following: :help buffer-hidden /edit.
N and :p doesn't switch between buffers :) try :bufnext and :bufprev maybe you'll like: nmap k :bnext:redraw nmap j :bprevious:redraw nmap d :bd nnoremap be :buffers:buffer Press ,j for the previous buffer, ,k for the next buffer, ,d to close the current buffer and ,b to list your buffers and select one with number keys.
Bn will display the next file in your buffer (in your case "/etc/moduli") :bp will display the previous file in your buffer (also "/etc/moduli" because it does a permutation) One thing that you'll notice is that the file you're editing is marked with %a whereas # means it's the last file you displayed. Hope it helps you.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.