On 25/06/09 21:50, Derk wrote:
[...]
> Perhaps, I will try to avoid using tabs for now and get used to whole
> concept of buffers.
Good idea. Tabs, after all, are relatively new in Vim (version 6 didn't
have them).
> Which leads to some more questions:
>
> 1) When working with multiple files (buffers) and switching away from
> modified buffer, we usually get E37. Unless one of the following is
> used:
> - :hide<command_to_switch_buffer>
> - :set hidden
> - :set bufhidden=hide
> - :set autowriteall
> Which one of these methods is preferred?
Some people prefer one, some people another. For instance, I use
'autowriteall' but IIUC, Dr. Chip prefers 'hidden'. But there are still
other possibilities:
- Before |abandon|ing a buffer, decide if you want to save it :w or
leave it unsaved :e! somethingelse.ext. Then if E37 comes up, it means
you forgot the buffer was modified, so it's still time to keep it or
leave it.
- Open a different file in a different window. When you're done with one
of them, close it with save :x or without :q! -- or :q is good enough if
it isn't modified, since then there's no need to save.
>
> 2) What tips do you have from own experience when working with
> multiple files? Perhaps some comments on work approach?
My approach (dating back to Vim 6) is what I call "Rolodex Vim":
:set noea winheight=99999 winminheight=0
which gives a "Rolodex look" to the split-windows open in parallel.
>
> Thanks!
Best regards,
Tony.
--
We must remember the First Amendment which protects any shrill jackass
no matter how self-seeking.
-- F. G. Withington
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---