1 shell_patterns=0 # expression type
5 # %c The cursor column position number. For edit menu only.
6 # %i The indent of blank space, equal the cursor column
7 # position. For edit menu only.
8 # %y The syntax type of current file. For edit menu only.
9 # %b The block file name.
10 # %e The error file name.
11 # %f The current file name.
12 # %n Only the current file name without extension.
13 # %x The extension of current file name.
14 # %d The current directory name.
15 # %F The current file in the unselected panel.
16 # %D The directory name of the unselected panel.
17 # %t The currently tagged files.
18 # %T The tagged files in the unselected panel.
19 # %u and %U Similar to the %t and %T macros, but in
20 # addition the files are untagged. You can use this macro
21 # only once per menu file entry or extension file entry,
22 # because next time there will be no tagged files.
23 # %s and %S The selected files: The tagged files if
24 # there are any. Otherwise the current file.
28 # %{some text} Prompt for the substitution. An input box
29 # is shown and the text inside the braces is used as a
30 # prompt. The macro is substituted by the text typed by the
31 # user. The user can press ESC or F10 to cancel. This macro
32 # doesn't work on the command line yet.
34 #----------------------- Begin [perl] language template -----------------------
35 + y Perl\ Program | f \.pl$
36 1 Author description header
38 AUTHOR="$(cat /etc/passwd |grep ^$(id -un) |awk -F: '{print($5)}')"
40 #----------------------------------------------------------------------
42 # Author: $AUTHOR <$(echo -ne $REPLYTO)>
44 # Computer: $(uname -n)
45 # System: $(uname -sr) on $(uname -m)
47 # Copyright (c) $(date +%%Y) $AUTHOR All rights reserved.
49 #----------------------------------------------------------------------
52 #----------------------------------------------------------------------
58 + y Perl\ Program | f \.pl$
65 + y Perl\ Program | f \.pl$
68 %ifor ($i = ; $i < ; $i++) {
72 + y Perl\ Program | f \.pl$
79 + y Perl\ Program | f \.pl$
86 + y Perl\ Program | f \.pl$
94 + y Perl\ Program | f \.pl$
102 + y Perl\ Program | f \.pl$
104 echo "%i$ = substr(\$str, \$off, \$cnt);" >%b
106 + y Perl\ Program | f \.pl$
109 %iopendir(DIR, \$dir) || die("\$0: can't open \$dir\n");
112 + y Perl\ Program | f \.pl$
114 NAME=%{ Enter name of subroutine: }
121 #----------------------- End [perl] language template -------------------------
123 #---------------------- Begin [shell] language template -----------------------
124 + y Shell\ Script | f \.sh$
125 1 Author description header
127 AUTHOR="$(cat /etc/passwd |grep ^$(id -un) |awk -F: '{print($5)}')"
129 #----------------------------------------------------------------------
131 # Author: $AUTHOR <$(echo -ne $REPLYTO)>
132 # Created at: $(date)
133 # Computer: $(uname -n)
134 # System: $(uname -sr) on $(uname -m)
136 # Copyright (c) $(date +%%Y) $AUTHOR All rights reserved.
138 #----------------------------------------------------------------------
141 #----------------------------------------------------------------------
147 + y Shell\ Script | f \.sh$
155 + y Shell\ Script | f \.sh$
163 + y Shell\ Script | f \.sh$
171 + y Shell\ Script | f \.sh$
173 NUMBER=%{ Enter number elements of case:}
177 while [ "$NUMBER" -gt 0 ]
190 + y Shell\ Script | f \.sh$
192 NAME=%{ Enter name of function:}
198 + y Shell\ Script | f \.sh$
203 %i if [ -n "\$i" ];then
211 #----------------------- End [shell] language template ------------------------
213 #------------------------- Begin [c] language template ------------------------
214 + f \.h$ | f \.c$ | f \.cc$
215 1 Author description header
217 AUTHOR="$(cat /etc/passwd |grep ^$(id -un) |awk -F: '{print($5)}')"
219 /********************************************************************
221 * Author: $AUTHOR <$(echo -ne $REPLYTO)>
222 * Created at: $(date)
223 * Computer: $(uname -n)
224 * System: $(uname -sr) on $(uname -m)
226 * Copyright (c) $(date +%%Y) $AUTHOR All rights reserved.
228 ********************************************************************/
231 + f \.h$ | f \.c$ | f \.cc$
232 2 GPL description header
235 * This program is free software; you can redistribute it and/or modify
236 * it under the terms of the GNU General Public License as published by
237 * the Free Software Foundation; either version 2 of the License, or
238 * (at your option) any later version.
240 * This program is distributed in the hope that it will be useful,
241 * but WITHOUT ANY WARRANTY; without even the implied warranty of
242 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
243 * GNU General Public License for more details.
245 * You should have received a copy of the GNU General Public License
246 * along with this program; if not, write to the Free Software
247 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
276 NUMBER=%{ Enter number elements of switch:}
277 echo "%iswitch () {" >%b
278 while [ "$NUMBER" -gt 0 ]
280 echo "%icase '':" >>%b
281 echo "%i break;" >>%b
284 echo "%i default:" >>%b
290 %ifor (i = ; i < ; i++) {
350 NAME=%{ Enter name of function:}
354 } /* end of $NAME() */
357 + f \.c$ | f \.h$ | f \.cc$
359 INC=%{ Enter include name: }
360 if [ -r "$INC" ];then
361 echo \#include \"$INC\" >%b
363 echo \#include \<$INC\> >%b
366 + f \.c$ | f \.h$ | f \.cc$
370 + f \.c$ | f \.h$ | f \.cc$
378 + f \.c$ | f \.h$ | f \.cc$
379 ...............................................................................
381 + f \.c$ | f \.h$ | f \.cc$
382 h View all *.h into current directory
386 d Run gdb for current file
387 [ -x "./%n" ] && gdb ./%n
391 c Compile, link and run the current .c file
392 export CFLAGS="-g -Wall -O2"
393 make || make %n || cc $CFLAGS -o %n %f
394 [ -r "%n" ] && (echo "*** press any key for run... ***"; read)
396 (echo -ne "\n--- Press any key for return to edit. ---"; read)
399 t Indent `C' formatter
400 indent -kr -pcs %b 1>/dev/null 2> %e
402 #--------------------- End [c/c++] language template --------------------------
404 #------------------------- Begin unknown template -----------------------------
411 echo "#!/usr/bin/perl" >%b
414 a Author description header
416 AUTHOR="$(cat /etc/passwd |grep ^$(id -un) |awk -F: '{print($5)}')"
418 ----------------------------------------------------------------------
420 Author: $AUTHOR <$(echo -ne $REPLYTO)>
422 Computer: $(uname -n)
423 System: $(uname -sr) on $(uname -m)
425 Copyright (c) $(date +%%Y) $AUTHOR All rights reserved.
426 ----------------------------------------------------------------------
429 #--------------------------- End unknown template -----------------------------
431 -------------------------------------------------------------------------------
433 #----------------------- Begin common section ---------------------------------
434 I Insert `Changelog' string
435 DATE=$(date +%%Y-%%m-%%d)
436 AUTHOR="$(cat /etc/passwd |grep ^$(id -un) |awk -F: '{print($5)}')"
437 EMAIL="<$(echo -ne $REPLYTO)>"
438 echo "$DATE $AUTHOR $EMAIL" >%b
444 MAN=%{Enter name of man:}
445 TMPFILE=/tmp/mcview.$MAN.$$
446 man -Pcat $MAN >$TMPFILE
450 i Insert a out of command to cursor.
451 CMD=%{ Enter command: }
454 o Open bash to next free console
456 #-------------------------- End of common section -----------------------------