tags:

views:

78

answers:

2

How to make VIM to always auto-complete filenames in command mode? It works fine when I type for example ":cd /ww[Tab]", but if I want to open a file and type ":o /ww[Tab]", it inserts "^I" character instead of completing.

+4  A: 

Try:

:e /ww[Tab]
Arkaitz Jimenez
For more fun try it with :set wildmenu
Ben
+1  A: 

Use ":e" or ":split" or other edit commands instead of ":o".

Bonus fact: vim doesn't really support the ":o" command, at least not according to the docs. ":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.
svec
Thanks. I've been using GVIM until this time with all those windows shortcuts and dropdown menus, working in console now and missing a lot and trying to learn.
Andrey