in reply to Re^2: Can't get vim to stop outdenting Perl comments, any ideas?
in thread Can't get vim to stop outdenting Perl comments, any ideas?

hmmmm.

I just found out that unless the cursor is in column 0, ":set cursorcolumn" completely negates ":autocmd BufWritePre * :%s/\s\+$//e" (the latter removing trailing whitespace from all lines on write)

So "cursorcolumn" hot a feature after all, even though we had a good run together for a day. :-(

--
Tommy
  • Comment on Re^3: [somewhat OT now] Can't get vim to stop outdenting Perl comments, any ideas?

Replies are listed 'Best First'.
Re^4: OT - Can't get vim to stop outdenting Perl comments, any ideas?
by parv (Parson) on Jan 16, 2010 at 16:40 UTC

    Use the macro ...

    " Strip end white space nnoremap S :%s/\s\+$//<CR> nnoremap s :s/\s\+$//<CR>