home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fteo46b5.zip / fteo46b5 / config / main.fte < prev    next >
Text File  |  1998-01-26  |  6KB  |  254 lines

  1. # Main FTE Configuration File
  2.  
  3. # operating system is now defined by CFTE
  4.  
  5. # OS_UNIX, OS_OS2, OS_DOS32, OS_NT
  6.  
  7. # uncomment for appropriate keybindings and menus
  8.  
  9. %define(UI_FTE)
  10. #%define(UI_WS)
  11. #%define(UI_NE)
  12. #%define(UI_BRIEF)
  13. # experimental
  14.  
  15. #%define(COLORS_WHITE_BG)
  16. %define(COLORS_BLACK_BG)
  17.  
  18. %if(OS_OS2)
  19. %define(GUI_PM)
  20. %endif
  21.  
  22. %if(OS_UNIX)
  23. %define(GUI_X11)
  24. %endif
  25.  
  26. # to customize FTE to your preferences you should only need
  27. # to add stuff in this file.
  28. # Some examples are below. If you find something that cannot be
  29. # configured here, tell me about it.
  30. # If you wish to modify only a specific mode, add customizations
  31. # at the end of file. To also modify all of the descendants,
  32. # put customizations right after the include statement for mode.
  33.  
  34. # The current hierarchy of modes is:
  35. # PLAIN
  36. #   TEXT
  37. #     MSG
  38. #   C
  39. #   ...
  40. #   BIN
  41.  
  42. # The order of things in this file is important! If you change a setting
  43. # before the default is set in one of the included files, your
  44. # setting will have no effect.
  45. # The file is processed in one pass, so everything should be defined,
  46. # before it is used.
  47.  
  48. # My ultimate goal is to have the default files unmodifiable and
  49. # have all customization done here, but this is not currently possible for
  50. # all things (menus come to mind).
  51.  
  52. include 'global.fte';
  53.  
  54. %if(COLORS_BLACK_BG)
  55. include 'pal_blk.fte';
  56. %endif
  57.  
  58. %if(COLORS_WHITE_BG)
  59. include 'pal_wht.fte';
  60. %endif
  61.  
  62. object GLOBAL {
  63. # fonts for GUI version
  64.  
  65. %if(GUI_PM)
  66. # PM
  67. # Only System VIO fonts are used. Some listed below. XX*YY.
  68.  
  69. #    WindowFont =  "8x8";
  70. #    WindowFont = "6x10";
  71. #    WindowFont = "8x10";
  72. #    WindowFont = "5x12";
  73. #    WindowFont = "8x12";
  74. #    WindowFont = "6x14";
  75.     WindowFont = "8x14";
  76. #    WindowFont = "5x16";
  77. #    WindowFont = "8x16";
  78. #    WindowFont = "8x18";
  79. %endif
  80.  
  81. %if(GUI_X11)
  82. # X11
  83. # Any fixed-width font should do. Make sure it has all 256 characters
  84. # defined or weird things can happen.
  85.  
  86. #    WindowFont = "fixed";
  87. #    WindowFont = "6x8";
  88. #    WindowFont = "7x13";
  89. #    WindowFont = "8x13";
  90.     WindowFont = "9x15";
  91. #    WindowFont = "10x20";
  92. %endif
  93. }
  94.  
  95. include 'color.fte';
  96.  
  97. # change background color
  98. # must be here to be inherited by other modes
  99. # object PLAIN { color { { 'Background', '17' } }; }
  100.  
  101. include 'm_plain.fte';
  102.  
  103. # must be here to be inherited by other modes
  104.  
  105. # UNIX files have no CR at the end of line
  106.  
  107. %if(OS_UNIX)
  108. mode PLAIN {
  109.     # Don't autodetect line separator
  110.     DetectLineSep = 0;
  111.     # Don't add CR at EOL when saving
  112.     AddCR      = 0;
  113.     # Don't remove CR if at EOL when loading
  114.     StripChar  = -1;
  115. }
  116. %endif
  117.  
  118. eventmap TEX: PLAIN {
  119.     key [F9] {
  120.         Compile "latex " #. $FileName
  121.     }
  122. }
  123.  
  124. include 'm_text.fte';
  125. include 'm_msg.fte';
  126. include 'm_c.fte';
  127. include 'm_fte.fte';
  128. include 'm_ada.fte';
  129. include 'm_html.fte';
  130. include 'm_ldsgml.fte';
  131. include 'm_ipf.fte';
  132. include 'm_make.fte';
  133. include 'm_resdlg.fte';
  134. include 'm_diff.fte';
  135. include 'm_sh.fte';
  136. include 'm_pascal.fte';
  137. include 'm_perl.fte';
  138. include 'm_rexx.fte';
  139. include 'm_java.fte';
  140. include 'm_tex.fte';
  141. include 'm_asm.fte';
  142. include 'm_tcl.fte';
  143. include 'm_fort90.fte';
  144. include 'm_clario.fte';
  145. include 'm_ebnf.fte';
  146. include 'm_texi.fte';
  147. include 'm_asm370.fte';
  148. include 'm_siod.fte';
  149. include 'm_bin.fte';
  150.  
  151. # C indentation style menu
  152. include 'uicstyle.fte';
  153.  
  154. # When doing large customizations of keyboard/menus
  155. # you should probably write your own version of these files.
  156.  
  157. # to change a menu, predefine it before including the ui_*.fte file.
  158. # to add/override keybindings add them after including ui_*.fte file.
  159.  
  160. # ui*.fte -files define all keyboard bindings and menus.
  161. # pick only one file.
  162. %if(UI_FTE)
  163. include 'ui_fte.fte'; # fte CUA style bindings
  164. ##include 'ui_fte2.fte'; # fte CUA style bindings with conditional cascade menus
  165. %endif
  166. %if(UI_WS)
  167. include 'ui_ws.fte';  # wordstar like
  168. %endif
  169. %if(UI_NE)
  170. include 'ui_ne.fte';  # norton classic editor - incomplete
  171. %endif
  172. %if(UI_MEW)
  173. include 'ui_mew.fte'; # MultiEdit4Windows
  174. %endif
  175. %if(UI_BRIEF)
  176. include 'ui_brief.fte'; # BRIEF/CRISP
  177. %endif
  178. ##include 'ui_vi.fte';  # VI - very incomplete
  179. # todo: brief, epm, emacs, VI
  180.  
  181. # some templates and abbreviations
  182. include 'ab_c.fte';
  183. %if(OS_OS2)
  184. include 'ab_c_os2.fte';
  185. %endif
  186.  
  187. # some customizations
  188.  
  189. object GLOBAL {
  190.     SelectPathname = 0;
  191.     ShowToolBar = 1;     # PM only
  192.     GUIDialogs = 1;      # PM only
  193.     SysClipboard = 1;    # use PM clipboard, or X11 selection for clipboard
  194. #    PMDisableAccel      = 0;   # disable Alt+Fx PM accelerators
  195. }
  196.  
  197. # some editors have a SmartPaste feature.  We can do that too.
  198. #eventmap C { key [S+G-Ins] { BlockPasteStream; BlockReIndent } }
  199.  
  200. eventmap PLAIN {
  201.     key [A+S+-] { # select block between {}()[]<>
  202.         BlockUnmark; BlockMarkStream; MatchBracket; BlockMarkStream;
  203.         SavePos; MoveBlockEnd;
  204.         2:MoveNext; ?MoveLeft;  # do this to mark a newline after })>]
  205.         BlockEnd; MoveSavedPos;
  206.     }
  207.  
  208.     key [A+C+F] { IndentFunction }
  209.     key [A+C+M] { BlockMarkFunction }
  210.     key [A+C+[] { MoveFunctionPrev }
  211.     key [A+C+\]] { MoveFunctionNext }
  212.  
  213.     key [C+F1] { ShowHelpWord
  214. %if(OS_OS2)
  215.         # OS/2 - helpfile (can be contatenated)
  216.         "CPREF+PMWIN+PMMSG+PMGPI+PMREL+PMFUN+PMHOK"
  217. %endif
  218. %if(OS_UNIX)
  219. # UNIX - specify options to MAN
  220.         ""
  221. %endif
  222. %if(OS_NT)
  223.             # Win32 - helpfile
  224.             #        ""
  225. %endif
  226.     }
  227. %if(OS_OS2)
  228.     key [S+F1] { ShowHelpWord "EMXDEV+EMXGNU+EMXLIB+EMXRT+EMXBSD" }
  229. %if(!UI_BRIEF)
  230.     key [F1] { ShowHelp "FTE" "" }
  231. %endif
  232. %endif
  233.  
  234.     #key [C+A+F1] {
  235.     #    InsertString $FileName
  236.     #    InsertString $FilePath
  237.     #    InsertString $CurDirectory
  238.     #}
  239.     key [C+A+U] {
  240.         MoveLineStart; ?FindReplace /^(\s*)\/\// /\1/ "xnc"; MoveDown
  241.     }
  242.     key [C+A+C] {
  243.         MoveLineStart; ?FindReplace /^(\s*)\/\// /\1/ "xnc";
  244.         MoveLineStart; ?FindReplace /^(\s*)/ /\1\/\// "xnc"; MoveDown
  245.     }
  246.     key [G-Home] { MoveBeginOrNonWhite }
  247.     key [C+G-Up] { PopGlobalBookmark }
  248.     key [C+G-Down] { PushGlobalBookmark }
  249. }
  250.  
  251. object GLOBAL {
  252. #    SevenBit = 1;  # seven bit characters only for user interface...
  253. }
  254.