1

Is there a way to auto complete a path in vim as in /v [tab] -> /var/ in the command line

I've tested ctrl x ctrl f, but it is not exactly what I'm looking for

chazsolo
  • 7,873
  • 1
  • 20
  • 44
Nero
  • 21
  • 1
  • 3
  • 1
    In what way ctrl x ctrl f isn't appropriate for your needs? – usta Oct 02 '12 at 12:42
  • off topic: why are you using backtics instead of quotes? – none Oct 02 '12 at 13:20
  • on topic: I can just type `:e /v[tab]` to get `:e /var/` in the command line. It should be working with tab as long as your command (`:e` in this case) is relevant. – none Oct 02 '12 at 13:24
  • I want to use it in insert mode since I do a lot of scripting, maybe ctrl x ctrl f works fine and I just haven't got the hang of it yet... – Nero Oct 02 '12 at 15:13

1 Answers1

1

The Ctrl-X Ctrl-F can be used in insert mode as well. I think it does just what you want.

If you want to complete everything with tab (filename completion as well as onmicompletion and stuff) I suggest the following vim plugin: "neocomplcache". It features many autocompletion options and can be highly customized. That makes it also a bit complex to configure, however.

Here is the link to the plugin github page: https://github.com/Shougo/neocomplcache.

chtenb
  • 14,924
  • 14
  • 78
  • 116