add vg function

Wed, 30 Mar 2022 00:22:44 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 30 Mar 2022 00:22:44 -0400
changeset 988
c74a9716d606
parent 987
556f618e117a
child 989
b5df8971e99b

add vg function

.profile.common file | annotate | diff | comparison | revisions
--- a/.profile.common
+++ b/.profile.common
@@ -40,6 +40,10 @@ alias mv='mv -i'
 alias hgcd='cd $(hg root)'
 alias gcd='cd "$(git rev-parse --show-toplevel)"'
 
+vg() {
+  vim +copen -q <(ag --vimgrep "${@:?No pattern provided.}")
+}
+
 alias tmux-env='eval "$(tmux show-environment -s)"'
 alias :e=vim
 alias :q=exit

mercurial