m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

fuzzy grep open via ag

Lukáš Zapletal
2017-08-23 11:10:49 +02:00
parent 41b696d8e5
commit e66414033c

@@ -83,6 +83,20 @@ vf() {
} }
``` ```
```sh
# fuzzy grep open via ag
vg() {
local file
file="$(ag --nobreak --noheading $@ | fzf -0 -1 | awk -F: '{print $1 " +" $2}')"
if [[ -n $file ]]
then
vim $file
fi
}
```
### Changing directory ### Changing directory
```sh ```sh