How do you run your scripts with vim (or emacs)?by baurel (Sexton)
|on Sep 14, 2008 at 12:46 UTC||Need Help??|
baurel has asked for the
wisdom of the Perl Monks concerning the following question:
I work mostly in vim. I'm not a very advanced vim user, though. So even vim gives me some headeache from time to time I still prefere it to the various editors and IDEs out there, because I like the command mode and because it's available and preinstalled on most platforms.
Although I've tried different things I'm still *very* unsatisfied with the implementation of the following basic workflow:
1. Edit a perl script in the editor
2. Press one key (eg. F5) to save and run the script
3. Print the output to a window below the editor window
4. Possibility to easily switch to the output window and scroll through the messages
5. Possibility to easily switch back to the editor window
Currently I work with a GNU screen/vim combo.
But there is always a lot of typing involved. For example to accomplish step 2. in the workflow above:
- ESC, :w (to save the script in vim in term1)
- CTRL-Z, tab (to switch to term2)
- type "./myscript.pl" (to run the script in term2)
This can't be it, I think it's far from ideal...
How do you run your scripts with vim? Or is emacs better suited for this?