set noflash set nomultibeep set showmatch set showmode set autoindent set cmode set c-suffixes=.c,.cc,.C,.h,.sh,.pl,.ph,.x,.i,.awk,.py set c-tabstop=5 set c-shiftwidth=5 set autosave set autosavecnt=250 set ruler ; set check-modtime set samebangs set undolimit=50 set shiftwidth=5 set tabstop=5 set shell=/bin/sh set buffer-hook=change-buffer set read-hook=read-buffer set printing-low=160 set printing-high=255 set fence-pairs="()[]{}<>" set fillcol=75 ; This is here for reference, it wraps lines with soft returns @ word breaks ; set wrapwords ;Your X-Window Terminal Program setv %xterm="rxvt" abb wt William Totten abb w/o without abb w/i within abb w/ with abb b/c because abb b/t between abb o/w otherwise abb tn then ;damn it!!! abb teh the abb adn and abb ehco echo ;VT100 Keypad: map Oq a1 map Or a2 map Os a3 map Ot a4 map Ou a5 map Ov a6 map Ow a7 map Ox a8 map Oy a9 map Op a0 map On a. map Oo a/ map Oj a* map Om a- map Ok a+ map OM o ;the next line ends with a space ;map! \s x; a ;map! ( x; a( ;map! ) x; a) ;map! x; o ;30 store-macro ; set-variable %col $curcol ; filter-til end-of-line "vile-c-filt" ; attribute-cntl_a-sequences-til end-of-line ; %col goto-column ;~endm ;bind-key execute-macro-30 ^X-x ;store-procedure dict 10 store-macro next-character back-punctuated-word set-variable %pat $identifier capture-command &cat &cat "dict " %pat "| vile-manfilt" setl noview rename-buffer %pat write-message "[Attaching attributes...]" goto-beginning-of-file attribute-cntl_a-sequences-til end-of-file unmark-buffer setl view goto-beginning-of-file 10 resize-window ~endm bind-key execute-macro-10 ^A-d ;store-procedure justify 11 store-macro goto-beginning-of-file filter-til end-of-file "fmt" goto-beginning-of-file ~endm bind-key execute-macro-11 ^A-j ;store-procedure tex 12 store-macro write-message &cat "LaTeXing file: " $cfilname write-changed-buffers capture-command &cat "make -f $HOME/.vile-rules tex SRC=" $cfilname 4 resize-window previous-window ~endm bind-key execute-macro-12 ^A-t ;store-procedure xdvi 13 store-macro write-message &cat "running xdvi on file: " $cfilname 1 shell-command &cat "make -f $HOME/.vile-rules xdvi SRC=" $cfilname ~endm bind-key execute-macro-13 ^A-x ;store-procedure view 14 store-macro write-message &cat "LaTeXing file: " $cfilname 1 write-changed-buffers capture-command &cat "make -f $HOME/.vile-rules xdvi clean SRC=" $cfilname 4 resize-window previous-window ~endm bind-key execute-macro-14 ^A-v ;store-procedure dvips 15 store-macro write-message &cat "dvips-ing file: " $cfilname 1 shell-command &cat "make -f $HOME/.vile-rules dvips SRC=" $cfilname ~endm bind-key execute-macro-15 ^A-p ;store-procedure lpr 16 store-macro write-message &cat "printing file: " $cfilname 1 shell-command &cat "make -f $HOME/.vile-rules lpr SRC=" $cfilname ~endm bind-key execute-macro-16 ^A-l store-procedure tmpl set-variable %tmpl &cat "$HOME/etc/tmpl/" &rig $cfilname &add 1 &sin $cfilname "." ~if &rd %tmpl read-file %tmpl ~endif ~endm ; Attach color/underline attributes ;store-procedure color 17 store-macro write-message "[Attaching keyword/comment attributes...]" goto-beginning-of-file filter-til end-of-file "vile-c-filt" goto-beginning-of-file attribute-cntl_a-sequences-til end-of-file unmark-buffer write-message "[Done attaching keyword/comment attributes.]" ~endm bind-key execute-macro-17 ^A-c ; In file spell correcting ;store-procedure spell 18 store-macro write-file write-message "[Spell Checking...]" goto-beginning-of-file filter-til end-of-file &cat "make -f $HOME/.vile-rules spell SRC=" $cfilname goto-beginning-of-file attribute-cntl_a-sequences-til end-of-file unmark-buffer write-message "[Done Spell Checking.]" ~endm bind-key execute-macro-18 ^A-s ; Spell check file ;store-procedure ispell 19 store-macro write-file ~if &seq $progname "xvile" 1 shell-command &cat &cat %xterm " -fg black -bg khaki -e ispell -x -t "$cfilname ~else 1 shell-command &cat "ispell -x " $cfilname ~endif replace-with-file $cfilname ~endm bind-key execute-macro-19 ^A-i ; one word spell correcting ;store-procedure spell 22 store-macro set-variable %col $curcol next-character back-punctuated-word set-variable %pat $identifier capture-command &cat &cat "echo " %pat "|ispell -t -a|sed -n 's/^&.*: //p'; echo" set-variable %alts $line kill-buffer [Output] %col goto-column set-variable %pat "" set-variable %col "" write-message %alts ~endm bind-key execute-macro-22 ^A-S ;Sort the file, line by line store-procedure sort write-message "[Sorting file by line...]" goto-beginning-of-file filter-til end-of-file "sort" goto-beginning-of-file unmark-buffer write-message "[Done sorting.]" ~endm ; delete underlines, ... from man pages store-procedure man2 write-message "[Fixing now...]" global _ s/_//g unmark-buffer write-message "[Done fixing.]" ~endm ;store-procedure man 20 store-macro set-variable %manpage @"man page? " ~if &or &seq %manpage "ERROR" & seq %manpage "" ~return ~endif split-current-window set-variable %manpagebuf &cat "<" &cat %manpage ">" set terse ~force select-buffer %manpagebuf ~if ¬ $status edit-file &cat "!man " &cat %manpage " | vile-manfilt" ~force rename-buffer %manpagebuf ~force error-buffer %manpagebuf write-message "[Attaching attributes...]" goto-beginning-of-file setl noview attribute-cntl_a-sequences-til end-of-file unmark-buffer setl view goto-beginning-of-file write-message "[Done formatting manual page.]" ~endif set noterse ~endm bind-key execute-macro-20 ^A-m ;change titlebar name and buffer settings store-procedure change-buffer ~if &or &loc view &loc readonly bind-key down-page \s bind-key back-page b ~else bind-key forward-character-to-eol \s bind-key back-punctuated-word b ~endif ~if ¬ &rd $cfilname ~if &rd &cat $cfilname ".c" edit-file &cat $cfilname ".c" ~elseif &rd &cat $cfilname ".tex" edit-file &cat $cfilname ".tex" ~elseif &rd &cat $cfilname ".html" edit-file &cat $cfilname ".html" ~endif ~endif ~if &seq $progname "xvile" set title &cat &cat "XVile: " $cbufname setv %index 2 ~while &gre &sin &rig $cfilname %index "/" 1 setv %index &add %index &sin &rig $cfilname %index "/" ~endwhile ~if &rd &lef $cfilname &sub %index 2 ~force cd &lef $cfilname &sub %index 2 ~endif ~endif ~endm ;store-procedure gv 21 store-macro write-message &cat "running gv on file: " $cfilname 1 shell-command &cat "make -f $HOME/.vile-rules gv SRC=" $cfilname ~endm bind-key execute-macro-21 ^A-g ;change buffer settings store-procedure read-buffer ~if &or &or &seq &rig $cfilname &sin $cfilname "." ".tex" &seq &rig $cfilname &sin $cfilname "." ".html" &seq &rig $cfilname &sin $cfilname "." ".sty" setl nocmode setl notabinsert setl wrapwords setl shiftwidth=2 setl tabstop=2 ~elseif &seq &lef $cfilname 3 ".ed" ;Turn off autoindent if I am editing mail with vile in mush setl noautoindent ~endif ~endm ; put 'fprintf(stderr,"\n");" into the file, and ; position the cursor to add to the string 1 store-macro eol append-string "\n" goto-column 1 insert-string "fprintf(stderr, \"\\n\");" 5 backward-character insert-chars ~endm ; put 'cerr << "" << endl;' into the file, and ; position the cursor to add to the string 2 store-macro eol append-string "\n" goto-column 1 insert-string "cerr << \"\" << endl;" 10 backward-character insert-chars ~endm ; put 'print STDERR "" "\n\r";' into the file, and ; position the cursor to add to the string 3 store-macro eol append-string "\n" goto-column 1 insert-string "print STDERR , \"\\n\\r\";" 9 backward-character insert-chars ~endm ;insert tab from within command mode 4 store-macro insert-string " " ~endm 5 store-macro delete-buffer $cbufname ~endm bind-key find-next-error v bind-key redo-changes-forward Y bind-key undo-changes-backward U bind-key delete-window K bind-key blank-region B bind-key next-window ^N bind-key previous-window ^P bind-key split-current-window  bind-key grow-window ^B bind-key shrink-window ^S bind-key down-section > bind-key back-section < bind-key shift-left-til [ bind-key shift-right-til ] bind-key execute-macro-1 - bind-key execute-macro-2 _ bind-key execute-macro-3 = bind-key execute-macro-4 T bind-key execute-macro-5 ^A-k map g 1G map , ; map ; : map ' ` map ` ' map '' `` ;The next line is "map" "@" "^A", you need an 8-bit clean editor to see the ^A map @