Tommy:

Yeah, I can see how that would suck. I just tried the steps you mentioned on my machine, and comment lines don't outdent for me. So just in case it helps, here's my .vimrc file:

" .vimrc " 20100104 set cursorline for better visibility " 20080618 Trying to fix fileencoding so we can write UNICODE as LATIN " 20080617 reopen file at same position as last seen " 20080416 Chg/set backspace, display, fillchars, color scheme " 20050208 original version set fileencodings=ucs-bom,utf-8,default,latin1 "set tabstop=4 set nowrap set ruler " show cursor position always set showcmd " display incomplete commands set incsearch " incremental searching set modeline " Allow setting values in file "set background=dark " Make color scheme visible colorscheme roboticus set cursorcolumn " Make cursor column obvious for icicles, etc. if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif "if has("autocmd") " " highlight the active cursor line " set cursorline " hi CursorLine ctermbg=1 "endif if has("autocmd") " highlight the active cursor line set cursorline "hi CursorLine ctermbg=7 hi CursorLine ctermbg=4 " Recognize file types and use appropriate indenting filetype plugin indent on augroup vimrcEx autocmd FileType text setlocal textwidth=78 augroup END else " set autoindent endif " has("autocmd") " 20080416 MCM New additions set backspace=eol,indent,start " Make backspacing a little easier set display=lastline " Show partial lines when in wrap mode " Doesn't work? set fillchars=stl:=,stlnc:= " Autowrap text with comment leader as appropriate, automatically exte +nd com " t - autoformat text, c - autoformat comments, r - automatically cont +inue " comment on next line, o - automatically continue column on o/O comma +nd, q - " allow comment formatting with gq command, l - don't break long lines + if they " started long, b - autowrap only if you hit a blank before the wrap m +argin. set formatoptions=tcroqlb " 20080617 MCM Reopen file at last-edited position (see :help " last-position-jump) au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe +"normal g'\"" | endif

...roboticus


In reply to Re: Can't get vim to stop outdenting Perl comments, any ideas? by roboticus
in thread Can't get vim to stop outdenting Perl comments, any ideas? by Tommy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.