On 2012-02-15, Andrew Fabbro wrote:
> I'm trying to turn off vim's auto-commenting feature.  If possible,
> irrevocably, permanently, for all time, and for all mankind.
> 
> If I type 'vi blah.pl', a shebang line, and then return, it continues
> auto-commenting:
> 
> #!/usr/bin/perl
> #
> #
> 
> I'm sure someone finds this feature useful, but I do not.  I'd like to
> get rid of this auto-commenting.
> 
> My CentOS 6.1 /etc/vimrc ends with:
> 
> syntax off
> set nohlsearch
> set t_Co=0
> set fo-=r
> 
> That last line is supposed to turn off auto-commenting...and oddly,
> this does turn it off for root, but not for any other users.  /etc/
> vimrc is mode 644.

I believe the problem is in $VIMRUNTIME/ftplugin/perl.vim, line 15:

    setlocal formatoptions+=crq

That line is executed whenever you open or create a Perl file.  The
solution is to put

    setlocal fo-=r

in the (new) file ~/.vim/after/ftplugin/perl.vim.

> Here is my :version - I'm using vim in an ssh session, not a GUI:
> 
> 
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jun 25 2011 09:43:11)
> Included patches: 1-411

The $VIMRUNTIME/ftplugin/perl.vim file I looked at was the version
last changed on 2009-08-14, so it isn't the version you have, but it
probably still has that line.

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

Reply via email to