John Cordes wrote:
On [2007-01-09 at 11:00am] Tim Chase <[EMAIL PROTECTED]> wrote:
I suspect you want something like

vnoremap *^V :!par

 This one worked the way I expected - thanks!
I'll throw in the obligatory caution that the "*" is an
actual Vim command (and thus useful...I employ it nearly
daily).  You might want use "<leader>" to map it to
something like

vnoremap <leader>= :!par<cr> vnoremap <leader>g=
:!par<space>

which is designed more for a purpose like this.

The second one should, after you highlight some lines, leave
you on a line that reads something like

        :'<,'>!par_

(where "_" is a space) where you can enter additional
parameters for par.

  I never encountered "<leader>" before; I have just read :h
on <Leader> but don't seem to be much wiser :(

 I've had trouble implemented your suggestion (I _would_ like
to preserve "*" for its intended vim usage). After putting
those two lines into .vimrc, and selecting some lines
(linewise select), what do I do to 'run' the command? [I tried
g and ,g -- didn't really know what else to do] Sorry to be so
clueless...

 Thanks,
 John Cordes


First, run (in normal mode):

:let mapleader

That command will reveal the key you currently have configured to be your <Leader>. Assuming the output of the above command is:

mapleader             ,

You should then be able to execute the first command by going:

v
[moving around for selection]
,=

For the second command, replace ",=" above with ",g=".

The <Leader> defaults to \ on some installations, I believe.

Regards

--
Albie Janse van Rensburg (neonpill)

Registered Linux User 438873 | <http://counter.li.org>

Reply via email to