home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
FT301O.ZIP
/
EDIT.FT
< prev
next >
Wrap
Text File
|
1991-03-14
|
5KB
|
123 lines
;-------------------- FIND TEXT EDITOR DEFINITIONS ------------------------
;
; This file contains information used by Find Text to run editors and
; position the cursor within the document being edited.
;
; !! IMPORTANT: This file must be in the same directory as ft.exe and
; ft.exe must be on the PATH.
;
; !! IMPORTANT: most of the editor definitions supplied require the use
; of the utility UKON.COM to position the cursor. Make
; sure to run Ukon before Find Text for correct operation.
; Ukon will typically be run from autoexec.bat (the OS/2
; version does not require ukon).
;
; Blank lines and lines beginning with ';' in this file are ignored by
; Find Text.
;
; An Editor Definition is 1 line of the form:
;
; <menu name>^<editor>^<keystrokes>
;
; The character ^ is used to seperate these three parameters.
;
; <menu name> The name that will appear in the editor selection window.
; <editor> The executable name of the editor. It may be a batch file.
; <keystrokes> This parameter is optional, containing keystrokes to stuff
;
; Within <editor> and <keystrokes>, the following string replacements
; will be made:
;
; %% becomes %
; %f becomes name of file (like 'c:\doc\hello.doc')
; %t becmoes search text (like 'void')
; %l becomes line # of hit (like '235') (1 based)
; %h becomes hit # (like '7') (1 based)
; %o becomes offset of hit (like '23424') (0 based)
;
; The additional string replacements that may be specified in Find Text
; reports (see Find Text help) may also be used, but they are of limited
; value here.
;
; The <keystrokes> parameter specifies keys to be "stuffed" into the
; editor when it is run. The point being to fool the editor into thinking
; you are pressing keystrokes to find a hit. There are three common
; ways of doing this:
;
; GO DIRECTLY TO LINE THEN SEARCH <- BEST
; MULTIPLE SEARCHES <- OK
; GO TO LINE USING DOWN ARROWS <- LAST RESORT
;
; If the editor in question has the ability to position from the command
; line (like Brief), you can bypass keystroke stuffing altogether.
;
; The <keystroke> parameter is a string of characters. It may contain
; ASCII characters, keyboard scan codes, repeats and pauses. It is best
; illustrated through an example:
;
; 'hello{bye(36)}3{(.p)}100(0,59)'
;
; This string will produce: 'hellobyejbyejbyej<F1>'
;
; (36) is ASCII for 'j'
; {...}n is used to repeat ... n times
; (0,59) is the ASCII/scan code pair for <F1>
; {(.p)}100 is used to "play dead" 100 times. Many editors will try and
; clear the keyboard buffer, not realizing you are intentionally
; stuffing characters. In addition, it is usually insufficient
; to play dead once, but 100 1,000 or even 10,000 times may be
; required.
;
; Specifically, <keystrokes> may be made up of:
; ASCII characters
; (0..255) representing ASCII character
; (key,scan) representing an ASCII scan code pair
; (.p) pause (pretend keyboard buffer is empty)
; {...}n repeat ... n times (max of 15,000)
; use (40) for '('
; use (123) for '{'
;
; !! IMPORTANT: The supplied utility GK.EXE may be run for determining
; ASCII and scan codes.
;
;--------------------------- EXAMPLE DEFINITION -----------------------
;Taken from below, the editor definition for Turbo Pascal is:
;
; Turbo Pascal^turbo %f^(0,132){(17,16)f%t(13,28)u(13,28)}%h
;
;With the third hit in win.pas searching for 'win_close', this will become:
;
; Turbo Pascal^turbo win.pas^(0,132){(17,16)fwin_close(13,28)u(13,28)}3
;
;When Turbo Pascal is selected from the editor selection window the
;command:
;
; turbo win.pas
;
;will be run.
;
;Before it is run, the keystrokes:
;
; (0,132) = Ctl-PgUp = Tell Turbo Pascal to goto start of file
; { (17,16)f = Ctl-Qf = Tell Turbo Pascal to search
; win_close = text to search for
; (13,28) = <enter>
; u = u = Tell Turbo Pascal to ignore case
; (13,28) = <enter>
; } 3 = do it all 3 times to position on the third occourence
;
;will be stuffed (if ukon.com is installed), to position the cursor within
;win.pas when it is edited by Turbo Pascal.
;
;----------------------------------------------------------------------
; !! IMPORTANT: The editor definitions follow. Make sure you make a
; backup of this file before changing them. You will probably
; want to place your favorite editor at the top of the list so
; it is easier to pick when selecting an editor from within
; Find Text. You may also delete this documentation to speed
; up the editor definition loading.
;----------------------------------------------------------------------
Brief^b %f -m"goto_line %l" -m"search_fwd %t 0 0"
System Editor^e %f
OS/2 SHELL^cmd