Tim Ng wrote:
> When i'm editing a line in a ml file, VIM seems to keep
> "autoformatting" the line:
>
> When i'm near the end of the line, for example, and I i keep editing,
> vim automatically splits the line into two (or three), indents it
> (incorrectly), etc. Is it possible to just edit one line without
> having it automatically make two or three lines out of it?
You probably have "t" in the 'formatoptions' variable. Use
:set fo?
to see the contents of 'formatoptions'.
To remove the "t" setting from 'formatoptions', use
:set fo-=t
To find out where 'formatoptions' has been set, use
:verbose set fo
You might want to add a filetype rule for .eml files to remove the "t"
option. To do this, in your ~/.vim/ftdetect/eml.vim (create dir/file if
it doesn't exist already), add the following lines (unless you already
have them):
au BufRead,BufNewFile *.eml setfiletype eml
au BufRead,BufNewFile * if &ft == 'eml' | set fo-=t | endif
The filetype setting "schemes" are fully explained in :help filetype.txt
- you might have a different setup whereby the abovementioned tip would
not apply.
Further reference:
:help formatoptions
:help fo-table
:help filetype-detect
Regards
--
[ Albie Janse van Rensburg ~ http://morph.telspace.co.za ]
Fortune finishes the great quotations, #12
Those who can, do. Those who can't, write the instructions.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---