Monday, July 7, 2014

Re: Run External Command with specific buffer

Hi,

Mohammod nazmuSakiB wrote:
> Lets say I split all my buffer with "sba" command
> Then I navigate to a window , lets say 2nd buffer.
> Now I want to run an external command with another buffer as argument
> For example
> :!g++ "Here I want to pass first buffer name as argument"
> how to do so?
>

you can use "#" in combination with a number to get the name of specific
file, e.g., in your case use

:!g++ #1

to compile the first file.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

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