Shortcut to open file in Vim

前端 未结 19 874
误落风尘
误落风尘 2020-12-22 16:30

I want to open a file in Vim like in Eclipse using Ctrl + Shift + R, or via the Ctrl + N option of autofill. Invoke a

相关标签:
19条回答
  • 2020-12-22 16:44

    unless I'm missing something, :e filename is the fastest way I've found.

    You can use tab to autocomplete the filename as well.

    0 讨论(0)
  • 2020-12-22 16:45

    Use tabs, they work when inputting file paths in vim escape mode!

    0 讨论(0)
  • 2020-12-22 16:46

    I recently fell in love with fuzzyfinder.vim ... :-)

    :FuzzyFinderFile will let you open files by typing partial names or patterns.

    0 讨论(0)
  • 2020-12-22 16:47

    This isn't exactly what you're looking for, but it's good in many cases (though not all).

    If you VIM open and there's a name of a file in the buffer, you can put the cursor on that filename and type gf. This opens the file whose name is under the cursor in the same buffer. It's the same as

    :e CTRL+r CTRL+w

    0 讨论(0)
  • 2020-12-22 16:47

    FuzzyFinder has been mentioned, however I love the textmate like behaviour of the FuzzyFinderTextmate plugin which extends the behaviour to include all subdirs.

    Make sure you are using version 2.16 of fuzzyfinder.vim - The higher versions break the plugin.

    0 讨论(0)
  • 2020-12-22 16:55

    If you've got tags (and you should), you can open a file from the command line just by the name of the class or method or c function, with "vim -t DBPlaylist", and within vim with ":tag ShowList".

    0 讨论(0)
提交回复
热议问题