Question

Something funny is going on with my vim. I'm using it through xterm. I want to be able to autocomplete filenames that I try to open.

For example:

# Cursor is | character
:o exam|
:o exam|<TAB>
:o examplefile.txt|

I was sure vim supported this, but it's not working for me. When I hit <TAB> an ^I character is inserted instead of completing the filename:

:o exam|<TAB>
:o exam^I|
:o exam^I|<TAB>
:o exam^I^I|

However, <TAB> works fine in bash in xterm - it correctly completes filenames and doesn't expand to ^I.

Is my terminal configured incorrectly? Do I need some stty voodoo? Or is it something else entirely?

Edit

:e does work for me - seems like only :o doesn't...

Was it helpful?

Solution

:o is not really supported in vim. Try typing :h :o, you'll see this:

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.

I think you're confusing :o and :e (they're not the same).

OTHER TIPS

edit works for me:

:e exam|<TAB>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top