On Tue, Oct 12, 2010 at 10:33:14AM -0700, lirenlin wrote:
> hello everyone,
> i want to pass some user input variable to some external command, for
> example,
> map <C-F2> <ESC>:let name=input("name: ")\| !gcc -o name % <CR>
see the help for the :execute command. You have to create a string with
the command you want, and then pass it to :exe
what you want should be doable with the following (untested):
map <C-F2> <ESC>:let name=input("name: ")\| execute "!gcc -o " . name . ' ' .
expand('%') <CR>
--
Javier Rojas
GPG Key ID: 0x24E00D68
signature.asc
Description: Digital signature
