summaryrefslogtreecommitdiff
path: root/ted.cfg
blob: b4ede6280b3ea90575ba7fcce3a149264e7ceb45 (plain)
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
[core]
tab-width = 4
indent-with-spaces = off
# cursor width in pixels
cursor-width = 1
# time to blink cursor for (i.e. it will be on for cursor-blink-time-on seconds, then off for cursor-blink-time-off seconds)
# set -off to 0 to disable blinking
cursor-blink-time-on = 0.5
cursor-blink-time-off = 0.3
# amount of scroll "padding" (minimum number of lines below the cursor will the bottom of the screen be)
scrolloff = 5
# if you do a bunch of typing, then undo, it will generally
# undo the past this many seconds of editing.
undo-save-time = 6
text-size = 18
border-thickness = 1
max-menu-width = 600
padding = 6
error-display-time = 10
auto-indent = on
# automatically add a newline at the end of the file on save
auto-add-newline = on
syntax-highlighting = on
line-numbers = on
# if set to "on", when a file is changed by another program, it will be reloaded by ted without asking you.
auto-reload = off
# automatically reload config when saved
auto-reload-config = on
build-default-command = make
# restore previously opened files when ted is launched?
restore-session = on
# search depth for files to generate tags for.
# if set to 0, tag generation/regeneration will do nothing
tags-max-depth = 2
# regenerate tags if an identifier is not found (with Ctrl+click)?
regenerate-tags-if-not-found = yes

[keyboard]
# motion and selection
Left = :left
Shift+Left = :select-left
Ctrl+Left = :left-word
Ctrl+Shift+Left = :select-left-word
Right = :right
Shift+Right = :select-right
Ctrl+Right = :right-word
Ctrl+Shift+Right = :select-right-word
Up = :up
Shift+Up = :select-up
Down = :down
Shift+Down = :select-down
Ctrl+Up = 10 :up
Ctrl+Shift+Up = 10 :select-up
Ctrl+Down = 10 :down
Ctrl+Shift+Down = 10 :select-down
Home = :start-of-line
Shift+Home = :select-start-of-line
Ctrl+Home = :start-of-file
Ctrl+Shift+Home = :select-start-of-file
End = :end-of-line
Shift+End = :select-end-of-line
Ctrl+End = :end-of-file
Ctrl+Shift+End = :select-end-of-file
Ctrl+a = :select-all

# insertion
Tab = :tab
Shift+Tab = :backtab
Enter = :newline
# same as :newline for normal text insertion, but goes to the previous search result instead of the next one
Shift+Enter = :newline-back
Keypad Enter = :newline
Shift+Keypad Enter = :newline-back
# toggle selection between commented/uncommented
Ctrl+/ = :comment-selection

# deletion
Delete = :delete
Shift+Delete = :delete
Ctrl+Delete = :delete-word
Ctrl+Shift+Delete = :delete-word
Backspace = :backspace
Shift+Backspace = :backspace
Ctrl+Backspace = :backspace-word
Ctrl+Shift+Backspace = :backspace-word

# scrolling
PageUp = :page-up
PageDown = :page-down

Ctrl+o = :open
Ctrl+n = :new
Ctrl+s = :save
Ctrl+Alt+Shift+s = :save-all
Ctrl+Shift+s = :save-as
Ctrl+q = :quit
Ctrl+Shift+r = :reload-all

# You can do something like this:
# Ctrl+Alt+t = 3 :set-language
# to set the language of the current buffer to Rust, for example. This might be useful if
# one file extension could be multiple different languages.
# Here are the numbers corresponding to each language we have syntax highlighting for:
#  0 Plain text (no syntax highlighting)
#  1 C
#  2 C++
#  3 Rust
#  4 Python
#  5 TeX
#  6 Markdown
#  7 HTML
#  8 Config (e.g. ted.cfg)
# -1 Guess from the file extension (default)

Ctrl+Space = :autocomplete
# go to previous completion
Ctrl+Shift+Space = :autocomplete-back

Ctrl+z = :undo
Ctrl+Shift+z = :redo
Ctrl+f = :find
Ctrl+Shift+f = :find-replace
Ctrl+c = :copy
Ctrl+x = :cut
Ctrl+v = :paste
Ctrl+Shift+p = :command-selector

# tabs
Ctrl+w = :tab-close
Ctrl+PageUp = :tab-prev
Ctrl+PageDown = :tab-next
Ctrl+Shift+PageUp = :tab-move-left
Ctrl+Shift+PageDown = :tab-move-right
Alt+1 = 0 :tab-switch
Alt+2 = 1 :tab-switch
Alt+3 = 2 :tab-switch
Alt+4 = 3 :tab-switch
Alt+5 = 4 :tab-switch
Alt+6 = 5 :tab-switch
Alt+7 = 6 :tab-switch
Alt+8 = 7 :tab-switch
Alt+9 = 8 :tab-switch
Alt+0 = 9 :tab-switch

Ctrl++ = 3 :increase-text-size
Ctrl+- = 3 :decrease-text-size

Ctrl+Alt+Shift+v = :view-only

F4 = :build
Ctrl+[ = :build-prev-error
Ctrl+] = :build-next-error
Ctrl+! = :shell

Ctrl+t = :generate-tags

Ctrl+d = :goto-definition
Ctrl+g = :goto-line

Ctrl+\ = :split-horizontal
Ctrl+Shift+\ = :split-vertical
# unsplit
Ctrl+j = :split-join
# switch to the other side of a split
Ctrl+tab = :split-switch
# swap sides of a split
Ctrl+Shift+tab = :split-swap

Escape = :escape

[colors]
border = #a77
active-tab-hl = #a77a
# this color is used for tabs which are selected, but not active (because you are on the other side of a split, perhaps)
selected-tab-hl = #7777
cursor-line-bg = #fff2
cursor = #3ff
# used as cursor color when you do autocomplete and there are no suggestions
cursor-error = #f00
# color to highlight matching brackets with
matching-bracket-hl = #fda8
selection-bg = #36aa
view-only-cursor = #0d0
view-only-selection-bg = #0a05
hl = #ccc
text = #fff
# less prominent text color
text-secondary = #fff7
# For example, in the open menu it is nice to have a visual distinction between folders and files.
# This is the color used for folders.
text-folder = #88f
# Used for things that are neither files nor folders.
text-other = #8f8
bg = #001
# The entire screen gets filled with this color when a menu (e.g. the "open" menu) is shown.
# By making it transparent, we can dim everything else while the menu is open.
menu-backdrop = #0004
menu-bg = #222
menu-hl = #afa2
# error box colors
error-border = #f00
error-bg = #800
error-text = #fdd
# color to highlight search results with
find-hl = #fff4
yes = #afa
no = #faa
cancel = #ffa

# Syntax highlighting
keyword = #0c0
preprocessor = #77f
string = #f77
character = #fa7
builtin = #a7f
comment = #999
constant = #8ff

line-numbers = #779
cursor-line-number = #ddf
line-numbers-separator = #fff3

[extensions]
C = .c, .h, .glsl
C++ = .cpp, .hpp, .C, .H, .cxx, .hxx, .cc, .hh
Rust = .rs
Python = .py
Tex = .tex
Markdown = .md 
HTML = .html, .php, .xml, .xhtml
Config = .cfg
Javascript = .js
Java = .java
Go = .go


# You can add language-specific settings like this:
# [HTML.core]
# tab-width = 2