2009-12-01 51 views
4

如何使VIM始終在命令模式下自動完成文件名?當我鍵入例如「:cd/ww [Tab]」,但如果我想打開一個文件並輸入「:o/ww [Tab]」,它會插入「^ I」字符而不是完成。vim命令行完成打開文件時

回答

6

嘗試:

:e /ww[Tab] 
+0

想要獲得更多樂趣,請嘗試以下操作:set wildmenu – Ben 2009-12-03 23:49:11

1

使用 「:E」 或 「:拆分」 或其他編輯命令而不是 「:○」。

獎金事實:vim並不真正支持「:o」命令,至少不是根據文檔。 「:help:o」says this:

 
This command is in Vi, but Vim only simulates it: 

           *:o* *:op* *:open* :[range]o[pen] 
           Works like |:visual|: end Ex mode. 
           {Vi: start editing in open mode} 

:[range]o[pen] /pattern/  As above, additionally move the cursor to the 
           column where "pattern" matches in the cursor 
           line. 

Vim does not support open mode, since it's not really useful. 
For those situations where ":open" would start open mode Vim will 
leave Ex mode, which allows executing the same commands, but updates 
the whole screen instead of only one line. 
+0

謝謝。我一直在使用GVIM,直到現在,所有這些窗口快捷方式和下拉菜單,現在在控制檯工作,缺少很多,並試圖學習。 – Andrey 2009-12-01 15:09:16