Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: .vimrc for perl programmers

by dragonchild (Archbishop)
on Mar 30, 2006 at 16:20 UTC ( [id://540199]=note: print w/replies, xml ) Need Help??


in reply to .vimrc for perl programmers

Something to note - Mac users, particularly powerbook users, won't be able to use all the F-keys. I personally use comma-commands. So, for example, I use:
nmap ,c :!perl -wc %^M nmap ,t :!prove -wlv t/*.t^M nmap ,ac :'a,.s/^/#/gi^M:nohl^M nmap ,auc :'a,.s/^#//gi^M:nohl^M
and so on. The cool thing is that you can have the comma-command use as many characters as possible and reuse commands. So, I have ",s" do one thing and ",sf" do another. If you don't hit the 'f' in a second, vim will execute ",s".

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: .vimrc for perl programmers
by cees (Curate) on Mar 30, 2006 at 22:07 UTC

    Instead of just having those mappings for !perl and !prove, there are actual compiler plugins for both.

    The main benefit of this is that vim will automatically parse any warnings and errors and jump to the correct location in the file. You can then jump to the next or previous error/warning with :cn and :cp or just list all the errors with :cl.

Re^2: .vimrc for perl programmers
by unobe (Scribe) on Apr 04, 2006 at 08:56 UTC
    Thanks for sharing those mappings :-) Maybe this is only applicable to Macs other than PBs, but I am able to map my F-keys. I had to type ^V and then the F-key to get it to map, but it works great. Part of my .vimrc now looks like this:
    map ^[OQ :w!^M:! perl %^M
    which just saves and runs the current file with perl. I'm using a MacMini with a USB keyboard, so I know it's probably not exactly the same. Have you tried pressing ^V before the F-key to map something, or am I just really fortunate?
Re^2: .vimrc for perl programmers
by Anonymous Monk on Mar 04, 2013 at 22:31 UTC
    For mac users with this problem, have a look at Palua, it allows you to disable the F keys selectively based on the app ... handy for mac terminals

Log In?
Username:
Password:

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

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

    No recent polls found