]> git.mdlowis.com Git - projs/tide.git/commitdiff
Tweaked some existing rc functions and added the term function to launch terminal...
authorMichael D. Lowis <mike.lowis@gentex.com>
Thu, 2 Feb 2017 17:45:52 +0000 (12:45 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Thu, 2 Feb 2017 17:45:52 +0000 (12:45 -0500)
editrc

diff --git a/editrc b/editrc
index b99d68026fcd2124e44df9e540ccb2d0dfe35fee..b3686c22f140d0512f81087907ab5d040a7027ad 100644 (file)
--- a/editrc
+++ b/editrc
@@ -3,9 +3,9 @@
 # Tag Lines
 #------------------------------------------------------------------------------
 
-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 "; }
+csrc(){ echo -n "Quit Save !term >lines |bc |uc {>Grep  } Find "; }
+src(){ echo -n "Quit Save !term >lines |bcmt |ucmt {>Grep  } Find "; }
+ptext(){ echo -n "Quit Save !term |fmt >words {>Grep  } Find "; }
 
 # setup default tags line
 export EDITTAGS="$(csrc)"
@@ -13,6 +13,9 @@ export EDITTAGS="$(csrc)"
 # Tool Functions
 #------------------------------------------------------------------------------
 
+# Launch a terminal emulator in the same dir as the editor
+term(){ (nohup st)& }
+
 # Regex search
 Grep(){ grep -n "$@"; }
 
@@ -22,9 +25,9 @@ lines(){ wc -l; }
 
 # Block Comments for C and Scripting Languages
 bc(){ sed -e 's/^/\/\//'; }
-uc(){ sed -e 's/^\/\///'; }
+uc(){ sed -e 's/^\(\s*\)\/\//\1/'; }
 bcmt(){ sed -e 's/^/#/'; }
-ucmt(){ sed -e 's/^#//'; }
+ucmt(){ sed -e 's/^\(\s*\)#/\1/'; }
 
 # Expand tabs to spaces
 etabs(){ sed -e 's/\t/    /g'; }