Re: Edit selected/hilighted text



Hi Michelle,

Michelle Konzack <linux4michelle freenet de> wrote:
if I am in 'mcedit' and edit a text, I like to select a text
and sned it via STDIN into a command and past the output
(STDOUT) into the selection.

Exactly I want to remplace the selection.

How is this possibel ?

If you don't need an spell checker then you can solve it this way:

- first create this file
touch ~/.mc/cedit/edit.spell.rc
chmod 700 ~/.mc/cedit/edit.spell.rc
- edit this file to do the stuff you like
- the selected text you can read from ~/.mc/cedit/cooledit.block
- after your commands finished put the replacement for the
selected text back into the file ~/.mc/cedit/cooledit.block
- select text in mcedit and press M-$

e.g. 

--- edit.spell.rc -----------------------------------------
#! /bin/sh
# converts selected text in mcedit with upper case chars
BLOCK=`cat ~/.mc/cedit/cooledit.block`
echo ${BLOCK} | tr 'a-z' 'A-Z' > ~/.mc/cedit/cooledit.block
------------------------------------------------------------

With this sample rc file you can convert the selected text in upper
case chars.

regards
Frank
-- 
echo '23dd4-+dn10-P18+d4+d14+PPP[]pq'|dc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]