Rails vim 命令行中能否运行 rails 命令啊?

liy_j · 2015年02月03日 · 最后由 greatghoul 回复于 2015年02月03日 · 1847 次阅读

最近在折腾 VIM,想把 vim 变成类似于 subline 这种 IDE 的形式。 各位大神,能不能在打开的 rails 工程中的 vim 命令行中运行 rails 命令,来生成文件或控制器之类的,还是说必须打开另外一个终端来进行 rails 命令的输入。例如:$rails generate controller Users(图片中最后用红线圈起来的行)

Vim also allows you to execute a command directly from the editor, without needing to drop to a shell, by using bang (!) followed by the command to be run. For instance, if you're editing a file in Vim and want to find out how many words are in the file, run :! wc %

google key word: vim run external command

#1 楼 @larrylv 非常感谢,Thank you !

需要 登录 后方可回复, 如果你还没有账号请 注册新账号