set ruler set errorbells set linewrap set printing-high 255 set modeline-format "%-%i%- %b %m:: :%f:is : :%=%F: : :%l:(:,:%c %L::) :%p::% :%S%-%-%|" setv $pagelen=40 ; Seznam maker: ; ^A-1: Macros Menu ; ^A-2: ; ^A-3: ; ^A-4: ; ^A-5: inserts date&time ; ^A-6: inserts HTML tag ; ^A-7: ; ^A-8: Czech and slovak keyboard for programmers ; ^A-9: Unmap czech keyboard ; ^P : Print document (no borders,A4,ISO-8859-2) ; ^X-m: man pages filter ; ; ; Macros Menu ; Radek Liboska (c) 1997 ; 1 store-macro 2 split-current-window 13 resize-window edit-file "/dev/nul" goto-beginning-of-file delete-til end-of-file delete-til end-of-line newline insert-string " Ctrl_A-1" attribute-bold-til previous-word insert-string " = This list" newline insert-string " Ctrl_A-2" attribute-bold-til previous-word insert-string " = " newline insert-string " Ctrl_A-3" attribute-bold-til previous-word insert-string " = " newline insert-string " Ctrl_A-4" attribute-bold-til previous-word insert-string " = " newline insert-string " Ctrl_A-5" attribute-bold-til previous-word insert-string " = Inserts date&time" newline insert-string " Ctrl_A-6" attribute-bold-til previous-word insert-string " = Inserts HTML tag" newline insert-string " Ctrl_A-7" attribute-bold-til previous-word insert-string " = " newline insert-string " Ctrl_A-8" attribute-bold-til previous-word insert-string " = Czech keyboard for programmers" newline insert-string " Ctrl_A-9" attribute-bold-til previous-word insert-string " = Unmap czech keyboard" newline insert-string " Ctrl_P" attribute-bold-til previous-word insert-string " = Print document (A4, 80 cols, ISO-8859-2) newline insert-string " Ctrl_X-m" attribute-bold-til previous-word insert-string " = man pages filter goto-beginning-of-file unmark-buffer write-message " List of Available Macros [Hint: ^K to hide] ~endm bind-key execute-macro-1 ^A-1 2 store-macro ~endm bind-key execute-macro-2 ^A-2 3 store-macro ~endm bind-key execute-macro-3 ^A-3 4 store-macro ~endm bind-key execute-macro-4 ^A-4 ; Macro inserts date and time ; ; 5 store-macro newline back-line insert-file "!date +\'\%a \%b \%e \%R \%Z \%Y\'" back-line join-lines delete-next-character join-lines delete-next-character ~endm bind-key execute-macro-5 ^A-5 ; Inserts HTML tag ; 6 store-macro set-variable %html_tag @"HTML tag? " ~if &or &seq %html_tag "ERROR" & seq %html_tag "" ~return ~endif insert-string "" set-named-mark "a" ~force selection insert-string "<" insert-string %html_tag insert-string ">" goto-named-mark-exact "a" unmark-buffer ~endm bind-key execute-macro-6 ^A-6 7 store-macro ~endm bind-key execute-macro-7 ^A-7 ; ; Vzor makra pro psani ceskych a slovenskych znaku (c) Radek Liboska 1997 ; ; map! mapuje znaky v insert-mode ; ; ^VXXX je kod pro znak v dec, ten kontrol_V tam dostanete tak, ze ; zmacknete kontrol_V dvakrat ; ; v X-windows muzete pouzit komando: ; xfd -fn -*-2 ; ktere vam zobrazi nejaky z nainstalovanych fontu v iso-latin2 v tabulce, ; ze které snadno odectete i decimalni kod klavesy ; 8 store-macro map! 2 236 map! 3 185 map! 4 232 map! 5 248 map! 6 190 map! 7 253 map! 8 225 map! 9 237 map! 0 233 map! [ 250 map! ; 249 map! +E 204 map! +S 169 map! +C 200 map! +R 216 map! +Z 174 map! =Y 221 map! =A 193 map! =I 205 map! =E 201 map! =U 218 map! +U 217 map! +d 239 map! +t 187 map! +n 242 map! +D 207 map! +T 171 map! +N 210 map! =o 243 map! =O 211 map! +o 244 map! +O 212 map! =r 224 map! =R 192 map! =l 229 map! =L 197 map! +l 181 map! +L 165 map! `a 228 map! `A 196 map! `e 235 map! `E 203 map! `o 246 map! `O 214 map! `u 252 map! `U 220 ~endm bind-key execute-macro-8 ^A-8 9 store-macro unmap! 2 unmap! 3 unmap! 4 unmap! 5 unmap! 6 unmap! 7 unmap! 8 unmap! 9 unmap! 0 unmap! [ unmap! ; unmap! +E unmap! +S unmap! +C unmap! +R unmap! +Z unmap! =Y unmap! =A unmap! =I unmap! =E unmap! =U unmap! +U unmap! +d unmap! +t unmap! +n unmap! +D unmap! +T unmap! +N unmap! =o unmap! =O unmap! +o unmap! +O unmap! =r unmap! =R unmap! =l unmap! =L unmap! +l unmap! +L unmap! `a unmap! `A unmap! `e unmap! `E unmap! `o unmap! `O unmap! `u unmap! `U ~endm bind-key execute-macro-9 ^A-9 ;; ;; Print document on lp - in ISO-8859-2 ;; document --> file --> a2ps --> ghostscript --> lpr ;; ;; (tiskne cesky i na obycejne jehlickove tiskarne - musite ;; nainstalovat a2ps - doporucuji a2ps-4.9.8-1A.rpm) ;; 19 store-macro write-file write-message &cat "Printing file.." ~force 1 shell-command &cat "a2ps --borders=no --no-header -d --media=A4star " $cfilname write-message &cat "Printing file.. --> OK" ~endm bind-key execute-macro-19 ^P ;; ;; ;; Macros for obtaining manual pages and then attributing them. ;; ;; Author: Kevin Buettner 29 store-macro set-variable %manpage @"man page? " ~if &or &seq %manpage "ERROR" & seq %manpage "" ~return ~endif 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-29 ^X-m