Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Which text editor

by biosysadmin (Deacon)
on Mar 16, 2004 at 08:50 UTC ( [id://336953]=note: print w/replies, xml ) Need Help??


in reply to Which text editor

No matter what operating system I'm on, I'm a big fan of vim. For some reason a lot of my Perl people seem to like vi and it's variants. In addition to myself and a few friends, here's a quote from a Damian Conway interview that I read a while back:

"I often find myself developing right in my editor. In fact, I have a key permanently bound to ":!perl -w %" under vi for just that reason."

After reading the interview, I used his idea and mapped Ctrl-P to ":!perl -w %" in my .vimrc file. I also saved the quote. :D

Replies are listed 'Best First'.
Re: Which text editor
by Abigail-II (Bishop) on Mar 16, 2004 at 09:47 UTC
    $ tail -1 ~/.vilerc source /home/abigail/.vile.mappings $ cat ~/.vile.mappings 1 store-macro goto-beginning-of-file append-string "#!/usr/bin/perl\n\n" append-string "use strict;\n"; append-string "use warnings;\n"; set-mode "perlmode" position-window b open-line-below-and-append-chars ~endm 2 store-macro save-file shell-command &cat "perl " $cfilname ~endm 3 store-macro save-file shell-command &cat "perl -c " $cfilname ~endm 4 store-macro save-file shell-command "make" ~endm bind-key execute-macro-1 ^A-p bind-key execute-macro-2 ^A-r bind-key execute-macro-3 ^A-c bind-key execute-macro-4 ^A-m
    Abigail
Re: Re: Which text editor
by tinita (Parson) on Mar 16, 2004 at 14:34 UTC
    oh there are so much more useful things...
    map ß O#!/usr/bin/perl -w<CR>use strict;<CR> map Ü :!perl -c % map ü :!perl % map ä :!perldoc -f " debugging imap debug warn "\n";<ESC>hhhi<C-R>=expand("%:t:r")<CR> " find perl variables and copy them map <F10> ?\(\$\\|@\\|%\)<CR>v/\><CR>hy<ESC>h " debugging imap ddumper <ESC>gglouse Data::Dumper; $Data::Dumper::Indent = 1; $Da +ta::Dumper::Sortkeys = 1;<ESC>``
Re^2: Which text editor
by Aristotle (Chancellor) on Mar 16, 2004 at 14:41 UTC
    Also:
    set makeprg=perl -Mstrict -wc % set errorformat=%m at %f line %l.

    Now you can just type :make to check the script; Vim's quickfix (:help quickfix) will then pick up perl's error messages. Besides the handy (and very key-bindable :) ) commands to navigate error locations, you can also do a :copen to open a window on a special buffer that lets you visually navigate errors and move to their locations.

    If you edit stuff other than Perl code with Vim, you should probably place these somewhere that only sets them for Perl code files. :help ftplugin-override

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-25 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found