4 ms·
fvi - find vi - recursively grep for a pattern and pass the successful files into the editor. I use this to find examples in a codebase. Sure, it would be nice
by CalChris 5y ago
fvi - find vi - recursively grep for a pattern and pass the successful files into the editor. I use this to find examples in a codebase. Sure, it would be nice to set editor's pattern and have it jump to the first occurrence but that has been a bridge too far. Maybe I'll try again with VSC. (Yeah, VSC doesn't seem to have a way of setting the search pattern.)
function fvi { grep -rl $1 . | xargs zsh -c 'code "$@" <$0' /dev/tty }