[英]how to have a horizontal pane at the bottom in vim showing recent commands
I usually work in vim with two panes split vertically with NERDTree being on left. 我通常在vim中工作,两个窗格垂直分开,左边是NERDTree。 I run external commands with :!
我用:!
命令运行外部命令:!
and ESC
out when the command is completed. 命令完成后ESC
。 Sometimes I want to run the same command again so I have to do :<up arrow>enter
有时我想再次运行相同的命令,所以我必须这样做:<up arrow>enter
To avoid this, I want to know if there is a way to have a horizontal pane at the bottom of the page that shows the last 5 external commands. 为了避免这种情况,我想知道是否有办法在页面底部有一个水平窗格,显示最后5个外部命令。 In addition, it would be awesome if I can, for example, run the last 4th
command by simply doing :!4
or something similar. 另外,如果我可以通过简单地执行:!4
运行最后的4th
命令,那将是非常棒的:!4
或类似的东西。
I'm sure you know about: 我相信你知道的:
@:
- repeat last command @:
- 重复上一个命令
q:
- list of commands from history, you can edit and run them. q:
- 历史记录中的命令列表,您可以编辑和运行它们。
To run Nth last command from history use this: 要从历史记录运行第N个最后一个命令,请使用:
command! -nargs=1 H call histdel("cmd", -1) | execute histget("cmd", 0-<args>)
:H 4
- last 4th command :H 4
- 最后4号命令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.