Dreamer
Dreamer

Reputation: 7549

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

Upvotes: 0

Views: 303

Answers (2)

user21497
user21497

Reputation: 1181

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

Upvotes: 1

romainl
romainl

Reputation: 196546

You can use HML to jump to the higest, middle and lowest line.

You can use /foo<CR> to jump to a line containing "foo".

You can use line numbers: 12G.

And you can ask more specific questions. What exactly do you have a problem with? What did you try? How did it fail?

Upvotes: 1

Related Questions