vim-tw / ama

Helping vimmer in Taiwan with any questions.
https://github.com/vim-tw/ama/issues
16 stars 1 forks source link

command-line history in Vim ? #6

Closed chusiang closed 8 years ago

chusiang commented 8 years ago

@nylon7 提到 Vim 裡有查詢歷使記錄的功能,survey 後得知是 history 的功能。

想問個簡單的問題,我記得vim可以用之前打過的紀錄

例如

我進入某個.c

然後我用:grep -nr --color hello 應該可以在重複叫出之前打過的? 不用再重打一次

在 normal mode 裡按下 q: 即可開啟小視窗 (command window),並用 h, j 上下選擇要執行的項目後再按下 Enter (或 <C-m>)。

最後附上 history in vim 的操作錄影。 2015-12-30-vim-history

Reference