16

I like Vim's Directory Completion when I'm normal mode, for example I do something like :cd ~/Desktop it actually autocompletes the name When I hit tab.

So here's my question is there something like let's see, I want somefile.png that's stored in my images directory, and I'm operating from my css file, So I type ../img/som and it automagically completes it for me, is there something like that on ViM

Rigel Glen
  • 1,289
  • 3
  • 14
  • 20
  • Possible duplicate of [When in Vim insert mode, is there a way to add filepath autocompletion?](http://stackoverflow.com/questions/1919492/when-in-vim-insert-mode-is-there-a-way-to-add-filepath-autocompletion) – hdl Dec 02 '15 at 18:36

1 Answers1

29

Ctrl+X Ctrl+F while editing will do the job

ib.
  • 27,830
  • 11
  • 80
  • 100
dimba
  • 26,717
  • 34
  • 141
  • 196
  • 2
    This is really super cool, but does not work when there is no space before the path, e.g. in a shell variable assignation `PATH=$HOME/foo` – hdl Dec 02 '15 at 18:34