Friday, December 5, 2014

Definition of visual mode map

Hi,
I want to define a visual mode mapping f.
My intention is first,press "v" to visually select words, and press key "f", the selected would be copied into register @@, and my vaa.sh would be called, with 2 parameters, one is current file name, two is the content from @@ register.
Bellowing is my code.
xnoremap f :exec '!sh ~/bashrc/vaa.sh ' . expand("%:p") . @@<CR>
But, I got following error:
"E481: No range allowed"

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: