Vertical spilts and folding in gvim


Vertical spilts and folding in gvim



I have problems with automated splits and folding. In my ~/.gvimrc file, at the very end, I have the command vsplit, so that when I'm using gvim as opposed to vim, it opens with two panes. The problem occurs when I open a file that would normally be folded via the command line, as in gvim example.cpp. This opens the example.cpp file in two panes; however, the first pane is folded while the second is not. It's a minor annoyance, but I wondered if anyone had a suggestion to get the second (or all) buffers to be folded when the window first appears.

If it makes a difference, I use set foldmethod=indent in my ~/.vimrc file, and my version is 7.1.




How do I do a :g with a concatenating of submatches in Vim?

1:



Can vim monitor realtime changes to a file
this is very strange, it also happens here, I'm guessing there must be a bug because other settings are valid on the second pane, except for the 'foldmethod' setting..
vim mapping :w with a shell command
Anyway, I found an easy workaround.


Is it possible to display Indentation guides in Vim?
I have this at the end of my .vimrc and what you are looking for now works on my vim:.
Delay before 'O' opens a new line?
set foldmethod=indent set sw=2 set tw=2  vsplit +edit 
Now when I open a file, the window is split in two and both are folded correctly..
Map key to toggle between normal mode and insert mode in Vim
The workaround is executing the ex command :edit on the second pane so that the missing settings (although it seems that only 'foldmethod' is missing) are reloaded.


Does omnicppcomplete support typedef syntax
That's what the +edit after the vsplit does..
How do I get the VIM matchit plugin working with ColdFusion and HTML?
Hope this resolves your problem..



85 out of 100 based on 55 user ratings 1255 reviews