djqp9g
Last Updated: June 24, 2016
·
24
· ryrych
Wojtek medium

Calling external command via Vim system command

vim

Suppose that you want to call external git commit command and pass commit message from Vim register. If register contains ‘hello world’ string, system will treat each word as a separate command. To fix that issue I dug into Vim docs and found that this works as expected:

echo system("git ci ". '-m ' . string(@t))
Say Thanks
Respond
Filed Under