技巧34 回溯历史命令
- Vim会记录命令行模式中执行过的命令。
- Vim提供了2种方式回溯这些命令。用光标键回滚之前的命令或调出命令行窗口查看先前的命令。
- 按
和 来回溯历史命令。 - Vim缺省会记录最后20条命令。
- 在.vimrc中添加相关配置修改记录历史命令行数
set history=200
- q: 打开Ex命令行窗口
- q/ 打开查询命令行窗口
命令行 从命令行模式切换到命令行窗口
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
set history=200