Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 ( #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?
Re^4: OT - Can't get vim to stop outdenting Perl comments, any ideas?
by parv (Priest) 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
Node Status?
node history
Node Type: note [id://817613]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2015-07-05 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls