in reply to Can't get vim to stop outdenting Perl comments, any ideas?

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

Replies are listed 'Best First'.
Re^2: Can't get vim to stop outdenting Perl comments, any ideas?
by Tommy (Chaplain) on Jan 15, 2010 at 10:23 UTC
    Roboticus, your .vimrc is very nice. I enjoyed the last line especially.
    --
    Tommy
      I haven't used the "last-position-jump" au command, but I do get it via view (session is horrid).