How to use the current line as a parameter to execute a shell command in vim?
给我你的怀抱
给我你的怀抱 2017-05-16 16:40:40
0
2
622
1 hello
2 world
3 me

For example, I am currently on the second line, how do I execute !echo world?

给我你的怀抱
给我你的怀抱

reply all(2)
漂亮男人

:.w !command命令可以把当前行送到命令的标准输入,比如:.w !cat,当然这不满足你的需求,因为你要的是作为命令行参数,所以你可以这么用:
:.w !xargs command
Okay I know it looks ugly, but it works...

PHPzhong

:echo getline('.')

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!