108190Re: autocmd & folder
- Oct 3, 2009On Sat, Oct 3, 2009 at 5:09 PM, Andy Wokula <anwoku@...> wrote:
>Sorry, I may not get the point. I check the help, but what should I
> Steven Woody schrieb:
>> I set a autocmd for *.c file, that is
>> au BufNewFile,BufRead *.c call s:cfold()
>> func! s:cfold()
>> set fdls=0
>> set fdm=syntax
>> Now, I am editing a foo.c file and folder set correctly and
>> automatically. Then I opened some folder in the buffer using 'za' or
>> something like that. And, then I switch to another buffer, and go
>> back. At this point, I hope what I've already opened folder keeps
>> open as that when I left, but it is not, all the folders closed just
>> like what they are when I firstly open the file.
>> Please give me a hint! Thanks.
> :h 'foldlevelstart'
> it is a global option, not to be set when detecting a filetype.
> see also
> :h ft-c-syntax
do? currently my folder settings are in ~/vimfiles/filetype.vim,
au BufNewFile,BufRead *.c call s:cfold()
au BufNewFile,BufRead *.cpp call s:cfold()
au BufNewFile,BufRead *.h call s:cfold()
Life is the only flaw in an otherwise perfect nonexistence
public key at http://subkeys.pgp.net:11371 (narkewoody@...)
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
- << Previous post in topic Next post in topic >>