Something like this is close to perfect:

:tabnew | read !pandoc #

But, just as '%' runs into trouble with escapes, so does '#'. So this is better:

:tabnew | exe "read !pandoc " . shellescape(@#, 1)

And if you want to map it, you'll need to escape the '|', so:

nmap <leader>h :tabnew \| exe "read !pandoc " . shellescape{@#, 1)

(see http://stackoverflow.com/a/8292838/1342986 and the surrounding comments.)

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to