Ticket #323: 0001-changed-mcedit.1.in.patch

File 0001-changed-mcedit.1.in.patch, 4.0 KB (added by angel_il, 8 years ago)

man

  • doc/man/mcedit.1.in

    From 0664f1615e26f57292986d0dc5a00956f0dce744 Mon Sep 17 00:00:00 2001
    From: Ilia Maslakov <il.smind@gmail.com>
    Date: Fri, 28 Jan 2011 11:59:18 +0300
    Subject: [PATCH] changed mcedit.1.in
    
    Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
    ---
     doc/man/mcedit.1.in |  129 ++++++++++++++++++++++++++++++++++++++++-----------
     1 files changed, 102 insertions(+), 27 deletions(-)
    
    diff --git a/doc/man/mcedit.1.in b/doc/man/mcedit.1.in
    index 62a9912..ad28cb5 100644
    a b or 
    9797.BR "Escape Tab" ) 
    9898completes the word under the cursor using the words used earlier in the 
    9999file. 
     100.SH MACRO 
    100101.PP 
    101102To define a macro, press 
    102103.B Ctrl\-R 
    103104and then type out the keys you want to be executed.  Press 
    104105.B Ctrl\-R 
    105 again when finished.  You can then assign the macro to any key you like 
    106 by pressing that key.  The macro is executed when you press 
    107 .B Ctrl\-A 
    108 and then the assigned key.  The macro is also executed if you press 
    109 Meta, Ctrl, or Esc and the assigned key, provided that the key is not 
    110 used for any other function.  The macro commands are stored in the file 
    111 .BR ~/.local/share/mc/mcedit/mcedit.macros . 
    112 Do NOT edit this file if you are going to use macros again in the same 
    113 editing session, because 
    114 .B mcedit 
    115 caches macro key defines in memory. 
    116 .B mcedit 
    117 now overwrites a macro if a macro with the same key already exists, 
    118 so you won't have to edit this file. You will also have to restart 
    119 other running editors for macros to take effect. 
    120 .P 
    121 .B F19 
    122 will format C, C++, Java or HTML code when it is highlighted.  An executable 
    123 file called 
    124 .B ~/.local/share/mc/mcedit/edit.indent.rc 
    125 will be created for you from the default template.  Feel free to edit it 
    126 if you need. 
    127 .PP 
    128 .B C\-p 
    129 will run ispell on a block of text in a similar way.  The script file 
    130 will be called 
    131 .BR ~/.local/share/mc/mcedit/edit.spell.rc . 
     106again when finished.  The macro can be assigned to any key by pressing that key. 
     107The macro is executed when you press the assigned key. 
     108.PP 
     109The macro commands are stored in section 
     110.B [editor] 
     111it the file 
     112.BR ~/.local/share/macros.mc . 
     113.PP 
     114External scripts (filters) can be assigned into the any hotkey by edit 
     115.B macros.mc 
     116like following: 
     117.PP 
     118.nf 
     119[editor] 
     120ctrl\-W=EditPipeBlock:25; 
     121.fi 
     122.PP 
     123This means that ctrl\-W hotkey initiates the 
     124.I EditPipeBlock(25) 
     125action, next the editor handler translates this into execution of 
     126.B ~/.local/share/mc/mcedit/macros.d/macro.25.sh 
     127shell script. 
     128.PP 
     129External scripts stored into 
     130.B ~/.local/share/mc/mcedit/macros.d/ 
     131directory and must named 
     132.B macro.XXXX.sh 
     133where 
     134.B XXXX 
     135is the number from 0 to 9999. 
     136See 
     137.B Menu File Edit 
     138for more detail about format of the script. 
     139.PP 
     140Next macro definition can be used: 
     141.TP 
     142.I %c 
     143The cursor column position number. 
     144.TP 
     145.I %i 
     146The indent of blank space, equal the cursor column. 
     147.TP 
     148.I %y 
     149The syntax type of current file. 
     150.TP 
     151.I %b 
     152The block file name. 
     153.TP 
     154.I %f 
     155The current file name. 
     156.TP 
     157.I %n 
     158Only the current file name without extension. 
     159.TP 
     160.I %x 
     161The extension of current file name. 
     162.TP 
     163.I %d 
     164The current directory name. 
     165.TP 
     166.I %F 
     167The current file in the unselected panel. 
     168.TP 
     169.I %D 
     170The directory name of the unselected panel. 
     171.TP 
     172.I %t 
     173The currently tagged files. 
     174.TP 
     175.I %T 
     176The tagged files in the unselected panel. 
     177.TP 
     178.I %u 
     179and 
     180.I %U 
     181Similar to the 
     182.I %t 
     183and 
     184.I %T 
     185macros, but in addition the files are untagged. You can use this macro 
     186only once per menu file entry or extension file entry, because next time 
     187there will be no tagged files. 
     188.TP 
     189.I %s 
     190and 
     191.I %S 
     192The selected files: The tagged files if there are any. Otherwise the 
     193current file. 
     194.PP 
     195Feel free to edit this files, if you need. 
     196Here is a sample external script: 
     197.PP 
     198.nf 
     199l       comment selection 
     200        TMPFILE=`mktemp ${MC_TMPDIR:\-/tmp}/up.XXXXXX` || exit 1 
     201        echo #if 0 > $TMPFILE 
     202        cat %b >> $TMPFILE 
     203        echo #endif >> $TMPFILE 
     204        cat $TMPFILE > %b 
     205        rm \-f $TMPFILE 
     206.fi 
    132207.PP 
    133208If some keys don't work, you can use 
    134209.B Learn Keys