home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / FT301O.ZIP / EDIT.FT < prev    next >
Text File  |  1991-03-14  |  5KB  |  123 lines

  1. ;-------------------- FIND TEXT EDITOR DEFINITIONS ------------------------
  2. ;
  3. ; This file contains information used by Find Text to run editors and
  4. ; position the cursor within the document being edited.
  5. ;
  6. ; !! IMPORTANT: This file must be in the same directory as ft.exe and
  7. ;               ft.exe must be on the PATH.
  8. ;
  9. ; !! IMPORTANT: most of the editor definitions supplied require the use
  10. ;               of the utility UKON.COM to position the cursor.  Make
  11. ;               sure to run Ukon before Find Text for correct operation.
  12. ;               Ukon will typically be run from autoexec.bat (the OS/2
  13. ;                     version does not require ukon).
  14. ;
  15. ; Blank lines and lines beginning with ';' in this file are ignored by
  16. ; Find Text.
  17. ;
  18. ; An Editor Definition is 1 line of the form:
  19. ;
  20. ;  <menu name>^<editor>^<keystrokes>
  21. ;
  22. ;  The character ^ is used to seperate these three parameters.
  23. ;
  24. ;  <menu name>  The name that will appear in the editor selection window.
  25. ;  <editor>         The executable name of the editor.  It may be a batch file.
  26. ;    <keystrokes> This parameter is optional, containing keystrokes to stuff
  27. ;
  28. ;  Within <editor> and <keystrokes>, the following string replacements
  29. ;  will be made:
  30. ;
  31. ;     %%            becomes        %
  32. ;        %f            becomes        name of file         (like 'c:\doc\hello.doc')
  33. ;        %t            becmoes        search text            (like 'void')
  34. ;     %l            becomes        line # of hit        (like '235')    (1 based)
  35. ;        %h            becomes        hit #                    (like '7')        (1 based)
  36. ;        %o            becomes        offset of hit        (like '23424')    (0 based)
  37. ;
  38. ;    The additional string replacements that may be specified in Find Text
  39. ;  reports (see Find Text help) may also be used, but they are of limited
  40. ;    value here.
  41. ;
  42. ;    The <keystrokes> parameter specifies keys to be "stuffed" into the
  43. ;  editor when it is run.  The point being to fool the editor into thinking
  44. ;  you are pressing keystrokes to find a hit.  There are three common
  45. ;  ways of doing this:
  46. ;
  47. ;        GO DIRECTLY TO LINE THEN SEARCH        <- BEST
  48. ;        MULTIPLE SEARCHES                            <- OK
  49. ;        GO TO LINE USING DOWN ARROWS            <- LAST RESORT
  50. ;
  51. ;    If the editor in question has the ability to position from the command
  52. ;    line (like Brief), you can bypass keystroke stuffing altogether.
  53. ;
  54. ;    The <keystroke> parameter is a string of characters.  It may contain
  55. ;  ASCII characters, keyboard scan codes, repeats and pauses.  It is best
  56. ;  illustrated through an example:
  57. ;
  58. ;    'hello{bye(36)}3{(.p)}100(0,59)'
  59. ;
  60. ;    This string will produce: 'hellobyejbyejbyej<F1>'
  61. ;
  62. ;    (36)            is ASCII for 'j'
  63. ;    {...}n         is used to repeat ... n times
  64. ;  (0,59)        is the ASCII/scan code pair for <F1>
  65. ;    {(.p)}100    is used to "play dead" 100 times.  Many editors will try and
  66. ;                    clear the keyboard buffer, not realizing you are intentionally
  67. ;                    stuffing characters.  In addition, it is usually insufficient
  68. ;                    to play dead once, but 100 1,000 or even 10,000 times may be
  69. ;                    required.
  70. ;
  71. ;    Specifically, <keystrokes> may be made up of:
  72. ;        ASCII    characters
  73. ;        (0..255)        representing ASCII character
  74. ;        (key,scan)    representing an ASCII scan code pair
  75. ;        (.p)            pause (pretend keyboard buffer is empty)
  76. ;        {...}n        repeat ... n times (max of 15,000)
  77. ;        use  (40) for '('
  78. ;        use (123) for '{'
  79. ;
  80. ; !! IMPORTANT: The supplied utility GK.EXE may be run for determining
  81. ;                     ASCII and scan codes.
  82. ;
  83. ;--------------------------- EXAMPLE DEFINITION -----------------------
  84. ;Taken from below, the editor definition for Turbo Pascal is:
  85. ;
  86. ;    Turbo Pascal^turbo %f^(0,132){(17,16)f%t(13,28)u(13,28)}%h
  87. ;
  88. ;With the third hit in win.pas searching for 'win_close', this will become:
  89. ;
  90. ;    Turbo Pascal^turbo win.pas^(0,132){(17,16)fwin_close(13,28)u(13,28)}3
  91. ;
  92. ;When Turbo Pascal is selected from the editor selection window the
  93. ;command:
  94. ;
  95. ;        turbo win.pas
  96. ;
  97. ;will be run.
  98. ;
  99. ;Before it is run, the keystrokes:
  100. ;
  101. ;        (0,132)     = Ctl-PgUp     = Tell Turbo Pascal to goto start of file
  102. ;    {    (17,16)f  = Ctl-Qf        = Tell Turbo Pascal to search
  103. ;        win_close = text to search for
  104. ;        (13,28)     = <enter>
  105. ;        u             = u                = Tell Turbo Pascal to ignore case
  106. ;        (13,28)     = <enter>
  107. ;    } 3             = do it all 3 times to position on the third occourence
  108. ;
  109. ;will be stuffed (if ukon.com is installed), to position the cursor within
  110. ;win.pas when it is edited by Turbo Pascal.
  111. ;
  112. ;----------------------------------------------------------------------
  113. ; !! IMPORTANT: The editor definitions follow.  Make sure you make a
  114. ;                     backup of this file before changing them.  You will probably
  115. ;                     want to place your favorite editor at the top of the list so
  116. ;               it is easier to pick when selecting an editor from within
  117. ;               Find Text.  You may also delete this documentation to speed
  118. ;               up the editor definition loading.
  119. ;----------------------------------------------------------------------
  120. Brief^b %f -m"goto_line %l" -m"search_fwd %t 0 0"
  121. System Editor^e %f
  122. OS/2 SHELL^cmd
  123.