Marc Weber wrote:
:Robert

See :h quickfix ;)
Brief: :compiler perl :set makeprg=perl :make test.pl)
If you want to add options to perl use set makeprg=perl\ --option\ blah
(escape whitespaces)
The quickfix cycle might remove some output.. depending on errorformat.

I was waiting for this question because :!perl foo doesn't do what you
want :)

See also :h compiler

If you don't want to look at scrolling lines try my runinbackground
script.. (http://www.vim.org/scripts/script.php?script_id=1582)

I would also suggest to have some quick glances at :h  topics basic
editing, advanced editing... Much to read.. or hang around in #vim on
irc.freenode.net. You can learn much there...
You don't have to read everything but it should give you an idea of what
is there .. ;)

To took me over a year to learn many features of vim and then think
about "how can I really fast open the files I need ... and so on"

Just ask again we'll point to corresponding documentation.

Marc


Thanks for the info. For some background I used to use the perl-support plugin but it isn't working on OSX "Tiger" so I thought I would just create a simple perl-utils one that I could add quick functions to and then assign accelerators (i.e. \rr runs it, \rc checks it, \rx criticizes etc.).

I have this:

function! PerlRun(...)
    execute "!perl " . expand("%")
endfunction

function! PerlCheck(...)
    execute "!perl -cw " . expand("%")
endfunction

" These work
command! -nargs=* PerlRun call PerlRun()
command! -nargs=* PerlCheck call PerlCheck()

" These aren't working
map <buffer> <silent> <Leader>rr <Esc>:call PerlRun()<CR>
imap <buffer> <silent> <Leader>rr <Esc>:call PerlRun()<CR>
map <buffer> <silent> <Leader>rc <Esc>:call PerlCheck()<CR>
imap <buffer> <silent> <Leader>rc <Esc>:call PerlCheck()<CR>

I was hoping it would "just a little more" to get clickable errors.

:Robert

Reply via email to