3 ms·
I know that vim has the built in :grep command that does what you describe. The results are listed in the preview window and pressing enter will open the corres
by u801e 10y ago
I know that vim has the built in :grep command that does what you describe. The results are listed in the preview window and pressing enter will open the corresponding file and place the cursor at the desired line.
- EvilTerran 10y agoWell, yes... okay, maybe that was a poor choice of example, :grep is probably more ergonomic for that particular use case. The trick I described is more for when you're dealing with some unusual program that wouldn't work with :grep - at least not without fiddling with 'grepprg' to invoke it, and/or 'grepformat' to correctly interpret its output.
- blockloop 10y agoThere is also a silver searcher plugin for vim (ag).