0

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

Dreamer
  • 7,333
  • 24
  • 99
  • 179

2 Answers2

1

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?

romainl
  • 186,200
  • 21
  • 280
  • 313
  • thank you. Actually I am looking for two functions by keyboard: 1) As you already give me the answer, use /foo. But it is possible to search by key word in sub folders as well? Just like `find in Files` in Eclipse, so netrw can find me all potential results and show up in sub folders. 2) how to narrow down the folder list by type in keyword? i.e. If there are 600 files in a folder and I only want to show up 2 files with name containing "xfile", is it possible in Netrw? – Dreamer May 09 '14 at 15:02
  • 1
    AFAIK what you want can't be done with netrw alone without serious tweaking/configuration. – romainl May 09 '14 at 15:29
1

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

user21497
  • 1,061
  • 8
  • 9