[prev in list] [next in list] [prev in thread] [next in thread]
List: vim
Subject: Re: repost: automatically opening folds
From: Emmanuel Touzery <emmanuel.touzery () wanadoo ! fr>
Date: 2002-12-29 20:35:22
[Download RAW message or body]
On Sunday 29 December 2002 14:52, Bram Moolenaar wrote:
> Emmanuel Touzery wrote:
> > Since nobody answered this question, i'm asking again just in case.
> > I wanted folds to open automatically under the cursor when automatically
> > positionning the cursor on the position it was the last time i opened
> > that file. Dan Sharp and Antoine J. Mechelynck suggested looking at
> > 'foldopen'. I found that foldopen=all fixed the problem but it's a bit
> > too much for my taste. No other foldopen setting could fix the problem.
> > Maybe a new foldopen value should be added, unless I missed something?
>
> The 'foldopen' option only applies to commands that you type. Adding
> "mark" whould work when typing the '" command. If it's used during
> startup or with a mapping, you need to add the "zv" command there.
em but it's a bit
> > too much for my taste. No other foldopen setting co
yes, it's used during startup.
i tried changing the code in my .vimrc, copied from
/usr/local/share/vim/vim60/vimrc_example.vim to:
if has("autocmd")
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ exe "normal zv" |
\ endif
endif " has("autocmd")
(the \ exe "normal zv" | is the added line from the model).
what did i miss?
thanks for the help,
emmanuel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic