⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wordstar.cfg

📁 一个开源著名的TDE编辑器源代码
💻 CFG
字号:
; WORDSTAR.CFG - configures TDE to emulate the keymap of WordStar 4.0.
; Version 1.1 (2005-01-24) - refines an earlier version of this config file
; Version 1.3 (2005-07-11) - adds missing WS commands (^KM,^QP,^QV), 3 new
; commands (^QM,^OM,^OX) to the keymap, improves WS emulation on several
; commands.
;
; To install:
;
;   1. EDIT THE PATH TO THE HELP FILE. Look for "config/wordstar.txt"
;      near the end of this file and edit the path to match your location.
;
;   2. MAKE TDE FIND THIS CONFIG FILE. There are 2 ways to do this:
;      (1) Use the i switch: "tde -i \path\to\wordstar.cfg ...". Or,
;      (2) Put the original "tde.cfg" in a different directory; rename this
;      file to "tde.cfg" and put it in the same directory as "tde.exe".
;
;   3. Syntax highlighting also makes use of ^K3, ^KF and ^KB - keep control
;      pressed to use the WordStar function, release it for the language.
;
; ALT-5 will show an internal help menu of WordStar commands in TDE. Most of
; my changes restored two-key commands for ^K (block), ^O (onscreen) and
; ^Q (quick) menus. A few single-key commands were changed to their WordStar
; defaults.
;
; -- Eric Pement


c+k           TwoCharKey
c+l           RepeatFindForward
c+o           TwoCharKey
c+q           TwoCharKey
c+u           RestoreLine

;===========================================
; WordStar 4.0 two-key combinations
;
; Note especially that in classic WordStar, ^KA = ^K^A, ^OB = ^O^B, and
; so forth. Therefore, every dual-key assignment actually has two keys
; that do the same thing! This is a waste of key assignments, but it
; *is* the way that classic WordStar was written, plus it accommodates
; common typing errors.
;
; Certain WordStar key assignments had no corresponding commands in TDE
; (e.g., for WordStar "dot commands" or in hiding print commands), and
; in these cases I adopted the key assignments from VDE, a freeware
; WordStar work-alike by Eric Meyer.
;
; In WS classic mode, ^KI toggled insert-mode on and off for block moves.
; Depending on which state ^KI was in, a block move (^KV) would either
; push the old text to the side or overwrite the old text in a block move.
; Since TDE has ^KI and ^KU for block indent/undent, which is very mnemonic,
; I am assigning ^KZ for block-move-and-overwrite. Let Z stand for "zap".
;
; Customized by Eric Pement (eric.pement [at] moody.edu) on 2004-09-14.

; BLOCK MENU COMMANDS: Ctrl-K
c+k  1        SetMark1
c+k  2        SetMark2
c+k  ^c+3     SetMark3

c+k  ^c+b     Macro SetMark1 MarkStream
c+k  ^c       CopyBlock
c+k  ^d       File
c+k  ^e       SaveAs           ; In WS, was Rename-File. This is close.
c+k  ^c+f     Shell
c+k  ^h       UnmarkBlock
c+k  i        BlockIndentN     ; query for N spaces to indent (not WS cmd)
c+k  c+i      BlockIndent      ; use Indent setting to indent (not WS cmd)
;c+k ^j       Null             ; In WS, was Delete-File.
c+k  ^k       MarkEnd
c+k  ^l       DirList          ; In WS, was Change-Logged-Disk-Drive.
c+k  ^m       SumBlock
c+k  ^n       Macro SetMark1 MarkBox

c+k  ^o       ToggleReadOnly   ; as in VDE (WS was Copy-File).

c+k  ^p       PrintBlock       ; In WS, was Print-File (current or specified).
c+k  ^q       Quit
c+k  ^r       InsertFile
c+k  ^s       Save
c+k  u        BlockUndentN     ; query for N spaces to undent (not WS cmd)
c+k  c+u      BlockUndent      ; use Indent setting to undent (not WS cmd)
c+k  ^v       MoveBlock
c+k  ^w       BlockToFile
c+k  ^x       FileAll
c+k  ^y       DeleteBlock
c+k  ^z       OverlayBlock     ; Not an original WS command. Think of "zap"

c+k  quote    BlockUpperCase
c+k  '        BlockLowerCase


; ONSCREEN MENU COMMANDS: Ctrl-O
c+o  ^b       ToggleEol        ; In WS, ^OB toggled display of soft spaces.
c+o  ^c       Macro CenterJustify LineDown
;c+o ^d       Null             ; Print-Preview in VDE (show PrintCtrls in WS)
c+o  ^e       TopLine          ; as VDE (WS toggled soft-hyphen entry)
c+o  ^f       RightJustify     ; as VDE (WS set tabs and margins from File)

c+o  ^g       ToggleIndent     ; ^OG set a temporary indent in WS without
                               ; removing the left margin. This is close.
;c+o ^h       Null             ; In WS, ^OH toggled hyphen-help (for reformatting).
c+o  ^i       SetTabs
c+o  ^j       Macro UsesDialog SetMargins f1    ; Toggle justification
c+o  ^l       Macro UsesDialog SetMargins GotoMark1 Pause

c+o  ^m       CenterLine       ; Not an original WS cmd. ^OM will shift the
                               ; screen to put the line in the screen Middle.

c+o  ^n       ToggleSmartTabs  ; ^ON was Clear-Variable-Tab-Stop in WS. This
                               ; alternates between Fixed and Smart tabs.

;c+o ^o       Null             ; First-Line-Indent in VDE (embed .RR in WS)
;c+o ^p       Null             ; Set-Page-Length in VDE (Preview-Mode in WS)
c+o  ^r       Macro UsesDialog SetMargins GotoMark2 Pause
;c+o ^s       Null             ; was Set-Line-Spacing in WordStar
c+o  ^t       ToggleRuler
c+o  ^v       ToggleTabInflate ; In WS, ^OV toggled variable tabs ON/OFF.

c+o  ^w       ToggleWordWrap   ; In WS, ^OW toggled wordwrap ON/OFF. In TDE,
                               ; it toggles Fixed Wrap/Dynamic Wrap/OFF.

                               ; Not an original WS command. In WS4, ^OX
c+o  ^x       BottomLine       ; toggled margin release ON/OFF. This moves
                               ; the line to the bottom of screen.

c+o  Center   CenterLine

; QUICK MENU COMMANDS: Ctrl-Q
c+q  1        GotoMark1
c+q  2        GotoMark2
c+q  3        GotoMark3
;c+q ?        Null             ; In WS, ^Q? gave char count from TOF to cursor
;c+q ?        Macro ToggleCRLF ToggleCRLF Pause ToggleCRLF ; assuming CRLF

c+q  ^a       ReplaceString
c+q  ^b       BlockBegin
c+q  ^c       Macro JumpToPosition "-1:0" ;Rturn BottomLine
c+q  ^d       EndOfLine
c+q  ^e       TopOfScreen
c+q  ^f       FindForward
c+q  ^g       ISearchForward   ; In WS, go immediately fwd to the next char
c+q  ^h       ISearchBackward  ; In WS, go immediately bkwd to the next char
c+q  ^i       JumpToPosition
c+q  ^k       BlockEnd
;c+q ^l       Null             ; In WS, run spellcheck to EOF

                               ; Not an original WS command. Did invoke a
c+q  ^m       CenterWindow     ; calculator (Quick-Math). Added to complement
                               ; for ^QE (top of win) and ^QX (bot of win).

;c+q ^n       Null             ; In WS, spellcheck the next word at cursor
;c+q ^o       Null             ; In WS, spellcheck any word (prompt follows)
c+q  ^p       PreviousPosition
c+q  ^q       Repeat
c+q  ^r       Macro JumpToPosition "1:1"
c+q  ^s       StartOfLine

; In WS, ^QT prompted for a character and then deleted everything fwd
; from the cursor location to the specified character. If the character
; was not found between the cursor and the EOF, WordStar would beep and
; do nothing. If you entered ^Z, WordStar would delete to the EOF.

c+q  ^t       Macro UsesBlock NoWrap MarkStream FindForward Pause MarkStream DeleteBlock

c+q  ^u       BlockStripHiBit  ; In WS, reformat to EOF if in document mode, or
                               ; strip all high-bits if in nondocument mode.

c+q  ^v       GotoMark1        ; In WS, moVe cursor to last find/repl or block op

; ^QW and ^QZ were WordStar commands that repeatedly invoked ^W or ^Z,
; to repeately call Ctrl-W or Ctrl-Z, thus slowly paging through the
; file. However, the TDE macros run too fast and I know of no way to
; add a delay to the macro. So I am temporarily REMARKING these
; commands out of the list.

; c+q  ^w       Macro ScrollUpLine PlayBack
; c+q  ^z       Macro ScrollDnLine Playback

c+q  ^x       BotOfScreen
c+q  ^y       DelEndOfLine
c+q  Del      EraseBegOfLine
;
; END of WordStar two-key combinations
; ---
; Additional customizations for embedded help
;
;   The location of WORDSTAR.TXT is hard-coded into the macro below.
;   Edit the path to reflect the location of this file on your system.
;
a+5        Macro  MakeHalfHorizontal EditFile "config/wordstar.txt"
a+6        Macro  NextWindow   ZoomWindow
a+7        Macro  Quit         NextWindow  ZoomWindow
UserMenu   "TDE_WS Help" a+5


Backups                 On              ; Off or On - WS default is "on"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -