set shell=/bin/sh set makeprg=make\ 2>&1 set nobackup set nowrap # Note () enclose keystrokes. E.g. (Alt-k) # Alt-Sm means Alt-S then `m' by itself (w/o Alt). # Quick command line ls, ls -l, and ps. (::ls), (::ll), (::ps) cnoremap :ls :!ls cnoremap :ll :!ls -l\|less cnoremap :ps :!ps x\|less # Quick tabstop changes. (::ts4), (::ts8) cnoremap :ts2 :set ts=2 cnoremap :ts4 :set ts=4 cnoremap :ts8 :set ts=8 # PC Key bindings: # (PageUp) map [5~  # (PageDown) map [6~  # (Home) map [7~ 0 # (End) map [8~ $ # (Insert) map [2~ i # C-style comment (q) map q 0i/*$a */hh # same with (Alt-k) map ë 0i/*$a */hh # undo C-style comment (Q) map Q /\*\/ 2x?\/\* 2x # same with (Alt-K) map Ë /\*\/ 2x?\/\* 2x # insert text in comment. (C-y) map  a/*$a */hha # C style {}. { on newline (T) map T yypp$a}kk$a{j$a # C style {}. { at end of current line (t) map t yyp^Dyyp$a}kk$a{j$a # insert Fortran style do/enddo (F1) map [11~ yyp^Dyyp$aenddokk$aj$a # insert Fortran style then/endif (F2) map [12~ yyp^Dyyp$aendifkk$athenj$a # inserst Bourne Shell do/done (F3) map [13~ yypDadoyypcwdoneyypkcw # inserst Bourne Shell ;then/fi (F4) map [14~ yyp^Dyyp$afikk$a; thenj$a # in reply to email, delete to /Status/ (F12) map [24~ mm/Status d'm # God awful hack to reformat a paragraph (Alt-r) # map ò mp{OBBBBBBmbjmo'p}oEEEEEEme:w! /tmp/virefm :!virefm.pl /tmp/virefm 'o"od'e'b:r /tmp/virefm 'bdd # # Pass file thru "spell" checker (Alt-s) noremap ó :w! :!clear; spell % # Pass file thru "spell" checker | less (Alt-Sm) noremap Óm :w! :!clear; spell %\|less # Start TeX processing script (Alt-t) map ô :w :!clear; texm % # TeX print (Alt-Tp) map Ôp :!clear; texm -p % # Kill TeX daemon (Alt-Tk) map Ôk :!clear; texm -k -np % # pass thru "anyview" script av (Alt-v) map ö :w :!av % # pass thru "anyprint" script ap (Alt-p) map ð :w :!ap % # Do VI's make (Alt-m) map í :w :make # Set VI's make errorformat to Fortran (Alt-MF) map ÍF :set errorformat=Error\ on\ line\ %l\ of\ %f:\ %m # Set VI's make errorformat to C (Alt-MC) map ÍC :set errorformat=%f:%l:\ %m # Standard "make" (Alt-Mm) map Ím :!make # Standard "make clean" (Alt-Mc) map Íc :w :!make clean # Standard "make all" (Alt-Ma) noremap Ía :w :!make all # Start xxgdb processing script (Alt-Md) map Íd :!do_xxgdb % # Do Fortran compile on current file (Alt-f) map æ :w :!f77 % # Do Fortran compile plus run a.out (Alt-F) map Æ :w :!f77 %; a.out # Do C compile on current file (Alt-c) map ã :w :!cc % # Do C compile plus run a.out (Alt-C) map à :w :!cc %; a.out # run a.out (Alt-a) map á :w :!a.out # repeat last shell command (Alt-q) map ñ :w :!! # change xterm window title to current filename (Alt-n) map î :!win_title vi: % :set history=30 # execute the current file (Alt-x) map ø :w :!chmod 755 %; % # initiate "Z" command mapping (Alt-Z) # run the mapping with (Alt-z) map Ú :map ú :! # pass current file thru "wish" interpreter (Alt-w) map ÷ :w :!wish -f % # pass file thru "xaxa" plotting script (Alt-Xa) map Øa :w :!xaxa -geom +1+1 % # pass file thru "xaxa" with error bars (Alt-Xe) map Øe :w :!xaxa -e -geom +1+1 % # set default shell to "xsh" (Alt-Xsh) noremap Øsh :set shell=xsh # pass file thru "mailf" script (Alt-Mf) map Íf :w :!mailf < % # print out Vi help file (Alt-h) map è :!clear; more $HOME/.exrc_help # run "quickClip" clipboard (Alt-Q) map Ñ :!nohup quickClip&