1

Consider the function,

function! Test()
    :let aString = "I'm a string!"
    :!echo aString
endfunction

Now entering :call Test() pipes the following to BASH:

aString

Press ENTER or type command to continue

How can I :!echo the value of aString?

Thanks!

4

1 回答 1

1

好的,终于让它工作了:

function! Test() 
   :!clear
   :let aString = 'I\''m a string\!'
   :execute "!echo " . aString
endfunction
于 2013-10-26T15:50:20.203 回答