Monday, June 21, 2010

Re: questions about formatoptions on Ubuntu 10.04 vim

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: