On 10/11/08 09:58, StarWing wrote:
> first bug, when you open Vim, you can set the first buffer's filetype
> in vim.
> e.g. set filetype to vim
> :setf vim (or setl filetype=vim, has the same issue)
>
> then, if you find, the file you want to create is not vim script, e.g.
> is C, then you change the filetype to c:
> :setf c
>
> okay, now you can see some settings of Vim:
> :setl inde indk
> will display:
> indentexpr=GetVimIndent()
> indentkeys=0{,0},:,0#,!^F,o,O,e,=end,=else,=cat,=fina,=END,0\
>
> still value in filetype vim, not in C.
>
> Solution: edit your $VIM/Vim<version>/indent/vim.vim, and add a line:
> let b:undo_indent = "setl inde< indk<"
>
> second bug:
> open Vim, and type :setf vim, now type :edit a.c then you can see some
> settings in Vim:
> :set: inde indk
>
> they are still value in filetype Vim.
>
> Solution: can't find.
> the second bug takes a whole day make me solute it....but i can't find
> the way.
Here are a few (untested) possibilities:
1)
:enew!
:e a.c
:setl inde? indk?
2)
:setl ft= syn= inde=
" 'indentkeys' isn't used when 'indentexpr' is empty
:e a.c
3) (only if there is already another non-help window)
:q!
:new a.c
:setl inde? indk?
4) (only if +windows compiled-in i.e. not in a "tiny" version)
:new a.c
:wincmd p
:q!
Best regards,
Tony.
--
Get Revenge! Live long enough to be a problem for your children!
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---