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