Vim CommandT- how to search for strings

Is there a way in vim to search (grep / ack, etc.) for lines in files the same way as in CommandT?

So say I'm calling the search box. Possible matches for the line that I have written so far will begin to display while I keep typing.

+4
source share
2 answers

I don’t think there is any native (as in :set findasyoutype ) way to do exactly what you want.

But there is a plugin for this! Well, at least three:

  • LustyExplorer provides this function with the command :LustyBufferGrep . This requires that Vim be compiled with Ruby support.
  • CtrlP , provides this function through the extension line .
  • You can also try the FuzzyFinder , which I have never used.
+4
source

I don’t know how it looks in CommandT, but if you issue the command :set incsearch (or put it in your .vimrc), as soon as you search, as usual, using / , vim will highlight the first item found.

+1
source

Source: https://habr.com/ru/post/1401778/


All Articles