I have a file -- my journal -- in which I've been trying to figure out how 
manual folding works, and how to get it to work for me in a way that's 
reasonably close to what I want to accomplish. 

What it would like to do would be to collapse each daily entry to a single line 
showing only the date and the day, which is the first line of the entry, and 
then to be able to reopen the file with the folds displayed as saved. With the 
following commands in my .vimrc I've been able to accomplish the latter

        autocmd BufWinLeave *.txt mkview
        autocmd BufWinEnter *.txt silent loadview

The problem is that when the file opens the folds are not as I defined them. 
The beginning and the end of folds are in different locations than the ones I 
used in defining the fold. E.g., one fold will pick up a line or two from a 
succeeding fold.

Originally I was defining folds on a selection established using V. Then I 
tried using just v and making sure that the end of the fold didn't go beyond 
the last character of the last line. That seemed to be working for several 
days. Today the problem reappeared. I went back to using V to define the area 
of the fold and that didn't work any better than the first time. I tried 
putting a blank line between the end of one fold and the beginning of another. 
That didn't work either. So, at present, after saving and reopening the file 
folds seem to occur at random locations unrelated to those I used in creating 
them. 

Any suggestions about what might be going on, or what it is I don't understand 
about folding, would be very welcome.

Thanks,
------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA  USA
eew...@bellsouth.net




-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to