Open source files in Emacs.
--- a/.mc/bindings Sat Feb 04 20:25:30 2012 +0200
+++ b/.mc/bindings Sat Feb 04 20:48:40 2012 +0200
@@ -226,35 +226,6 @@
Open=%cd %p#utar
View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf -
-
-### Sources ###
-
-# C
-shell/.c
- Open=sensible-editor %f
-
-# Fortran
-shell/.f
- Open=sensible-editor %f
-
-# Header
-regex/\.(h|hpp)$
- Open=sensible-editor %f
-
-# Object
-shell/.o
- #Open=sensible-pager %f
- View=%view{ascii} file %f && nm %f
-
-# Asm
-shell/.s
- Open=sensible-editor %f
-
-# C++
-regex/\.(C|cc|cpp)$
- Open=sensible-editor %f
-
-
### Documentation ###
# Texinfo
@@ -580,10 +551,33 @@
shell/.mo
View=%view{ascii} msgunfmt %f || cat %f
-### My. ###
+################################################################
+# My preference.
shell/.my
- Open=echo %f %{Enter opt:} %{Enter file:}
+ Open=tmp=%f; echo ${tmp%.my} %f %{Enter opt:} %{Enter file:}
+
+# Open in Emacs.
+regex/\.(c|cpp|cxx)
+ Open=e %f
+ # Open=sensible-editor %f
+regex/\.(h|hpp)
+ Open=e %f
+shell/.(s|S)
+ Open=e %f
+shell/.java
+ Open=e %f
+shell/.f
+ Open=e %f
+regex/\.(sh|bash|tcsh)
+ Open=e %f
+
+# Object files.
+regex/\.(o|obj)
+ #Open=sensible-pager %f
+ View=%view{ascii} file %f && nm %f
+shell/.class
+ View=%view{ascii} tmp=%p; javap -c ${tmp%%.class}
### Default ###