Re: Vim for Perl developers by jacques (Priest) on May 13, 2003 at 15:56 UTC |
That's great work. But I am wondering if you could help answer a vim question I have. How would I specify a Perl script to execute with the interpreter? I am not talking about doing: <ESC>:! perl script.pl
What I would like to do is access the Perl interpreter from within vim. With ruby, one can use the rubyfile command. From vim's command mode, you could type :rubyfile example.rb to execute a ruby script. But how would you do this with Perl?
| [reply] [d/l] [select] |
|
That's great work.
Thanks :)
What I would like to do is access the Perl interpreter from within vim. With ruby, one can use the rubyfile command. From vim's command mode, you could type :rubyfile example.rb to execute a ruby script. But how would you do this with Perl?
I've got rather limited experience in this area, but maybe :help perldo will help you. I guess you'll need to have Vim compiled with perl support.
Leonid Mamtchenkov aka TVSET
| [reply] [d/l] |
|
Thanks, but perldo is a range command, so that won't work.
| [reply] |
|
|
|
I wonder if you would find this useful. In .vimrc put:
au BufWritePost *.pl,*.pm !perl -c %
Every time you save a .pl or .pm file, it executes perl -c and shows you the output.
~~
naChoZ
| [reply] [d/l] |
|
| [reply] [d/l] |
Re: Vim for Perl developers by djw (Vicar) on May 13, 2003 at 16:55 UTC |
What a great article, the best I've seen for configuring Vim for Perl. ++
djw | [reply] |
Re: Vim for Perl developers by gmax (Abbot) on May 13, 2003 at 16:56 UTC |
| [reply] |
|
| [reply] |
Re: Vim for Perl developers by Ovid (Archbishop) on May 13, 2003 at 17:36 UTC |
| [reply] |
Re: Vim for Perl developers by MrYoya (Monk) on May 13, 2003 at 18:59 UTC |
Great article, it has all kinds of little things I didn't know about. Thanks! | [reply] |
Re: Vim for Perl developers by jplindstrom (Monsignor) on May 13, 2003 at 21:24 UTC |
While we're on the subject, I wonder if you gVim users on Windows out there would like to try out the gVim support in Perl Oasis (it is a Perl IDE, kind of. It is a code navigator; a POD/source/class/project browser). Reading the article, it sounds somewhat similar to the "Tag explorer".
I implemented gVim support some time ago but thought I would support PFE completely before releasing it (the DDE support in Editor::Win32::PFE is somewhat shaky, so I'm not sure it'll work at all times). Then I got interested in other things :)
The gVim stuff is done though, but since I don't use the editor myself I'm kind of curious how good it fits the way people actually use gVim. So, if you're interested in beta-testing the gVim stuff, I would be very happy to get your feedback.
- Download the beta, unzip
- Start gVim
- Start Perl Oasis
- In File | Preferences | Editor, chose gVim
- Check out Top Headings while you're in the preferences and go back there after trying it out
- Voila!
/J
| [reply] |
Re: Vim for Perl developers by parv (Curate) on May 13, 2003 at 23:09 UTC |
I could not focus on the article as the screenshots are/were
in rather small and fuzzy font w/ low constrast in background
and foreground. | [reply] |
|
I could not focus on the article as the screenshots are/were in rather small and fuzzy font w/ low constrast in background and foreground.
Sorry, man. Originally, screenshots were about twice as big, but most of the people who did the preview of the draft suggested that they were too large.
Anyway, I hope the article helped you to configure your Vim to behave in the similar way, so that you can enjoy bigger screens on your personal monitor now. :)
And thanks for feedback...
Leonid Mamtchenkov aka TVSET
| [reply] |
Re: Vim for Perl developers by lestrrat (Deacon) on May 13, 2003 at 23:10 UTC |
| [reply] |
Re: Vim for Perl developers by parv (Curate) on May 14, 2003 at 00:37 UTC |
| [reply] [d/l] [select] |
Re: Vim for Perl developers by revdiablo (Prior) on May 14, 2003 at 04:35 UTC |
| [reply] [d/l] [select] |
Re: Vim for Perl developers by nefertari (Chaplain) on May 14, 2003 at 07:47 UTC |
| [reply] |
|
| [reply] |
Re: Vim for Perl developers by cciulla (Pilgrim) on May 14, 2003 at 11:20 UTC |
++TVSET.
Regarding some of the screenshots -- you may want to consider using ":runtime! syntax/2html.vim". Granted, it would not show the results of ":split" or ":vsplit", and produces some rather... ugly html, but would address some of the issues that other monks have raised.
C²
| [reply] |
|
| [reply] |
Re: Vim for Perl developers by weierophinney (Pilgrim) on May 14, 2003 at 17:15 UTC |
Excellent article! While I do or have tried many of the things you suggest, there were a few nuggets in there I'm looking forward to trying out (perldoc plugin, perl syntax compiler).
Another plugin to look into is called Project , and allows you to define a hierarchy of files used in a project, macros specific to that project (including alternate highlighting schemes, etc.), and performing actions on groups of files. I've found it invaluable in a variety of coding projects. | [reply] |
Re: Vim for Perl developers by YAFZ (Pilgrim) on May 15, 2003 at 11:18 UTC |
First of all thanks a lot for sharing such a lovely article with the fellow monks.
What I liked most was "Embperl syntax highlighting", "Perl syntax compiler" and of course "Perldoc integration" (this one is really powerful and timesaving).
I'm sure many VIMmers already knew majority of the tricks presented here, it is important that you put them in a concise and compact article that I´ll share with my friends.
Proposition: For any feature found in any text editor (excluding VIM) - be that a 1500$ closed source charismatic one with many menus or an open source alternative with a GUI and a lot of buzzwords - the same is already embedded in VIM, can be downloaded as a script from vim.org or programmed within VIM.
Proof: Daily use of VIM ;-) | [reply] |
(z) Re: Vim for Perl developers by zigdon (Chaplain) on May 15, 2003 at 18:12 UTC |
Interesting article. Thanks for the pointer for tags - very cool.
The only thing there I didn't see is the ability to switch to files and modules easily:
set path+=/path/to/modules/**
set suffixesadd=.pm,.pl
set includeexpr=substitute(v:fname,'TMPLDIR','/path/to/tmpl/dir','')
These lines give me the ability to move the cursor over 'DB' in a line like:
use Peeron::DB;
hit 'gf', and zoom - I'm editing the DB.pm file in /path/to/modules/Peeron/. Also allows to move the cursor over 'example.tmpl' in:
my $tmpl = HTML::Template->New(Filename => "$Peeron::Conf::TMPLDIR/exa
+mple.tmpl");
hit 'gf', and get to /path/to/tmpl/dir/example.tmpl
-- zigdon
| [reply] [d/l] [select] |
Re: Vim for Perl developers by bigj (Beadle) on May 15, 2003 at 22:57 UTC |
Great article!
When I used the suggestions, I found 2 things annoying me. I'm not sure whether other Perl programmers would also, but I suppose.
I program with line numbering switched on,
but the file/buffer browser has than also the line numbering. That's quite ugly, as I don't need it at these views and it is a simple waste of space.
I fixed it with setting an autocmd that do set number only with specific files (like *.p?).
The Perl syntax compiler is of course very useful, but it seems to be written in 2001 where perhaps an older Perl version was outsight. However, the compile command always starts with perl -Wc, so that in all part of the codes warnings are shown. Even in the { no warnings; ... } subparts. That's odd, as I suppose, nowadays with Perl 5.8, using use strict; use warnings; is the standard.
I fixed it with a simple change in perl.vim,
replacing setlocal makeprg=perl\ -Wc\ % with
setlocal makeprg=perl\ -c\ %.
Greetings,
Janek | [reply] [d/l] [select] |
Awesome! One tweak on Perldoc though... by cebrown (Pilgrim) on May 15, 2003 at 23:20 UTC |
| [reply] [d/l] |
Re: Vim for Perl developers by Crian (Hermit) on Oct 14, 2004 at 13:46 UTC |
| [reply] [d/l] [select] |
|
Thanks for the feedback Crian. I have corrected both points you've mentioned.
| [reply] |
Re: Vim for Perl developers by ddn123456 (Pilgrim) on Oct 07, 2008 at 18:18 UTC |
| [reply] |