1

I use VIM 7.2 on Windows, with the latest netrw (141i, Jan 03 2011).

I use netrw for browsing remote FTP directors. Right now, when I want to navigate to a certain file, I type /<filename> and VIM's own search function gets the cursor there. I then have to hit ENTER twice (once to exit search mode, and then again to make netrw "execute" that file).

I'm sure there's a better way to do this. Any ideas?

Thank you.

ezuk
  • 3,096
  • 3
  • 30
  • 41
  • Thanks guys; I'm starting to think maybe the way to go is to map `Ctrl-ENTER` to a script that sends `ENTER`, waits a moment, and then sends another `ENTER`. Thoughts? – ezuk Jan 27 '11 at 15:05

2 Answers2

1

It seems that you have the 'incsearch' setting which displays occurrences of a pattern as you type it. It is necessary to hit enter to validate the pattern, then you're back to your buffer.

Maybe the Fuzzyfinder plugin could help you be quicker.

Benoit
  • 76,634
  • 23
  • 210
  • 236
0

You can use : set incsearch in your .vimrc to enable incremental search.

You'll still have to type <Enter> twice but you won't have to type the complete filename !

Xavier T.
  • 40,509
  • 10
  • 68
  • 97
  • `:set incsearch` actually doesn't work within netrw, because netrw has its own single-key shortcuts... – ezuk Jan 27 '11 at 15:03
  • @ezuk : It is working on my installation (vim 7.3), but I am only browsing local directory. I can't test with ftp. – Xavier T. Jan 27 '11 at 15:18
  • Sorry, I _am_ using incsearch. The problem is that it matches all screen elements, not just filenames. So if I type "si" it highlights "Filesize", for example. – ezuk Jan 29 '11 at 09:27