2009-11-07 92 views

回答

35

找到答案由於上的用戶vim的使用郵件列表:

:let @a = system("ls -l")

爲了與光標下的文件作爲參數運行命令:

:let @a = system("ls -l " . shellescape(expand('<cfile>')))

+2

這是明智構建外殼命令時要使用的'shellescape()'函數。在這個例子中,':let @a = system(「ls -l」。shellescape('')))''。 – jamessan 2010-01-25 15:38:50

+1

好點,更新答案 – 2010-01-25 19:59:19

相關問題