4 ms·
Pretty cool, thanks. Using the interactive mode, how can I open the selected file in vim instead of just outputting the filename to stdout?
by wnolens 3y ago
Pretty cool, thanks.
Using the interactive mode, how can I open the selected file in vim instead of just outputting the filename to stdout?
- arcanemachiner 3y agoHaven't used this tool but here's how I do this with `ag` (silver searcher): `vim -p $(ag -l some_word)` The `-p` flag opens each item in a new tab. To open each item in the same tab but different windows*, you can the use `-O` or `-o` flags instead for vertical or horizontal splits, respectively. *I am not certain if I am using the term 'window' correctly as Vim uses it.
- boyter 3y agoI tend to do it with backticks, so vi `cs` would do the trick.