Shortcut to open file in Vim

前端 未结 19 876
误落风尘
误落风尘 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:57

    In GVIM, The file can be browsed using open / read / write dialog;

    :browse {command}
    

    {command} - open / read / write

    open - Opens the file read - Appends the file write - SaveAs dialog

    0 讨论(0)
  • 2020-12-22 17:00

    With Exuberant ctags, you can create tag files with file information:

    ctags --extra=+f -R *
    

    Then, open file from VIM with

    :tag filename
    

    You can also use <tab> to autocomplete file name.

    0 讨论(0)
  • 2020-12-22 17:01

    What I normally do is e . (e-space-dot) which gives me a browsable current directory - then I can / - search for name fragments, just like finding a word in a text file. I find that generally good enough, simple and quick.

    0 讨论(0)
  • 2020-12-22 17:01

    There's also command-t which I find to be the best of the bunch (and I've tried them all). It's a minor hassle to install it but, once it's installed, it's a dream to use.

    https://wincent.com/products/command-t/

    0 讨论(0)
  • 2020-12-22 17:03

    I like the :FuzzyFinderTextMate (or Ctrl + F) on my setup. See http://weblog.jamisbuck.org/2008/10/10/coming-home-to-vim

    0 讨论(0)
  • 2020-12-22 17:05

    You can search for a file in the current path by using **:

    :tabe **/header.h
    

    Hit tab to see various completions if there is more than one match.

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