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 # %f The current file name.
11 # %n Only the current file name without extension.
12 # %x The extension of current file name.
13 # %d The current directory name.
14 # %F The current file in the unselected panel.
15 # %D The directory name of the unselected panel.
16 # %t The currently tagged files.
17 # %T The tagged files in the unselected panel.
18 # %u and %U Similar to the %t and %T macros, but in
19 # addition the files are untagged. You can use this macro
20 # only once per menu file entry or extension file entry,
21 # because next time there will be no tagged files.
22 # %s and %S The selected files: The tagged files if
23 # there are any. Otherwise the current file.
27 # %{some text} Prompt for the substitution. An input box
28 # is shown and the text inside the braces is used as a
29 # prompt. The macro is substituted by the text typed by the
30 # user. The user can press ESC or F10 to cancel. This macro
31 # doesn't work on the command line yet.
33 #----------------------- Begin [perl] language template -----------------------
34 + y Perl\ Program | f \.pl$
35 1 Author description header
39 AUTHOR="`awk -F: /^\`id -un\`:/'{print($5)}' /etc/passwd`"
41 #----------------------------------------------------------------------
43 # Author: $AUTHOR <$REPLYTO>
45 # Computer: `uname -n`
46 # System: `uname -sr` on `uname -m`
48 # Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
50 #----------------------------------------------------------------------
53 #----------------------------------------------------------------------
59 + y Perl\ Program | f \.pl$
66 + y Perl\ Program | f \.pl$
69 %ifor ($i = ; $i < ; $i++) {
73 + y Perl\ Program | f \.pl$
80 + y Perl\ Program | f \.pl$
87 + y Perl\ Program | f \.pl$
95 + y Perl\ Program | f \.pl$
103 + y Perl\ Program | f \.pl$
105 echo "%i$ = substr(\$str, \$off, \$cnt);" >%b
107 + y Perl\ Program | f \.pl$
110 %iopendir(DIR, \$dir) || die("\$0: can't open \$dir\n");
113 + y Perl\ Program | f \.pl$
115 NAME=%{ Enter name of subroutine: }
122 #----------------------- End [perl] language template -------------------------
124 #---------------------- Begin [shell] language template -----------------------
125 + y Shell\ Script | f \.sh$
126 1 Author description header
130 AUTHOR="`awk -F: /^\`id -un\`:/'{print($5)}' /etc/passwd`"
132 #----------------------------------------------------------------------
134 # Author: $AUTHOR <$REPLYTO>
136 # Computer: `uname -n`
137 # System: `uname -sr` on `uname -m`
139 # Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
141 #----------------------------------------------------------------------
144 #----------------------------------------------------------------------
150 + y Shell\ Script | f \.sh$
158 + y Shell\ Script | f \.sh$
166 + y Shell\ Script | f \.sh$
174 + y Shell\ Script | f \.sh$
176 NUMBER=%{ Enter number elements of case:}
180 while [ "$NUMBER" -gt 0 ]
193 + y Shell\ Script | f \.sh$
195 NAME=%{ Enter name of function:}
201 + y Shell\ Script | f \.sh$
206 %i if [ -n "\$i" ];then
214 #----------------------- End [shell] language template ------------------------
216 #------------------------- Begin [c] language template ------------------------
217 + f \.h$ | f \.c$ | f \.cc$
218 1 Author description header
222 AUTHOR="`awk -F: /^\`id -un\`:/'{print($5)}' /etc/passwd`"
224 /********************************************************************
226 * Author: $AUTHOR <$REPLYTO>
228 * Computer: `uname -n`
229 * System: `uname -sr` on `uname -m`
231 * Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
233 ********************************************************************/
236 + f \.h$ | f \.c$ | f \.cc$
237 2 GPL description header
240 * This program is free software; you can redistribute it and/or modify
241 * it under the terms of the GNU General Public License as published by
242 * the Free Software Foundation; either version 2 of the License, or
243 * (at your option) any later version.
245 * This program is distributed in the hope that it will be useful,
246 * but WITHOUT ANY WARRANTY; without even the implied warranty of
247 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
248 * GNU General Public License for more details.
250 * You should have received a copy of the GNU General Public License
251 * along with this program; if not, write to the Free Software
252 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
281 NUMBER=%{ Enter number elements of switch:}
282 echo "%iswitch () {" >%b
283 while [ "$NUMBER" -gt 0 ]
285 echo "%icase '':" >>%b
286 echo "%i break;" >>%b
289 echo "%i default:" >>%b
295 %ifor (i = ; i < ; i++) {
355 NAME=%{ Enter name of function:}
359 } /* end of $NAME() */
362 + f \.c$ | f \.h$ | f \.cc$
364 INC=%{ Enter include name: }
365 if [ -r "$INC" ];then
366 echo \#include \"$INC\" >%b
368 echo \#include \<$INC\> >%b
371 + f \.c$ | f \.h$ | f \.cc$
375 + f \.c$ | f \.h$ | f \.cc$
383 + f \.c$ | f \.h$ | f \.cc$
384 ...............................................................................
386 + f \.c$ | f \.h$ | f \.cc$
387 h View all *.h into current directory
391 d Run gdb for current file
392 [ -x "./%n" ] && gdb ./%n
396 c Compile, link and run the current .c file
397 export CFLAGS="-g -Wall -O2"
398 make || make %n || cc $CFLAGS -o %n %f
399 [ -r "%n" ] && (echo "*** press any key for run... ***"; read)
401 (echo -ne "\n--- Press any key for return to edit. ---"; read)
404 t Indent `C' formatter
405 indent -kr -pcs %b 1>/dev/null 2> %e
407 #--------------------- End [c/c++] language template --------------------------
409 #------------------------- Begin unknown template -----------------------------
412 echo "#! /bin/sh" >%b
416 echo "#! /usr/bin/perl" >%b
419 a Author description header
423 AUTHOR="`awk -F: /^\`id -un\`:/'{print($5)}' /etc/passwd`"
425 ----------------------------------------------------------------------
427 Author: $AUTHOR <$REPLYTO>
430 System: `uname -sr` on `uname -m`
432 Copyright (c) `date +%%Y` $AUTHOR All rights reserved.
433 ----------------------------------------------------------------------
436 #--------------------------- End unknown template -----------------------------
438 -------------------------------------------------------------------------------
440 #----------------------- Begin common section ---------------------------------
441 I Insert `Changelog' string
442 DATE="`date +%%Y-%%m-%%d`"
443 AUTHOR="`awk -F: /^\`id -un\`:/'{print($5)}' /etc/passwd`"
445 echo "$DATE $AUTHOR $EMAIL" >%b
451 MAN=%{Enter name of man:}
452 TMPFILE=/tmp/mcview.$MAN.$$
453 man -Pcat $MAN >$TMPFILE
457 i Insert a out of command to cursor.
458 CMD=%{ Enter command: }
461 o Open bash to next free console
463 #-------------------------- End of common section -----------------------------