From: Michael D. Lowis Date: Tue, 31 Jan 2017 13:42:08 +0000 (-0500) Subject: Added function to rc file for grepping the buffer X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=621d15f2130690157fd533d99febbae115846b3d;p=projs%2Ftide.git Added function to rc file for grepping the buffer --- diff --git a/editrc b/editrc index 4ea678a..6cd3eaf 100644 --- a/editrc +++ b/editrc @@ -1,9 +1,9 @@ # Tag Lines #------------------------------------------------------------------------------ -csrc(){ echo -n "Quit Save >lines |bc |uc | Find "; } -src(){ echo -n "Quit Save >lines |bcmt |ucmt | Find "; } -ptext(){ echo -n "Quit Save |fmt >words | Find "; } +csrc(){ echo -n "Quit Save >lines |bc |uc {>Grep } Find "; } +src(){ echo -n "Quit Save >lines |bcmt |ucmt {>Grep } Find "; } +ptext(){ echo -n "Quit Save |fmt >words {>Grep } Find "; } # setup default tags line export EDITTAGS="$(csrc)" @@ -11,6 +11,9 @@ export EDITTAGS="$(csrc)" # Tool Functions #------------------------------------------------------------------------------ +# Regex search +Grep(){ grep -n "$@"; } + # Word and Line Counts words(){ wc -w; } lines(){ wc -l; } @@ -20,3 +23,4 @@ bc(){ sed -e 's/^/\/\//'; } uc(){ sed -e 's/^\/\///'; } bcmt(){ sed -e 's/^/#/'; } ucmt(){ sed -e 's/^#//'; } +