Search code examples
vimnetrw

How to refer folder/file in Netrw by hotkey?


I am new to gvim. Now I am trying to use keyboard to simply go through/search the file and folders with minimal up(k) and down(j) operation, I try vim documentation but not quite understand the symbols

Any help is appreciated


Solution

  • You might want to try netrw+gvim. In the menu for [Netrw]:[Explore] are four searches:

    • Filenames matching pattern :Explore */pattern
    • Filenames matching pattern, searching subdirectories: :Explore **/pattern
    • Files containing search pattern :Explore *//pattern
    • Files containing search pattern, searching subdirectories: :Explore **//pattern

    (see :help netrw-starstar). Use :Nexplore and :Pexplore (or shift-down, shift-up mouse) to go to the next/previous file on the resulting search list, and use a [return] to enter the file.

    For example: * :Explore **//xfile