Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by Tommy (Chaplain)
on Jan 15, 2010 at 11:22 UTC ( [id://817613]=note: print w/replies, xml ) Need Help??


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>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://817613]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found