finally i found i only have to uncomment the following lines in my /
etc/vim/vimrc
"if has("autocmd")
" filetype plugin indent on
"endif
thanks for your tips anyway!
On Jun 22, 11:34 am, allstars <allstars....@gmail.com> wrote:
> thanks Gary
> now i try to narrow down my problem
>
> so far so filetype is just C
> and :set filetype? it returns c
>
> but i have checked /usr/share/vim/vim72/ftplugin/c.vim
> it has
> setlocal fo-=t fo+=croql
>
> i have also checked /usr/share/vim/vim72/filetype.vim
> au BufNewFile,BufRead *.c call s:FTlpc()
> in FTlpc i think it sets filetype to c correctly
>
> so far i think the problem is caused by not loading c.vim correctly
>
> do u have any idea?
>
> thanks
>
> On Jun 22, 1:41 am, Gary Johnson <garyj...@spocom.com> wrote:
>
>
>
> > On 2010-06-20, allstars wrote:
> > > hi
> > > i found in ubuntu 10.04 vim
> > > the comment leader wont be inserted automatically
> > > when i type <Enter>
>
> > > it seems i have to add an extra line
> > > set formatoptions=ro
> > > in my vim.rc
>
> > > am i correct about this?
> > > does anyone know why i need to add this line additionally?
> > > before 10.04 i didnt have to add this options
>
> > The default value of 'formatoptions' does not include either 'r' or
> > 'o', so it could be that Ubuntu used to set that option somehow and
> > now does not. The 'formatoptions' option is often set by filetype
> > plugins, so it could also be that filetype detection has changed
> > with this version of Ubuntu. Does filetype detection appear to work
> > the same as before? Having a problem with the comment leader
> > suggests that you editing source code. The 'filetype' setting
> > should correspond to the programming language you're using. Do you
> > get the expected result from
>
> > :set ft?
>
> > If you want to see where 'formatoptions' was last set, execute
>
> > :verbose set formatoptions?
>
> > HTH,
> > Gary
--
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
No comments:
Post a Comment