New key codes to stylecode selection
This commit is contained in:
parent
cdcef282fc
commit
b47bb3f0cd
@ -764,16 +764,26 @@ Here is a small "ruler" for the actual definitions below:
|
||||
Ins Toggle insert mode
|
||||
Del Delete character at the cursor position
|
||||
BackSpace Delete character to the left of the cursor
|
||||
Tab Add spaces to the next tab-stop
|
||||
Alt-BackSpace Undo step-by-step
|
||||
Tab Insert spaces to the next tab-stop
|
||||
Alt-K, Alt-Y Delete from cursor position to end of line
|
||||
C-BckSp C-F5 Delete the word to the left of the cursor
|
||||
Ctrl-T,Ctrl-F6 Delete the word to the right of the cursor
|
||||
Alt-Z Remove quoted lines from cursor position to bottom.
|
||||
F4 Duplicates the current line
|
||||
Alt-D, Ctrl-Y Delete the current line. (Move to Killbuffer)
|
||||
Ctrl-U Undelete previously deleted lines
|
||||
Alt-F5 Clear Killbuffer.
|
||||
Alt-T Insert the string "[...skipped...]" into cursor position.
|
||||
Alt-1 Change cursor character to uppercase
|
||||
Alt-2 Change cursor character to lowercase
|
||||
Alt-3 Toggle case of the cursor character
|
||||
Alt-B Remove left trailing spaces for current line
|
||||
Ctrl-N Set stylecode to normal font face
|
||||
Ctrl-B Set stylecode to bold font face
|
||||
Ctrl-I Set stylecode to italic font face
|
||||
Ctrl-L Set stylecode to underline font face
|
||||
Ctrl-R Set stylecode to inverce font face
|
||||
*P
|
||||
|
||||
Internal Editor Block commands:
|
||||
|
@ -1281,21 +1281,23 @@ H
|
||||
Del “¤ «¥¨¥ ᨬ¢®« ¯®§¨æ¨¨ ªãpá®p
|
||||
BackSpace “¤ «¥¨¥ ᨬ¢®« á«¥¢ ®â ¯®§¨æ¨¨ ªãpá®p
|
||||
Alt-BackSpace <20>®á«¥¤®¢ ⥫ì ï ®â¬¥ ᤥ« ëå ¨§¬¥¥¨©
|
||||
Tab <20>ст ЂЈть ЏрЎЁЅЋы ЄЎ сЋЅЄующЅЉ ЏЎЇЈцЈЈ т ЁуЋяцЈЈ
|
||||
Alt-K, Alt-Y “¤ «¥¨¥ ⥪á⠮⠪ãpá®p ¨ ¤® ª®æ áâp®ª¨
|
||||
Ctrl-K “¤ «¥¨¥ ⥪á⠮⠪ãpá®p ª ç «ã áâp®ª¨
|
||||
Ct-F5, C-BaSp “¤ «¥¨¥ ل«®¢ ل«¥¢ ®â ھمpل®p
|
||||
Ctrl-F6 “¤ «¥¨¥ ل«®¢ ل¯p ¢ ®â ھمpل®p
|
||||
C-F5, C-BckSp <20>Є ЋЅЈЅ сЋЎЂ сЋЅЂ Ўт ЊуpсЎp
|
||||
Ctrl-F6,Ctrl-T <20>Є ЋЅЈЅ сЋЎЂ сЏp Ђ Ўт ЊуpсЎp
|
||||
Alt-Z “¤ «¥¨¥ áâp®ª æ¨â¨p®¢ ¨ï ®â ªãpá®p ¨ ¨¦¥
|
||||
F4 “¤¢ ¨¢ ¨¥ áâp®ª¨
|
||||
Ctrl-Y “¤ «¥¨¥ â¥ھم饩 لâp®ھ¨ ¢ ،من¥p ¢p¥¬¥. هp ¥¨ï p¥¤ ھâ®p
|
||||
Ctrl-U ‚لâ ¢ھ لâp®ھ¨ ¨§ ،من¥p ¢p¥¬¥®£® هp ¥¨ï p¥¤ ھâ®p
|
||||
Ctrl-Y, Alt-D <20>Є ЋЅЈЅ тЅЊущЅЉ стpЎЊЈ Ђ ЁуфЅp ЂpЅЌ. хp ЅЈя pЅЄ ЊтЎp
|
||||
Ctrl-U <EFBFBD>ст ЂЊ ЎчЅрЅЄЎЉ стpЎЊЈ ЈЇ ЁуфЅp ЂpЅЌ. хp ЅЈя pЅЄ ЊтЎp
|
||||
Alt-F5 Žç¨á⪠¡ãä¥p ¢p¥¬¥®£® åp ¥¨ï p¥¤ ªâ®p
|
||||
Ctrl-T ‚لâ ¢ھ نp §ë [...skipped...]
|
||||
Alt-T <20>ст ЂЊ фp Їы [...skipped...]
|
||||
Alt-1 ‘¬¥ ᨬ¢®« ¯®¤ ªãpá®p®¬ ¢ ¢¥p娩 p¥£¨áâp
|
||||
Alt-2 ‘¬¥ ᨬ¢®« ¯®¤ ªãpá®p®¬ ¢ ¨¦¨© p¥£¨áâp
|
||||
Alt-3 <20>¥p¥ª«î票¥ p¥£¨áâp ᨬ¢®«
|
||||
Alt-B ‘¬¥áâ¨âì ⥪áâ ⥪ã饩 áâp®ª¨ ¢ ç «® áâp®ª¨
|
||||
Ctrl-"¬¨ãá" <20>®á¨¬¢®«ì®¥ ª®¯¨p®¢ ¨¥ ⥪áâ ¨§ ¯p¥¤ë¤ã饩 áâp®ª¨
|
||||
|
||||
*P
|
||||
|
||||
Š®¬ ¤ë p ¡®âë á ¡«®ª ¬¨:
|
||||
|
@ -175,27 +175,33 @@ F3 EDITimporttext
|
||||
F8 EDITloadfile
|
||||
@L EDITlookupcursor
|
||||
#F10 EDITlookupdest
|
||||
F10 EDITlookuporig
|
||||
Enter EDITnewline
|
||||
@P EDITpaste
|
||||
F10 EDITlookuporig ; Lokup originate address in the nodelist
|
||||
Enter EDITnewline ; Start new line (insert a newline char)
|
||||
@P EDITpaste ; Paste text from clipboard
|
||||
#Ins EDITpaste
|
||||
^Q EDITquitnow
|
||||
@B EDITreflow
|
||||
F7 EDITsavefile
|
||||
@S EDITsavemsg
|
||||
^Z EDITsavemsg
|
||||
F2 EDITsavemsg
|
||||
F7 EDITsavefile ; Save a message to text file, send to
|
||||
; printer or put into clipboard.
|
||||
@S EDITsavemsg ; Save a message to messagebase.
|
||||
^Z EDITsavemsg ; Save a message to messagebase.
|
||||
F2 EDITsavemsg ; Save a message to messagebase.
|
||||
; EDITsoundkill
|
||||
F9 EDITspellcheck
|
||||
Tab EDITtab
|
||||
Tab EDITtab ; Insert a "horisontal tab" char
|
||||
#Tab EDITtabreverse
|
||||
@3 EDITtogglecase
|
||||
Ins EDITtoggleinsert
|
||||
@2 EDITtolower
|
||||
@1 EDITtoupper
|
||||
@3 EDITtogglecase ; Toggle case of the char
|
||||
Ins EDITtoggleinsert ; Toggle insert/replace editing mode
|
||||
@2 EDITtolower ; Change char to lower case
|
||||
@1 EDITtoupper ; Change char to upper case
|
||||
^U EDITundelete
|
||||
@BackSpace EDITundo
|
||||
@Z EDITzapquotebelow
|
||||
^N EditSCodeNormal ; Set stylecode to normal font face
|
||||
^B EditSCodeBold ; Set stylecode to bold font face
|
||||
^I EditSCodeItalic ; Set stylecode to italic font face
|
||||
^L EditSCodeUnderline ; Set stylecode to underline font face
|
||||
^R EditSCodeReverse ; Set stylecode to inverce font face
|
||||
|
||||
|
||||
; ------------------------------------------------------------------
|
||||
@ -542,4 +548,7 @@ F10 HEADERaddressbook
|
||||
;F11 EDITmacro ":-)"
|
||||
;^F11 EDITmacro ":-("
|
||||
|
||||
; Insert string "[...skipped...]"
|
||||
@T EditMacro "[...skipped...]"
|
||||
|
||||
; ------------------------------------------------------------------
|
||||
|
@ -88,7 +88,7 @@ BackSpace EditDelLeft
|
||||
^F5 EditDelLtWord ; “¤ «¥¨¥ á«®¢ á«¥¢ ®â ªãàá®à .
|
||||
^BackSpace EditDelLtWord ; “¤ «¥¨¥ á«®¢ á«¥¢ ®â ªãàá®à .
|
||||
^F6 EditDelRtWord ; “¤ «¥¨¥ á«®¢ á¯à ¢ ®â ªãàá®à .
|
||||
;^T EditDelRtWord ; <20>λ«® -> “¤ «¥¨¥ α«®Ά α―ΰ Ά ®β <20>γΰα®ΰ ; <20>®¬γ ¨β¥p¥α®: ᥩη α ―¥p¥®―p¥¤¥«¥® ¬ <C2AC>p®α ¤«ο Άαβ Ά<C2A0>¨ δp §λ [...skipped...]!
|
||||
^T EditDelRtWord ; “¤ «¥¨¥ á«®¢ á¯à ¢ ®â ªãàá®à
|
||||
@O EditDosShell
|
||||
F4 EditDupLine
|
||||
@W EditExportText
|
||||
@ -147,6 +147,11 @@ Ins EditToggleInsert
|
||||
#Right EditBlockRight
|
||||
@0 EditSoundKill ; <20>४à â¨âì ¢®á¯à®¨§¢¥¤¥¨¥ §¢ãª®¢®£® ä ©« .
|
||||
@N EditExitMsg ; H¥¬¥¤«¥®¥ ¯p¥ªp 饨¥ p¥¤ ªâ¨p®¢ ¨ï ¡¥§ á®åp ¥¨ï
|
||||
^N EditSCodeNormal ; ‚ë¡à âì ०¨¬ ¯à®á⮣® èà¨äâ
|
||||
^B EditSCodeBold ; ‚ë¡à âì ०¨¬ ¦¨à®£® èà¨äâ
|
||||
^I EditSCodeItalic ; ‚ë¡à âì ०¨¬ ªãàᨢ
|
||||
^L EditSCodeUnderline ; ‚ë¡à âì ०¨¬ ¯®¤ç¥àªã⮣® èà¨äâ
|
||||
^R EditSCodeReverse ; ‚ë¡à âì ०¨¬ ¨¢¥àâ¨à®¢ ®£® èà¨äâ
|
||||
|
||||
; ------------------------------------------------------------------
|
||||
; Š<>Œ€H„› ‚›<E2809A><E280BA><EFBFBD>€ ”€‰‹<E280B0>‚
|
||||
|
@ -10,6 +10,13 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
+ New internal editor keys to stylecode insertions:
|
||||
^N EditSCodeNormal
|
||||
^B EditSCodeBold (*bold*)
|
||||
^I EditSCodeItalic (/italic/)
|
||||
^L EditSCodeUnderline (_underline_)
|
||||
^R EditSCodeReverse (#reverse#)
|
||||
(Patch from Ianos Gnatiuc 2:5030/830.17)
|
||||
|
||||
+ New config file token: AKAMatchManually (yes/no). If set to "yes" then manual
|
||||
selection of the AKA is forced.
|
||||
|
@ -141,6 +141,11 @@ CmdKey DefaultKeyset[] = {
|
||||
{ Key_S_Lft , KK_EditBlockLeft , KT_E },
|
||||
{ Key_S_Rgt , KK_EditBlockRight , KT_E },
|
||||
#endif
|
||||
{ Key_C_N , KK_EditSCodeNormal , KT_E },
|
||||
{ Key_C_B , KK_EditSCodeBold , KT_E },
|
||||
{ Key_C_I , KK_EditSCodeItalic , KT_E },
|
||||
{ Key_C_L , KK_EditSCodeUnderline , KT_E },
|
||||
{ Key_C_R , KK_EditSCodeReverse , KT_E },
|
||||
|
||||
{ Key_Esc , KK_FileAbort , KT_F },
|
||||
{ Key_A_X , KK_FileAskExit , KT_F },
|
||||
@ -521,6 +526,7 @@ tglobalkey globalkeys[] = {
|
||||
{ CRC_HEADERTOGGLELOCAL , KK_HeaderToggleLocal , KT_H }, // 0x47A1
|
||||
{ CRC_ADDRESSBOOKQUIT , KK_AddressbookQuit , KT_B }, // 0x47C7
|
||||
{ CRC_READCHANGEATTRS , KK_ReadChangeAttrs , KT_R }, // 0x47F8
|
||||
{ CRC_EDITSCODEITALIC , KK_EditSCodeItalic , KT_E }, // 0x487F
|
||||
{ CRC_READSEARCH , KK_ReadSearch , KT_R }, // 0x48EF
|
||||
{ CRC_READMSGPGDN , KK_ReadMsgPgDn , KT_R }, // 0x4908
|
||||
{ CRC_READSTRIPHTML , KK_ReadStripHTML , KT_R }, // 0x499A
|
||||
@ -615,6 +621,7 @@ tglobalkey globalkeys[] = {
|
||||
{ CRC_HEADERLOOKUP , KK_HeaderLookup , KT_H }, // 0x64F2
|
||||
{ CRC_AREAGOTOPREV , KK_AreaGotoPrev , KT_A }, // 0x6534
|
||||
{ CRC_EDITDELLEFT , KK_EditDelLeft , KT_E }, // 0x6552
|
||||
{ CRC_EDITSCODEBOLD , KK_EditSCodeBold , KT_E }, // 0x657D
|
||||
{ CRC_EDITSAVEMSG , KK_EditSaveMsg , KT_E }, // 0x660C
|
||||
{ CRC_K_CGMUL , Key_C_StrG , 0 }, // 0x66CA
|
||||
{ CRC_NODESELECT , KK_NodeSelect , KT_N }, // 0x6A64
|
||||
@ -736,6 +743,7 @@ tglobalkey globalkeys[] = {
|
||||
#if !defined(__UNIX__) || defined(__USE_NCURSES__)
|
||||
{ CRC_K_SHOME , Key_S_Home , 0 }, // 0xAF9D
|
||||
#endif
|
||||
{ CRC_EDITSCODEUNDERLINE , KK_EditSCodeUnderline , KT_E }, // 0xB1D9
|
||||
{ CRC_READTOGGLEQUOTE , KK_ReadToggleQuote , KT_R }, // 0xB293
|
||||
{ CRC_EDITUNDO , KK_EditUndo , KT_E }, // 0xB295
|
||||
{ CRC_READDIRQUOTEMSG , KK_ReadDirQuoteMsg , KT_R }, // 0xB351
|
||||
@ -808,6 +816,7 @@ tglobalkey globalkeys[] = {
|
||||
{ CRC_EDITSPELLCHECK , KK_EditSpellCheck , KT_E }, // 0xE167
|
||||
{ CRC_AREASCAN , KK_AreaScan , KT_A }, // 0xE440
|
||||
{ CRC_EDITGOWORDLEFT , KK_EditGoWordLeft , KT_E }, // 0xE48C
|
||||
{ CRC_EDITSCODENORMAL , KK_EditSCodeNormal , KT_E }, // 0xE4CE
|
||||
{ CRC_READMOVECOMMENTMSG , KK_ReadMoveCommentMsg , KT_R }, // 0xE4E7
|
||||
{ CRC_READGOTOREPLY1ST , KK_ReadGotoReply1st , KT_R }, // 0xE54F
|
||||
{ CRC_READTOGGLEHEXDUMP , KK_ReadToggleHexdump , KT_R }, // 0xE6D5
|
||||
@ -845,6 +854,7 @@ tglobalkey globalkeys[] = {
|
||||
{ CRC_READCHANGEMSG , KK_ReadChangeMsg , KT_R }, // 0xF99F
|
||||
{ CRC_K_ABSPACE , Key_A_BS , 0 }, // 0xF9D7
|
||||
{ CRC_EDITCUT , KK_EditCut , KT_E }, // 0xFAE6
|
||||
{ CRC_EDITSCODEREVERSE , KK_EditSCodeReverse , KT_E }, // 0xFC0E
|
||||
{ CRC_K_CF9 , Key_C_F9 , 0 }, // 0xFD02
|
||||
{ CRC_K_CF8 , Key_C_F8 , 0 }, // 0xFD03
|
||||
{ CRC_K_CF3 , Key_C_F3 , 0 }, // 0xFD08
|
||||
|
@ -112,6 +112,11 @@ const word CRC_EDITQUITNOW = 0x80BA;
|
||||
const word CRC_EDITREFLOW = 0x13F9;
|
||||
const word CRC_EDITSAVEFILE = 0x64A4;
|
||||
const word CRC_EDITSAVEMSG = 0x660C;
|
||||
const word CRC_EDITSCODENORMAL = 0xE4CE;
|
||||
const word CRC_EDITSCODEBOLD = 0x657D;
|
||||
const word CRC_EDITSCODEITALIC = 0x487F;
|
||||
const word CRC_EDITSCODEUNDERLINE = 0xB1D9;
|
||||
const word CRC_EDITSCODEREVERSE = 0xFC0E;
|
||||
const word CRC_EDITSOUNDKILL = 0xA9A7;
|
||||
const word CRC_EDITSPELLCHECK = 0xE167;
|
||||
const word CRC_EDITTAB = 0x8C26;
|
||||
|
@ -2025,6 +2025,86 @@ void IEclass::ToggleCase() {
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void IEclass::SCodeChange(gkey key)
|
||||
{
|
||||
GFTRK("EditSCodeChange");
|
||||
|
||||
char _ch = ' ';
|
||||
switch (key)
|
||||
{
|
||||
case KK_EditSCodeBold: _ch = '*'; break;
|
||||
case KK_EditSCodeUnderline: _ch = '_'; break;
|
||||
case KK_EditSCodeItalic: _ch = '/'; break;
|
||||
case KK_EditSCodeReverse: _ch = '#'; break;
|
||||
}
|
||||
|
||||
if (strchr(CFG->stylecodepunct, currline->txt[col]))
|
||||
{
|
||||
if (col && !strchr(CFG->stylecodepunct, currline->txt[col-1]))
|
||||
GoLeft();
|
||||
else if (!strchr(CFG->stylecodepunct, currline->txt[col+1]))
|
||||
GoRight();
|
||||
else
|
||||
{
|
||||
if (isspace(currline->txt[col]) && (key != KK_EditSCodeNormal))
|
||||
{
|
||||
if ((col > 0) && !isspace(currline->txt[col-1]))
|
||||
insertchar(' ');
|
||||
|
||||
insertchar(_ch);
|
||||
insertchar(_ch);
|
||||
GoLeft();
|
||||
}
|
||||
|
||||
GFTRK(NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
uint beg = col;
|
||||
uint end = col;
|
||||
|
||||
while ((beg > 0) && !strchr(CFG->stylecodepunct, currline->txt[beg-1]))
|
||||
beg--;
|
||||
while (!strchr(CFG->stylecodepunct, currline->txt[end+1]))
|
||||
end++;
|
||||
|
||||
bool replace = false;
|
||||
char c1 = currline->txt[beg];
|
||||
char c2 = currline->txt[end];
|
||||
|
||||
if ((_ch == c1) && (c1 == c2))
|
||||
{
|
||||
GFTRK(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_ch != c1) && (c1 == c2) &&
|
||||
((c1 == '*') || (c1 == '/') || (c1 == '_') || (c1 == '#')))
|
||||
replace = true;
|
||||
|
||||
|
||||
while ((col > 0) && !strchr(CFG->stylecodepunct, currline->txt[col-1]))
|
||||
GoLeft();
|
||||
|
||||
if (replace) DelChar();
|
||||
if (_ch != ' ') insertchar(_ch);
|
||||
|
||||
while (!strchr(CFG->stylecodepunct, currline->txt[col+1]))
|
||||
GoRight();
|
||||
|
||||
if (replace) DelChar();
|
||||
else GoRight();
|
||||
if (_ch != ' ') insertchar(_ch);
|
||||
|
||||
GoLeft();
|
||||
|
||||
GFTRK(NULL);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void IEclass::LookupCursor() {
|
||||
@ -2249,6 +2329,11 @@ noselecting:
|
||||
case KK_EditUnDelete: UnDelete(); break;
|
||||
case KK_EditUndo: Undo->PlayItem(); break;
|
||||
case KK_EditZapQuoteBelow: ZapQuoteBelow(); break;
|
||||
case KK_EditSCodeNormal:
|
||||
case KK_EditSCodeBold:
|
||||
case KK_EditSCodeItalic:
|
||||
case KK_EditSCodeUnderline:
|
||||
case KK_EditSCodeReverse: SCodeChange(__key); break;
|
||||
|
||||
// Block functions
|
||||
case KK_EditAnchor: BlockAnchor(); break;
|
||||
|
@ -399,6 +399,7 @@ public:
|
||||
void SpellCheck ();
|
||||
void Tab ();
|
||||
void ToggleCase ();
|
||||
void SCodeChange(gkey key);
|
||||
void ToggleInsert ();
|
||||
void ToLower ();
|
||||
void ToUpper ();
|
||||
|
@ -174,6 +174,11 @@ const gkey KK_EditBlockPgUp = 0xFF02;
|
||||
const gkey KK_EditDelete = 0xFF03;
|
||||
const gkey KK_EditUndo = 0xFF04;
|
||||
const gkey KK_EditDeleteSOL = 0xFF05;
|
||||
const gkey KK_EditSCodeNormal = 0xFF08;
|
||||
const gkey KK_EditSCodeBold = 0xFF09;
|
||||
const gkey KK_EditSCodeItalic = 0xFF0A;
|
||||
const gkey KK_EditSCodeUnderline = 0xFF0B;
|
||||
const gkey KK_EditSCodeReverse = 0xFF0C;
|
||||
|
||||
const gkey KK_FileAbort = 0xFF10;
|
||||
const gkey KK_FileAskExit = 0xFF11;
|
||||
|
Reference in New Issue
Block a user