Tuesday, July 17, 2012

a script for Perl users

Hi all,
here is my new .vimrc script for
- compiling my script
- IF there is an error, it opens a new tab, where it jumps to the line of the first error, and displays all the errors in a QuickFix buffer under the code (so, all my previous buffers are preserved and it doesn't "move them around") - ~Thank you Marc Jessome !
- ELSE (no errors) it executes the script
This is all fairly common, but i added a feature :
by pressing
;f
it sets $CURRENT_FILE_TO_RUN to the path of the current active file. Then, when i press
;r
from any other file or tab, it runs the "current file to run" (the one chosen with ;f).

EXAMPLE SCENARIO :
It's very useful to me when i'm trying to make a test pass. I press ;f on the test file. Then I open other files in other buffers and/or tabs to modify them and try to make the test pass, and when i want to run the test, i just have to press ;r.
Then if there are errors it jumps to them, i correct them, press ;r to re-run the test, until the test passes. Then, i press ;qq to close the two buffer of the tab opened by QuickFix.

Find the code here :

http://www.perlmonks.org/?node_id=982298

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: