1

I'm brand new to Vim so I'll be SUPER clear about what my question is. Right now I have an application and I'm in the root directory with vim(I'll post a screenshot for clarity). I want to navigate to the Users_controller.rb with a vim command, something like :e users_controller.rb but I don't know what the actual command is? I feel like the answer to this question should be easy but I can't find it anywhere.

Here is my current position in vim

enter image description here

As you can see on the left I have my full application but now I want to simply navigate to a particular file(like fuzzyfinder in atom)How can I do this?

Bitwise
  • 8,021
  • 22
  • 70
  • 161

1 Answers1

1

This you can do without any plugin, plain vanilla vim using :find and extending path.

:set path+=** "Extends path to look into all sub-folders, :help path

Now use :find users_controller.rb or even :find users_*.rb to locate and open the file. Details at :help :find

Base on the number of sub folders in your project, find may take sometime to search the file.


But you will be lot happier with ctrl-p plugin, though there are many ways to accomplish that. Just type ctrl + p and name of file. You need to install the plugins from https://github.com/kien/ctrlp.vim

dlmeetei
  • 9,905
  • 3
  • 31
  • 38