File: main.fte

package info (click to toggle)
fte 0.46b5-4.2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,844 kB
  • ctags: 5,183
  • sloc: cpp: 39,445; ansic: 2,415; perl: 567; makefile: 71; sh: 30
file content (281 lines) | stat: -rw-r--r-- 6,734 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# Main FTE Configuration File

# operating system is now defined by CFTE

# OS_UNIX, OS_OS2, OS_DOS32, OS_NT

# uncomment for appropriate keybindings and menus

%define(UI_KB)
#%define(UI_FTE)
#%define(UI_WS)
#%define(UI_NE)
#%define(UI_BRIEF)
# experimental

#%define(COLORS_WHITE_BG)
%define(COLORS_BLACK_BG)

%if(OS_OS2)
%define(GUI_PM)
%endif

%if(OS_UNIX)
%define(GUI_X11)
%endif

# to customize FTE to your preferences you should only need
# to add stuff in this file.
# Some examples are below. If you find something that cannot be
# configured here, tell me about it.
# If you wish to modify only a specific mode, add customizations
# at the end of file. To also modify all of the descendants,
# put customizations right after the include statement for mode.

# The current hierarchy of modes is:
# PLAIN
#   TEXT
#     MSG
#   C
#   ...
#   BIN

# The order of things in this file is important! If you change a setting
# before the default is set in one of the included files, your
# setting will have no effect.
# The file is processed in one pass, so everything should be defined,
# before it is used.

# My ultimate goal is to have the default files unmodifiable and
# have all customization done here, but this is not currently possible for
# all things (menus come to mind).

include 'global.fte';

%if(COLORS_BLACK_BG)
include 'pal_b_kb.fte';
#include 'pal_blk.fte';
%endif

%if(COLORS_WHITE_BG)
include 'pal_wht.fte';
%endif

object GLOBAL {
# fonts for GUI version

%if(GUI_PM)
# PM
# Only System VIO fonts are used. Some listed below. XX*YY.

#    WindowFont =  "8x8";
#    WindowFont = "6x10";
#    WindowFont = "8x10";
#    WindowFont = "5x12";
#    WindowFont = "8x12";
#    WindowFont = "6x14";
    WindowFont = "8x14";
#    WindowFont = "5x16";
#    WindowFont = "8x16";
#    WindowFont = "8x18";
%endif

%if(GUI_X11)
# X11
# Any fixed-width font should do. Make sure it has all 256 characters
# defined or weird things can happen.

#    WindowFont = "fixed";
#    WindowFont = "6x8";
#    WindowFont = "7x13";
#    WindowFont = "8x13";
#    WindowFont = "9x15";
    WindowFont = "*fixed*15*";
#    WindowFont = "10x20";
%endif
}

include 'color.fte';

# change background color
# must be here to be inherited by other modes
# object PLAIN { color { { 'Background', '17' } }; }

include 'm_plain.fte';

# must be here to be inherited by other modes

# UNIX files have no CR at the end of line

%if(OS_UNIX)
mode PLAIN {
    # Don't autodetect line separator
    DetectLineSep = 0;
    # Don't add CR at EOL when saving
    AddCR      = 0;
    # Don't remove CR if at EOL when loading
    StripChar  = -1;
}
%endif

eventmap TEX: PLAIN {
    key [F9] {
        Compile "latex " #. $FileName
    }
}

include 'm_text.fte';
include 'm_msg.fte';
%if(UI_KB)
include 'm_c_kb.fte';
%endif
%if(!UI_KB)
include 'm_c.fte';
%endif
include 'm_fte.fte';
include 'm_ada.fte';
include 'm_html.fte';
include 'm_ldsgml.fte';
include 'm_ipf.fte';
include 'm_make.fte';
include 'm_resdlg.fte';
include 'm_diff.fte';
include 'm_sh.fte';
include 'm_pascal.fte';
include 'm_perl.fte';
include 'm_rexx.fte';
include 'm_java.fte';
include 'm_tex.fte';
include 'm_asm.fte';
include 'm_tcl.fte';
include 'm_fort90.fte';
include 'm_clario.fte';
include 'm_ebnf.fte';
include 'm_texi.fte';
include 'm_asm370.fte';
include 'm_siod.fte';
include 'm_sml.fte';
include 'm_mod3.fte';
include 'm_sl.fte';
include 'm_bin.fte';
include 'm_4gl.fte';
include 'm_sgml.fte';

# C indentation style menu
include 'uicstyle.fte';

# When doing large customizations of keyboard/menus
# you should probably write your own version of these files.

# to change a menu, predefine it before including the ui_*.fte file.
# to add/override keybindings add them after including ui_*.fte file.

# ui*.fte -files define all keyboard bindings and menus.
# pick only one file.
%if(UI_KB)
include 'ui_kb.fte'; # kabi settinigs
%endif
%if(UI_FTE)
include 'ui_fte.fte'; # fte CUA style bindings
##include 'ui_fte2.fte'; # fte CUA style bindings with conditional cascade menus
%endif
%if(UI_WS)
include 'ui_ws.fte';  # wordstar like
%endif
%if(UI_NE)
include 'ui_ne.fte';  # norton classic editor - incomplete
%endif
%if(UI_MEW)
include 'ui_mew.fte'; # MultiEdit4Windows
%endif
%if(UI_BRIEF)
include 'ui_brief.fte'; # BRIEF/CRISP
%endif
##include 'ui_vi.fte';  # VI - very incomplete
# todo: brief, epm, emacs, VI

# some templates and abbreviations
include 'ab_c.fte';
%if(OS_OS2)
include 'ab_c_os2.fte';
%endif

# some customizations

object GLOBAL {
    SelectPathname = 0;
    ShowToolBar = 1;     # PM only
    GUIDialogs = 1;      # PM only
    SysClipboard = 1;    # use PM clipboard, or X11 selection for clipboard
#    PMDisableAccel      = 0;   # disable Alt+Fx PM accelerators
}

# some editors have a SmartPaste feature.  We can do that too.
#eventmap C { key [S+G-Ins] { BlockPasteStream; BlockReIndent } }

eventmap PLAIN {
    key [A+S+-] { # select block between {}()[]<>
        BlockUnmark; BlockMarkStream; MatchBracket; BlockMarkStream;
        SavePos; MoveBlockEnd;
        2:MoveNext; ?MoveLeft;  # do this to mark a newline after })>]
        BlockEnd; MoveSavedPos;
    }

    key [A+C+F] { IndentFunction }
    key [A+C+M] { BlockMarkFunction }
    key [A+C+[] { MoveFunctionPrev }
    key [A+C+\]] { MoveFunctionNext }

    key [C+F1] { ShowHelpWord
%if(OS_OS2)
        # OS/2 - helpfile (can be contatenated)
        "CPREF+PMWIN+PMMSG+PMGPI+PMREL+PMFUN+PMHOK"
%endif
%if(OS_UNIX)
# UNIX - specify options to MAN
        ""
%endif
%if(OS_NT)
            # Win32 - helpfile
            #        ""
%endif
    }
%if(OS_OS2)
    key [S+F1] { ShowHelpWord "EMXDEV+EMXGNU+EMXLIB+EMXRT+EMXBSD" }
%if(!UI_BRIEF)
    key [F1] { ShowHelp "FTE" "" }
%endif
%endif

    #key [C+A+F1] {
    #    InsertString $FileName
    #    InsertString $FilePath
    #    InsertString $CurDirectory
    #}
    key [C+A+U] {
        MoveLineStart; ?FindReplace /^(\s*)\/\// /\1/ "xnc"; MoveDown
    }
    key [C+A+C] {
        MoveLineStart; ?FindReplace /^(\s*)\/\// /\1/ "xnc";
        MoveLineStart; ?FindReplace /^(\s*)/ /\1\/\// "xnc"; MoveDown
    }
    key [G-Home] { MoveBeginOrNonWhite }
    key [C+G-Up] { PopGlobalBookmark }
    key [C+G-Down] { PushGlobalBookmark }
    #key [C+A+S+F] {
    #    LineNew;
    #    InsertString "path:" . $FilePath; LineNew;
    #    InsertString "name:" . $FileName; LineNew;
    #    InsertString "dir:"  . $FileDirectory; LineNew;
    #    InsertString "base:" . $FileBaseName; LineNew;.
    #    InsertString "ext:"  . $FileExtension; LineNew;
    #}
}

object GLOBAL {
#    SevenBit = 1;  # seven bit characters only for user interface...
}
eventmap PLAIN {
   key [G-Left] { MovePrev }
   key [G-Right] { MoveNext }
}