home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fed0217s.zip / obj / fed.ini < prev    next >
Text File  |  2001-11-07  |  28KB  |  824 lines

  1. //Module   :FED.INI
  2. //Abstract :Sample FED initialization file
  3. //
  4. //Copyright (C) Sergey I. Yevtushenko
  5. //
  6. //Log: Fri  27/03/1998 Created
  7. //     Mon  20/04/1998 Updated
  8. //     Tue  24/10/2000 Updated again (a lot of changes)
  9. //     Fri  01/12/2000 Updated to reflect changes in version 0.2.10
  10. //     Thu  07/12/2000 Some more comments, new file masks and others
  11.  
  12. //-------------------------------------------------------------------
  13. // NOTE!!!
  14. //
  15. // Back slash (\) character is an escape character!
  16. // Do not forget to add second back slash if you need
  17. // back slash character to be preserved during processing.
  18. // Escaping is done for REXX macroses and strings as well.
  19. //-------------------------------------------------------------------
  20.  
  21. //-------------------------------------------------------------------
  22. // NOTE:
  23. //
  24. // Read definition of kbInit and kbAltComma macro. They contain
  25. // environment and/or user-specific information.
  26. //-------------------------------------------------------------------
  27.  
  28. //For those who don't like to dig through regexp's :)
  29. //Note: all pattern searches here are case insensitive.
  30. //
  31. // Patterns below will match following files:
  32. //
  33. // CPP : *.c, *.h, *.cpp, *.hpp, *.cxx, *.hxx, *.cc, *.rc, fed.ini
  34. // REXX: *.cmd, *.frx, *.brk
  35. // ASM : *.asm
  36. // MAKE: makefile, makefile.*, *.mak, *.mak.*
  37. // HTML: *.htm, *.html, *.phtm, *.xhtm, *.shtm, *.phtml, *.xhtml, *.shtml
  38. // MAIL: *.bod, *.msg
  39. // PAS : *.bod, *.pas
  40. // PERL: *.pl, *.pm, *.ph, *.al, *.ix
  41. //
  42. // Each file may have additional extensions: .bak, .sav or extension from
  43. // any number of decimal digits, for example: .1, .05, etc.
  44. // All patterns are designed to match file name 'from tail', i.e.
  45. // checks are done in way which prevents intermediate matching patterns
  46. // to affect proper recognition.
  47. //
  48. // For example, folowing file will be recognized as CPP: one.file.in.c.sav
  49.  
  50.  
  51. editor.syntax   = "C++:\\.[ch](pp|xx)?(\\.(bak|sav|[0-9]+))?$;\n",
  52.                   "C++:\\.[cr]c(\\.(bak|sav|[0-9]+))?$;\n",
  53.                   "C++:^fed.ini(\\.(bak|sav|[0-9]+))?$\n",
  54.                   "REXX:\\.(cmd|frx|brk)(\\.(bak|sav|[0-9]+))?$\n",
  55.                   "ASM:\\.asm(\\.(bak|sav|[0-9]+))?$\n",
  56.                   "MAKE:^makefile(\\..*)?(\\.(bak|sav|[0-9]+))?$\n",
  57.                   "MAKE:\\.mak(\\..*)?(\\.(bak|sav|[0-9]+))?$\n",
  58.                   "HTML:\\.[pxs]?html?(\\.(bak|sav|[0-9]+))?$\n",
  59.                   "MAIL:\\.(bod|msg)(\\.(bak|sav|[0-9]+))?$\n",
  60.                   "PAS:\\.(int|pas)(\\.(bak|sav|[0-9]+))?$\n",
  61.                   "PERL:\\.(p[lmh]|al|ix)(\\.(bak|sav|[0-9]+))?$\n"
  62.  
  63. // Save syntax highlighting mode in EA?
  64. // 0 - never
  65. // 1 - only if manually set by user (see kbAltH and kbCtrlH below) (default)
  66. // 2 - always
  67.  
  68. editor.syntax.save.mode = 1
  69.  
  70. //Default file name for newly created file
  71.  
  72. editor.untitled = ".Untitled"
  73.  
  74. //Cursor shape for two modes (in precents from full hight).
  75.  
  76. cursor.shape.insert    = 20
  77. cursor.shape.overwrite = 60
  78.  
  79. //Mouse event mask
  80. //
  81. //MOTION                 0x01
  82. //MOTION_WITH_BN1_DOWN   0x02
  83. //BN1_DOWN               0x04
  84. //MOTION_WITH_BN2_DOWN   0x08
  85. //BN2_DOWN               0x10
  86. //MOTION_WITH_BN3_DOWN   0x20
  87. //BN3_DOWN               0x40
  88. //Default 0x06 = MOTION_WITH_BN1_DOWN | BN1_DOWN
  89.  
  90. mouse.event.mask = 0x06
  91.  
  92. //Enable (1 - default) or disable (0) checking of the state of Shift
  93. //key when processing mouse events
  94. //mouse.sense.shift = 1
  95.  
  96. //Enable (1 - default) or disable (0) reduction of file name in status line
  97. //editor.file.name.reduce = 1
  98.  
  99. editor.statusline = "(%p%%) L%4r:C%2c CHR(%xh,%3dd) [%h:%m:%u:%t:%30f]%w%l"
  100.  
  101. // 0 - die with message box (default if not specified)
  102. // 1 - die without messages, all changes are lost
  103. // 2 - die with saving all changes
  104. // 3 - ignore Ctrl-Break
  105.  
  106. editor.ctrlbreak.action = 2;
  107.  
  108. // 0 - DOS file format (CR/LF as a line separator) (default)
  109. // 1 - Unix file format (CR as a line separator)
  110. //editor.default.format = 0
  111.  
  112. //Obsolete
  113. //editor.force.pm
  114.  
  115. // 0 - Use Extended Attributes (EA) to
  116. //     store position, hiliting, codepage, etc. (default)
  117. // 1 - Do not use Extended Attributes
  118. //editor.no.ea = 0
  119.  
  120. // 0 - bottom of the screen (default)
  121. // 1 - top of the screen
  122. //editor.statuspos = 0
  123.  
  124. // Tab width (default - 4)
  125. //editor.tabwidth = 4
  126. //editor.tabwidth = 8
  127.  
  128. //editor.verbose.search = 0
  129.  
  130. //Default state of word wrap and merge:
  131. //Value Word wrap Merge
  132. //0     off       off
  133. //1     on        off
  134. //2     off       on
  135. //3     on        on
  136. //editor.default.wordwrap.state = 2
  137.  
  138. //Default right margin.
  139. //editor.default.wordwrap.margin = 78
  140.  
  141. //--------------------------------------------------------------
  142. // Colors
  143. //--------------------------------------------------------------
  144.  
  145. //Defaul colors
  146.  
  147. //color.edit.default   = 0x08
  148. //color.edit.selection = 0x70
  149. //color.edit.eof       = 0x1B
  150. //color.edit.comment   = 0x06
  151. //color.edit.ident     = 0x07
  152. //color.edit.const     = 0x0E
  153. //color.edit.preproc   = 0x0A
  154. //color.edit.number    = 0x0C
  155. //color.edit.stdword   = 0x0F
  156. //color.edit.semicol   = 0x09
  157. //color.edit.function  = 0x0F
  158. //color.edit.xnumber   = 0x0D
  159.  
  160. //NE-like set
  161.  
  162. //color.edit.default   = 0x18
  163. //color.edit.selection = 0x70
  164. //color.edit.eof       = 0x0B
  165. //color.edit.comment   = 0x16
  166. //color.edit.ident     = 0x17
  167. //color.edit.const     = 0x1E
  168. //color.edit.preproc   = 0x1A
  169. //color.edit.number    = 0x1C
  170. //color.edit.stdword   = 0x1F
  171. //color.edit.semicol   = 0x19
  172. //color.edit.function  = 0x1F
  173. //color.edit.xnumber   = 0x1D
  174.  
  175. //--------------------------------------------------------------
  176. // Help message
  177. //--------------------------------------------------------------
  178.  
  179. editor.helptext = "",
  180.        "FED key assignments:\n",
  181.        "FILE keys\n",
  182.        "  F3            - open file\n",
  183.        "  Alt+-         - list open files\n",
  184.        "  Alt+F3        - open new .Untitled\n",
  185.        "  Gray +        - next open file\n",
  186.        "  Gray -        - previous open file\n",
  187.        "  F2            - save file\n",
  188.        "  Alt+F2        - save file as ...\n",
  189.        "  Alt+M         - flip file type (DOS/Unix)\n",
  190.        "  Alt+V         - list of functions in file (JL 9)\n",
  191.        "  Ctrl+F2       - command line prompt\n",
  192.        "  Alt+F4        - close file\n",
  193.        "  Esc           - Exit\n",
  194.        "\n",
  195.        "EDIT keys\n",
  196.        "  Alt+Bksp      - undo\n",
  197.        "  Alt+D         - insert current date\n",
  198.        "  Alt+L         - convert to lower case\n",
  199.        "  Alt+U         - convert to upper case\n",
  200.        "  Ctrl+D        - duplicate line under cursor\n",
  201.        "  Alt+H         - switch hilighting mode\n",
  202.        "  Ctrl+H        - select hilighting mode\n",
  203.        "  Alt+Point     - put #ifndef ... (C/C++ header files)\n",
  204.        "  Alt+Comma     - put standard header for C/C++ file\n",
  205.        "  Ctrl+C        - set codepage\n",
  206.        "  Ctrl+1        - set codepage to IBM-866\n",
  207.        "  Ctrl+2        - set codepage to IBM-1251\n",
  208.        "  Ctrl+3        - set codepage to IBM-878\n",
  209.        "\n",
  210.        "NAVIGATE keys\n",
  211.        "  Arrow keys    - move cursor one character\n",
  212.        "  Home          - line begin\n",
  213.        "  End           - line end\n",
  214.        "  PgUp          - screen up\n",
  215.        "  PgDn          - screen down\n",
  216.        "  Ctrl+PgDn     - file end\n",
  217.        "  Ctrl+PgUp     - file begin\n",
  218.        "  Ctrl+Left     - word left\n",
  219.        "  Ctrl+Right    - word right\n",
  220.        "  Alt+J         - go to column\n",
  221.        "  Ctrl+J        - go to line\n",
  222.        "  Alt+Ctrl+0-9  - set anchor 0-9 at cursor position\n",
  223.        "  Alt+0-9       - jump to anchor position 0-9\n",
  224.        "  Shift+Tab     - long tab\n",
  225.        "  Alt+A         - toggle Autoindent\n",
  226.        "  Alt+]         - indent\n",
  227.        "  Alt+[         - unindent\n",
  228.        "\n",
  229.        "DELETE keys\n",
  230.        "  Bksp          - delete character left (backspace)\n",
  231.        "  Shift+BkSp    - Smart Backspace\n",
  232.        "  Del           - delete character right\n",
  233.        "  Ctrl+Bksp     - delete word left\n",
  234.        "  Ctrl+T        - delete word right\n",
  235.        "  Ctrl+Y        - delete line\n",
  236.        "  Ctrl+E        - delete to end of line\n",
  237.        "\n",
  238.        "MARK keys\n",
  239.        "  Alt+S         - flip block/stream marking\n",
  240.        "  Alt+T         - mark word at cursor\n",
  241.        "  Shift+Arrow   - mark in arrow direction\n",
  242.        "  Shift+End     - mark to end of line\n",
  243.        "  Shift+Home    - mark to begin of line\n",
  244.        "  Shift+PgDn    - scroll page down while marking\n",
  245.        "  Shift+PgUp    - scroll page up while marking\n",
  246.        "  Ctrl+Shft+Left- word left with block mark\n",
  247.        "  Ctrl+Shft+Rght- word right with block mark\n",
  248.        "  Ctrl+Shft+PgUp- go to file end with block mark\n",
  249.        "  Ctrl+Shft+PgDn- go to file begin with block mark\n",
  250.        "  Ctrl+Ins      - copy block to clipboard\n",
  251.        "  Shift+Del     - cut block to clipboard\n",
  252.        "  Shift+Ins     - paste block from clipboard\n",
  253.        "  Shift+F3      - sort lines ascending using marked block as key\n",
  254.        "\n",
  255.        "SEARCH keys\n",
  256.        "  Alt+F         - search dialog\n",
  257.        "  Ctrl+L        - search again\n",
  258.        "  Ctrl+Shift+L  - search again with block mark\n",
  259.        "  Alt+/         - match bracket\n",
  260.        "  Alt+Shift+/   - match bracket with block mark\n",
  261.        "\n",
  262.        "MACRO keys\n",
  263.        "  Alt+B         - bind keys\n",
  264.        "  F11           - start macro recording\n",
  265.        "  F12           - end macro recording\n",
  266.        "\n",
  267.        "COMPILER keys\n",
  268.        "  Alt+F9        - call IBM NMAKE and VisualAge C++ (JL 0)\n",
  269.        "  Shift+F9      - open JumpList 0\n",
  270.        "  Alt+F8        - call Borland make and Watcom C++ (JL 1)\n",
  271.        "  Shift+F8      - open JumpList 1\n",
  272.        "  Alt+F7        - call Jikes Java compiler (JL 2)\n",
  273.        "  Shift+F7      - open JumpList 2\n",
  274.        "  Alt+F5        - find references to function under cursor (JL 3)\n",
  275.        "  Shift+F5      - open JumpList 3\n",
  276.        "\n",
  277.        "HELP keys\n",
  278.        "  F1            - show Help screen\n",
  279.        "  Ctrl+F1       - on-line Help for function under cursor\n",
  280.        "  Alt+F1        - Copyright\n",
  281.        "\n"
  282.  
  283. //--------------------------------------------------------------
  284. // Key bindings
  285. //--------------------------------------------------------------
  286.  
  287. kbAltShiftDiv       = MatchBracketMark
  288. kbAltA              = FlipAutoindent
  289. kbAltBksp           = Undo
  290. kbAltDiv            = MatchBracket
  291. kbAltF              = Search
  292. kbAltF1             = Copyright
  293. kbAltF2             = SaveAs
  294. kbAltF3             = New
  295. kbAltF4             = Close
  296. kbAltH              = FlipHiliting
  297. kbAltJ              = JumpCol
  298. kbAltL              = Lower
  299. kbAltM              = FlipType
  300. kbAltLbracket       = Unindent
  301. kbAltMinus          = FileList
  302. kbAltRbracket       = Indent
  303. kbAltS              = FlipBlockMode
  304. kbAltU              = Upper
  305. kbBksp              = Bksp
  306. kbCtrlBksp          = DelWordLeft
  307. kbCtrlC             = SetCp
  308. kbCtrlD             = DupLine
  309. kbCtrlE             = DelToEOL
  310. kbCtrlH             = HiliteSelect
  311. kbCtrlIns           = Copy
  312. kbCtrlJ             = JumpLine
  313. kbCtrlL             = SearchAgain
  314. kbCtrlLeft          = WordLeft
  315. kbCtrlN             = { rc = fedInsChar(fedGet('N')); return '';}
  316. kbCtrlPgDown        = FileEnd
  317. kbCtrlPgUp          = FileBegin
  318. kbCtrlRight         = WordRight
  319. kbCtrlShiftL        = SearchAgain
  320. kbCtrlShiftLeft     = WordLeftMark
  321. kbCtrlShiftPgDown   = FileEndMark
  322. kbCtrlShiftPgUp     = FileBeginMark
  323. kbCtrlShiftRight    = WordRightMark
  324. kbCtrlT             = DelWordRight
  325. kbCtrlY             = DelLine
  326. kbDel               = Del
  327. kbDown              = Down
  328. kbEnd               = End
  329. kbEsc               = Exit
  330. kbF1                = HelpScreen
  331. kbF2                = Save
  332. kbF3                = Load
  333. kbGrMinus           = NextFile
  334. kbGrPlus            = PrevFile
  335. kbHome              = Home
  336. kbIns               = Ins
  337. kbLeft              = Left
  338. kbPgDown            = PgDn
  339. kbPgUp              = PgUp
  340. kbRight             = Right
  341. kbShiftF3           = Sort
  342. kbShiftDel          = Cut
  343. kbShiftDown         = DownMark
  344. kbShiftEnd          = EndMark
  345. kbShiftHome         = HomeMark
  346. kbShiftIns          = Paste
  347. kbShiftLeft         = LeftMark
  348. kbShiftPgDown       = PgDnMark
  349. kbShiftPgUp         = PgUpMark
  350. kbShiftRight        = RightMark
  351. kbShiftUp           = UpMark
  352. kbUp                = Up
  353. kbGrEnter           = "\n"
  354. kbAltD              = InsDate
  355. kbAltI              = Home "#include <" End ".h>"
  356.  
  357. kbAltCtrl0          = MarkSet0
  358. kbAltCtrl1          = MarkSet1
  359. kbAltCtrl2          = MarkSet2
  360. kbAltCtrl3          = MarkSet3
  361. kbAltCtrl4          = MarkSet4
  362. kbAltCtrl5          = MarkSet5
  363. kbAltCtrl6          = MarkSet6
  364. kbAltCtrl7          = MarkSet7
  365. kbAltCtrl8          = MarkSet8
  366. kbAltCtrl9          = MarkSet9
  367. kbAlt0              = MarkGo0
  368. kbAlt1              = MarkGo1
  369. kbAlt2              = MarkGo2
  370. kbAlt3              = MarkGo3
  371. kbAlt4              = MarkGo4
  372. kbAlt5              = MarkGo5
  373. kbAlt6              = MarkGo6
  374. kbAlt7              = MarkGo7
  375. kbAlt8              = MarkGo8
  376. kbAlt9              = MarkGo9
  377.  
  378. kbAltComma          = FileBegin ,
  379.                       Home "\n" Up,
  380.                       "/*\n",
  381.                       "** Module   :" InsFileNameShort "\n",
  382.                       "** Abstract :\n",
  383.                       "**\n",
  384.                       "** Copyright (C) Sergey I. Yevtushenko\n",
  385.                       "**\n",
  386.                       "** Log: " InsDate "\tCreated\n",
  387.                       "**\n",
  388.                       "*/\n"
  389. kbAltPoint          = Home "\n" Up,
  390.                       "#ifndef __" InsFileNameShort WordLeft BkSp "_" End "\n",
  391.                       "#define __" InsFileNameShort WordLeft BkSp "_" End "\n",
  392.                       FileEnd End "\n" End,
  393.                       "#endif  /*__" InsFileNameShort WordLeft BkSp "_" End "*/\n",
  394.                       Up Up End
  395.  
  396. kbAltQuote          = Home "\n" Up,
  397.                       "//-----------------------------------------\n",
  398.                       "//\n",
  399.                       "//-----------------------------------------\n",
  400.                       Up Up End  " "
  401.  
  402.  
  403. kbF11               = MacroRecStart
  404. kbF12               = MacroRecEnd
  405.  
  406. //
  407. // REXX Macro functions
  408. // Copyright (C) 1998 Vit Timchishin
  409. // Copyright (C) 1999,2000 Sergey I. Yevtushenko
  410. //
  411.  
  412. kbAltT              = { /* Mark word */
  413.                         lastpos = 0
  414.                         row=fedGet('r')
  415.                         col=fedGet('c')
  416.  
  417.                         do ncol=col to 1 by -1
  418.                             if fedGetChar(row,ncol,1)=' '
  419.                                 then leave;
  420.                         end
  421.  
  422.                         do while fedGetChar(row,col,1)<>'00'x
  423.                             if fedGetChar(row,col,1)=' '
  424.                                 then leave;
  425.                             col=col+1
  426.                         end
  427.                         ncol=ncol+1
  428.                         if ncol < col
  429.                         then do
  430.                             call fedSet 'C', ncol   /* Goto to start of word */
  431.                             call fedSet 'M', 0      /* unmark */
  432.  
  433.                             do while ncol < col
  434.                                 call fedRightMark
  435.                                 ncol=ncol+1
  436.                             end
  437.                         end
  438.                         return ''
  439.                       }
  440.  
  441. kbShiftTab          = { /* Long tab */
  442.                           if fedget('row')<>1 then
  443.                         do
  444.                             col=fedget('c');
  445.                              row=fedget('row');
  446.                             do while fedgetchar(row-1,col,1)=' ' &,
  447.                                fedgetchar(row-1,col,1)<>'0'x
  448.                                 col=col+1
  449.                             end
  450.  
  451.                             if fedgetchar(row-1,col,1)='0'x
  452.                                 then return '';
  453.  
  454.                              call fedset 'col',col
  455.                         end
  456.  
  457.                         return ''
  458.                       }
  459.  
  460. kbShiftBkSp         = { /* Smart back space */
  461.                         col=fedget('c')
  462.                         do row=fedget('row')-1 to 1 by -1
  463.                             if fedgetchar(row,col-1,1)<>' ' then
  464.                              do cl=col-1 to 1 by -1
  465.  
  466.                                 if fedgetchar(row,cl,1)=' ' then
  467.                                   do
  468.                                     call fedset 'col',cl+1
  469.                                     return 0
  470.                                 end
  471.                              end
  472.                             call fedset 'col',1
  473.                         end
  474.  
  475.                         return 0;
  476.                       }
  477.  
  478.  
  479. kbShiftF7 =           {
  480.                         fedOpenJumpList(2);
  481.                         return '';
  482.                       }
  483.  
  484. kbAltF7             = { /* Jikes Java compiler */
  485.                         /* Using JumpList 2 */
  486.                         address cmd
  487.  
  488.                         rc = fedSaveAll()
  489.  
  490.                         'nmake | rxqueue'
  491.                         lst.jump_len=0
  492.                         i=0
  493.  
  494.                         do while queued() > 0
  495.                             parse pull str
  496.                             parse value str with fname':'l1':'c1':'l2':'c2':'msg
  497.                             if strip(fname)='' | l1='' | c1='' | l2='' | c2=''
  498.                                 then iterate;
  499.  
  500.                             if msg=''
  501.                             then do
  502.                                 parse pull msg
  503.                                 msg=strip(msg)
  504.                             end
  505.  
  506.                             lst.i.jump_header='('l1':'c1'):'msg
  507.                             lst.i.jump_file=fname
  508.                             lst.i.jump_row=l1
  509.                             lst.i.jump_col=c1
  510.                             i=i+1
  511.                         end
  512.                         lst.jump_len=i
  513.                         rc = fedFillJumpList('lst',2);
  514.                         rc = fedOpenJumpList(2);
  515.                         return '';
  516.                       }
  517.  
  518. kbShiftF8 =           {
  519.                         fedOpenJumpList(1);
  520.                         return '';
  521.                       }
  522.  
  523. kbAltF8             = { /* Borland make and Watcom C++ compiler */
  524.                         /* Using JumpList 1 */
  525.                         address cmd
  526.  
  527.                         rc = fedSaveAll()
  528.  
  529.                         'bmake | rxqueue'
  530.                         lst.jump_len=0
  531.                         i=0
  532.  
  533.                         do while queued() > 0
  534.                             parse pull str
  535.                             parse value str with fname'): 'msg
  536.                             if strip(fname)='' | strip(msg)=''
  537.                                 then iterate;
  538.  
  539.                             parse value str with fname'('arow'):'txt': col('acol')'rest
  540.  
  541.                             lst.i.jump_header=str
  542.                             lst.i.jump_file=fname
  543.                             lst.i.jump_row=arow
  544.                             lst.i.jump_col=strip(acol)
  545.  
  546.                             i=i+1
  547.                         end
  548.                         lst.jump_len=i
  549.                         rc = fedFillJumpList('lst',1);
  550.                         rc = fedOpenJumpList(1);
  551.                         return '';
  552.                       }
  553.  
  554. kbShiftF9 =           {
  555.                         fedOpenJumpList(0);
  556.                         return '';
  557.                       }
  558.  
  559. kbAltF9             = { /* IBM's NMAKE and Visual Age C++ compiler */
  560.                         /* Using JumpList 0 */
  561.                         address cmd
  562.  
  563.                         rc = fedSaveAll()
  564.  
  565.                         'nmake | rxqueue'
  566.                         lst.jump_len=0
  567.                         i=0
  568.  
  569.                         do while queued() > 0
  570.                             parse pull str
  571.                             parse value str with fname' : 'msg
  572.                             if strip(fname)='' | strip(msg)=''
  573.                                 then iterate;
  574.  
  575.                             parse value fname with fname'('arow':'acol')'rest
  576.  
  577.                             lst.i.jump_header=str
  578.                             lst.i.jump_file=fname
  579.                             lst.i.jump_row=arow
  580.                             lst.i.jump_col=acol
  581.                             i=i+1
  582.                         end
  583.                         lst.jump_len=i
  584.                         rc = fedFillJumpList('lst',0);
  585.                         rc = fedOpenJumpList(0);
  586.                         return '';
  587.                       }
  588.  
  589. kbAltF10            = { /* Contributed by Max Alekseyev relf@os2.ru */
  590.                         /* GNU MAKE */
  591.                         /* Using JumpList 2 */
  592.                         address cmd
  593.  
  594.                         rc = fedSaveAll()
  595.  
  596.                         'make 2>&1 | rxqueue'
  597.  
  598.                         lst.jump_len=0
  599.                         i=0
  600.  
  601.                         do while queued() > 0
  602.                             parse pull str
  603.                             parse value str with fname':'arow':' msg
  604.                             if strip(fname)='' | strip(msg)=''
  605.                                 then iterate;
  606.  
  607.                             lst.i.jump_header=str
  608.                             lst.i.jump_file=fname
  609.                             lst.i.jump_row=arow
  610.                             lst.i.jump_col=1
  611.                             i=i+1
  612.                         end
  613.                         lst.jump_len=i
  614.                         rc = fedFillJumpList('lst',2);
  615.                         rc = fedOpenJumpList(2);
  616.                         return '';
  617.                       }
  618.  
  619. kbAltV              = {
  620.                         /* List of functions in file */
  621.                         /* Using JumpList 9 */
  622.  
  623.                         fname=fedGet('Name');
  624.  
  625.                         lst.jump_len=0
  626.                         i=0
  627.  
  628.                         do j = 1 to fedGet('Last')
  629.  
  630.                             str=fedGetChar(j)
  631.                             chr=translate(left(str, 1))
  632.  
  633.                             if chr<'A' | chr > 'Z' | length(strip(str)) < 3
  634.                                 then iterate;
  635.  
  636.                             chr=translate(right(strip(str), 1))
  637.  
  638.                             if chr=';' | chr='=' | chr='{' | chr=']'
  639.                                 then iterate
  640.  
  641.                             lst.i.jump_header=str
  642.                             lst.i.jump_file=fname
  643.                             lst.i.jump_row=j
  644.                             lst.i.jump_col=1
  645.                             i=i+1
  646.  
  647.                         end
  648.                         lst.jump_len=i
  649.  
  650.                         rc = fedFillJumpList('lst',9)
  651.                         rc = fedOpenJumpList(9)
  652.                         return '';
  653.                       }
  654.  
  655. kbInit = { /* load additional keys if current directory
  656.             * matches specified criteria
  657.             */
  658.  
  659.             roots='C:\DEV\ C:\WORK\ '
  660.  
  661.             curdir=translate(fedGet('Dir'))
  662.  
  663.             do i = 1 to words(roots)
  664.                 root=word(roots,i)
  665.                 dir=left(curdir, length(root))
  666.  
  667.                 if left(curdir, length(root)) = root then
  668.                 do
  669.                     /* bind additional keys */
  670.  
  671.                     file=root'FED.INI'
  672.                     rc=fedBind(file)
  673.                 end
  674.             end
  675.  
  676.             /* Set some defaults */
  677.             rc= fedVarSet('word.wrap', 0);
  678.             return '';
  679.          }
  680.  
  681. kbDone = {  /* do nothing */
  682.             return '';
  683.          }
  684.  
  685. kbAltB = {  /* Reload profile (for example key bindings) from current buffer */
  686.             call fedBind
  687.             call fedMsgBox " Profile reload complete ", 400
  688.             return ''
  689.          }
  690.  
  691. kbAltQ = { rc = fedSet('P', 'IBM-866' ); return '';}
  692. kbAltW = { rc = fedSet('P', 'IBM-1251'); return '';}
  693. kbAltE = { rc = fedSet('P', 'IBM-878' ); return '';}
  694.  
  695. kbCtrlF1 =  {/* On-line help for function under cursor */
  696.                 address cmd
  697.                 col = fedget(c)
  698.                 books=value('CPREF',,'OS2ENVIRONMENT')||'+'||value('PMREF',,'OS2ENVIRONMENT')
  699.                 a = translate(fedgetchar(fedget(row)),,
  700.                              '                         ',,
  701.                              '~:@#$%^&*()-=+/?.><,\|"`'||"'")
  702.  
  703.                 do i = 1 to words(a)
  704.                     pos = wordindex(a, i)
  705.                     sz  = wordlength(a, i)
  706.  
  707.                     if pos <= col & (pos+sz) >= col
  708.                     then do
  709.                         '@view 'books word(a,i)
  710.                         leave
  711.                     end
  712.                 end
  713.                 return '';
  714.             }
  715.  
  716. kbCtrlF2 =     { /* command-line prompt */
  717.                 address cmd
  718.  
  719.                  a = fedInput("Command")
  720.  
  721.                 if a <> '' then
  722.                     '@'a' 2>&1 | clip '
  723.                 return '';
  724.             }
  725.  
  726. kbCtrlF3 = { /* convert marked hex dump into string */
  727.                 address cmd
  728.                 rc =  parse value str with lt'>'rt
  729.                    str=lt'>'rt
  730.                 end
  731.  
  732.                 rc = fedSetClip(str);
  733.                 return '';
  734.            }
  735.  
  736. /* Some HTML tags. Note that marked text is inserted inside tags */
  737.  
  738. kbCtrlQ  = {
  739.                 str = fedGetClip()
  740.                 rc  = fedCut()
  741.  
  742.                 rc = fedInsChar("<b></b>")
  743.                 do 4
  744.                   rc = fedLeft()
  745.                 end
  746.  
  747.                 rc = fedPaste();
  748.                 rc = fedSetClip(str)
  749.                 return '';
  750.            }
  751.  
  752. kbCtrlA  = {
  753.                 str = fedGetClip()
  754.                 rc  = fedCut()
  755.  
  756.                 rc = fedInsChar("<td></td>")
  757.                 do 5
  758.                   rc = fedLeft()
  759.                 end
  760.  
  761.                 rc = fedPaste();
  762.                 rc = fedSetClip(str)
  763.                 return '';
  764.            }
  765.  
  766. kbCtrlZ  = {
  767.                 str = fedGetClip()
  768.                 rc  = fedCut()
  769.  
  770.                 rc = fedInsChar("<tr></tr>")
  771.                 do 5
  772.                   rc = fedLeft()
  773.                 end
  774.  
  775.                 rc = fedPaste();
  776.                 rc = fedSetClip(str)
  777.                 return '';
  778.            }
  779.  
  780. kbOpen = {  /* Switch word wrapping depending on the file extension */
  781.             ext_list = 'MSG TXT DOC'
  782.             file = fedGet('Name')
  783.  
  784.             dot = lastpos('.', file)
  785.  
  786.             if dot = 0 then
  787.                 return ''
  788.  
  789.             ext = translate(substr(file, dot+1))
  790.  
  791.             if wordpos(ext, ext_list) > 0 then
  792.                 call fedSet 'WS', 1
  793.             else
  794.                 call fedSet 'WS', 0
  795.  
  796.             return ''
  797.          }
  798.  
  799. kbCtrlW = { /* Switch word wrapping manually */
  800.             call fedSet 'WS', 1 - fedGet('WS')
  801.  
  802.             if fedGet('WS') = 0 then
  803.                 ww = 'off'
  804.             else
  805.                 ww = 'on'
  806.  
  807.             /* uncomment line below if you wish to switch merge
  808.                state together with wprd wrap state  */
  809.             /* call fedSet 'WM', fedGet('WS') */
  810.  
  811.             call fedMsgBox "Word wrap is "ww, 300
  812.           }
  813.  
  814. kbCtrlM = { /* Set right margin for word wrap */
  815.             a = fedInput("Right margin")
  816.  
  817.             call fedMsgBox "a = "a||" ("verify(a,'0123456789')")", 800
  818.  
  819.             if verify(a,'0123456789') = 0 then
  820.                 if a > 0 & a < 256 then /* resonable bounds */
  821.                     call fedSet 'WW', a
  822.           }
  823.  
  824.