I have the following in my ~/.vimrc file:
set foldcolumn=2
function MyFoldText()
return getline(v:foldstart) . ' ...'
endfunction
setlocal foldmethod=expr
setlocal
foldexpr=(getline(v:lnum)=~'^$')?-1:((indent(v:lnum)<indent(v:lnum+1))?('>'.indent(v:lnum+1)):indent(v:lnum))
set foldtext=MyFoldText()
set fillchars=fold:\ "(there's a space after that \)
highlight Folded ctermfg=DarkGreen ctermbg=Black
Whenever, I open a new file which has blocks of indented text, all
indented text appear folded initially. This is an inconvenience for me
as I have to type zR to unfold and read the text. I want that when I
open a file, nothing should be folded. I want to choose what I want to
fold after reading the text. How can I achieve it?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---