如何通过vimscript运行shell命令? [英] How to run a shell command through vimscript?

查看:397
本文介绍了如何通过vimscript运行shell命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Vim设置中,我想添加一个运行带有特定映射的shell命令的配置。

In my Vim setup I'd like to add a configuration that runs a shell command with a certain mapping. Is there any possible way to do this in Vimscript?

推荐答案

有一个 system()中的code>函数,请尝试:

There is a system() function in vim,try this:

:call system('date')

这篇关于如何通过vimscript运行shell命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆