Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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?

Replies are listed 'Best First'.
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?
[marto]: trench humour folks, feeling rough.
[marto]: there is never a night when they sleep all the way through, but last night was something else
[marto]: gave in at 3:45 ish and let Charlie watch videos about spitfires, the battle of Britain. He's plane crazy
[1nickt]: marto soothing!
[marto]: Hiromi makes an appearance, let's hope Jools doesn't ruin it by joining in on the old Joanna
[1nickt]: karlgoethebier What is the issue with the semic-colon after the ellipsis? It's documented as proper syntax ...;
[karlgoethebier]: Crazy? What should i say? Son just started his third studies. Next week i have a session with my therapist ;-)
[marto]: and just as I type that, the boys begin playing the piano, the price I pay for using cockney slang :P
[holli]: how did the interview go, marto?

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-11-18 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?