Commit | Line | Data |
---|---|---|
cb7f42cd JF |
1 | tigrc(5) |
2 | ======== | |
3 | ||
4 | NAME | |
5 | ---- | |
6 | tigrc - tig user configuration file | |
7 | ||
2bc4f7bd | 8 | |
cb7f42cd JF |
9 | SYNOPSIS |
10 | -------- | |
11 | [verse] | |
12 | ............................................................................. | |
2bc4f7bd JF |
13 | *set* variable *=* value |
14 | *bind* keymap key action | |
15 | *color* area fgcolor bgcolor [attributes] | |
cb7f42cd JF |
16 | ............................................................................. |
17 | ||
2bc4f7bd | 18 | |
cb7f42cd JF |
19 | DESCRIPTION |
20 | ----------- | |
cb7f42cd | 21 | |
2bc4f7bd JF |
22 | You can permanently set an option by putting it in the `~/.tigrc` file. The |
23 | file consists of a series of 'commands'. Each line of the file may contain | |
24 | only one command. | |
cb7f42cd | 25 | |
2bc4f7bd JF |
26 | The hash mark ('#') is used as a 'comment' character. All text after the |
27 | comment character to the end of the line is ignored. You can use comments to | |
28 | annotate your initialization file. | |
cb7f42cd | 29 | |
cb7f42cd | 30 | |
2bc4f7bd JF |
31 | Set command |
32 | ----------- | |
cb7f42cd | 33 | |
2bc4f7bd JF |
34 | A few selective variables can be configured via the set command. The syntax |
35 | is: | |
cb7f42cd | 36 | |
2bc4f7bd JF |
37 | [verse] |
38 | .............................................................................. | |
39 | *set* variables *=* value | |
40 | .............................................................................. | |
cb7f42cd | 41 | |
2bc4f7bd | 42 | Examples: |
cb7f42cd | 43 | |
2bc4f7bd JF |
44 | -------------------------------------------------------------------------- |
45 | set show-rev-graph = yes # Show revision graph? | |
46 | set line-number-interval = 5 # Interval between line numbers | |
47 | set tab-size = 8 # Number of spaces pr tab | |
48 | set encoding = "UTF-8" # Commit encoding | |
49 | -------------------------------------------------------------------------- | |
cb7f42cd | 50 | |
2bc4f7bd | 51 | The type of variables are either bool, int, and string. |
cb7f42cd | 52 | |
2bc4f7bd | 53 | Valid bool values:: |
cb7f42cd | 54 | |
2bc4f7bd JF |
55 | To set a bool variable to true use either "1", "true", or "yes". |
56 | Any other value will set the variable to false. | |
cb7f42cd | 57 | |
2bc4f7bd | 58 | Valid int values:: |
cb7f42cd | 59 | |
2bc4f7bd | 60 | A non-negative integer. |
cb7f42cd | 61 | |
2bc4f7bd | 62 | Valid string values:: |
cb7f42cd | 63 | |
2bc4f7bd | 64 | A string of characters. Optionally, use either ' or " as delimiters. |
cb7f42cd | 65 | |
2bc4f7bd JF |
66 | Variables |
67 | ~~~~~~~~~ | |
cb7f42cd | 68 | |
2bc4f7bd | 69 | The following variables can be set: |
cb7f42cd | 70 | |
2bc4f7bd | 71 | 'show-rev-graph' (bool):: |
cb7f42cd | 72 | |
2bc4f7bd JF |
73 | Show revision graph in the main view on startup. Can be toggled with |
74 | 'g'. | |
cb7f42cd | 75 | |
2bc4f7bd | 76 | 'line-number-interval' (int):: |
cb7f42cd | 77 | |
2bc4f7bd JF |
78 | Interval between line numbers. Note, you have to toggle on line |
79 | numbering with 'n' or the `-n` command line option. The default is to | |
80 | number every line. | |
cb7f42cd | 81 | |
2bc4f7bd | 82 | 'tab-size' (int):: |
cb7f42cd | 83 | |
2bc4f7bd | 84 | Number of spaces per tab. The default is 8 spaces. |
cb7f42cd | 85 | |
2bc4f7bd | 86 | 'commit-encoding' (string):: |
cb7f42cd | 87 | |
2bc4f7bd JF |
88 | The encoding used for commits. The default is UTF-8. Not this option |
89 | is shadowed by the "i18n.commitencoding" option in `.git/config`. | |
cb7f42cd | 90 | |
cb7f42cd | 91 | |
2bc4f7bd JF |
92 | Bind command |
93 | ------------ | |
cb7f42cd | 94 | |
2bc4f7bd JF |
95 | Using bind commands keys can be mapped to an action when pressed in a given |
96 | key map. The syntax is: | |
cb7f42cd | 97 | |
2bc4f7bd JF |
98 | [verse] |
99 | .............................................................................. | |
100 | *bind* 'keymap' 'key' 'action' | |
101 | .............................................................................. | |
102 | ||
103 | Examples: | |
104 | ||
105 | -------------------------------------------------------------------------- | |
106 | # A few keybindings | |
107 | bind main w scroll-line-up | |
108 | bind main s scroll-line-down | |
109 | bind main space enter | |
110 | bind diff a previous | |
111 | bind diff d next | |
112 | bind diff b move-first-line | |
1d754561 JF |
113 | # 'unbind' the default quit key binding |
114 | bind main Q none | |
2bc4f7bd JF |
115 | -------------------------------------------------------------------------- |
116 | ||
117 | Keys are mapped by first searching the keybindings for the current view, then | |
118 | the keybindings for the *generic* keymap, and last the default keybindings. | |
119 | Thus, the view keybindings shaddow the generic keybindings which shaddow the | |
120 | built-in keybindings. | |
121 | ||
122 | -- | |
123 | ||
124 | Keymaps:: | |
125 | ||
126 | Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, and *generic*. Use | |
127 | *generic* to set key mapping in all keymaps. | |
128 | ||
129 | Key values:: | |
130 | ||
131 | Key values should never be quoted. Use either the ASCII value or one of the | |
132 | following symbolic key names. Symbolic key names are case insensitive, Use | |
133 | *Hash* to bind to the `#` key, since the hash mark is used as a comment | |
134 | character. | |
135 | ||
136 | *Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*, | |
137 | *Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*, | |
138 | *F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*. | |
139 | ||
140 | Action names:: | |
141 | ||
142 | Valid action names are described below. Note, all names are | |
143 | case-insensitive, and you may use '-', '_', and '.' interchangeably, | |
144 | e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same. | |
145 | ||
146 | -- | |
147 | ||
148 | Actions | |
149 | ~~~~~~~ | |
150 | ||
151 | ifdef::backend-xhtml11[] | |
152 | [frame="none"] | |
153 | `-----------------------`----------------------------------------------------- | |
154 | endif::backend-xhtml11[] | |
765595f3 | 155 | View switching: |
2bc4f7bd JF |
156 | ------------------------------------------------------------------------------ |
157 | view-main Show main view | |
158 | view-diff Show diff view | |
159 | view-log Show log view | |
160 | view-help Show help page | |
161 | view-pager Show pager view | |
162 | ------------------------------------------------------------------------------ | |
163 | ||
164 | ifdef::backend-xhtml11[] | |
165 | [frame="none"] | |
166 | `-----------------------`----------------------------------------------------- | |
167 | endif::backend-xhtml11[] | |
765595f3 | 168 | View manipulation: |
2bc4f7bd JF |
169 | ------------------------------------------------------------------------------ |
170 | enter Enter current line and scroll | |
171 | next Move to next | |
172 | previous Move to previous | |
173 | view-next Move focus to next view | |
174 | view-close Close the current view | |
175 | quit Close all views and quit | |
176 | ------------------------------------------------------------------------------ | |
177 | ||
178 | ifdef::backend-xhtml11[] | |
179 | [frame="none"] | |
180 | `-----------------------`----------------------------------------------------- | |
181 | endif::backend-xhtml11[] | |
765595f3 | 182 | Cursor navigation: |
2bc4f7bd JF |
183 | ------------------------------------------------------------------------------ |
184 | move-up Move cursor one line up | |
185 | move-down Move cursor one line down | |
186 | move-page_down Move cursor one page down | |
187 | move-page_up Move cursor one page up | |
188 | move-first_line Move cursor to first line | |
189 | move-last_line Move cursor to last line | |
190 | ------------------------------------------------------------------------------ | |
191 | ||
192 | ifdef::backend-xhtml11[] | |
193 | [frame="none"] | |
194 | `-----------------------`----------------------------------------------------- | |
195 | endif::backend-xhtml11[] | |
765595f3 | 196 | Scrolling: |
2bc4f7bd JF |
197 | ------------------------------------------------------------------------------ |
198 | scroll-line_up Scroll one line up | |
199 | scroll-line_down Scroll one line down | |
200 | scroll-page_up Scroll one page up | |
201 | scroll-page_down Scroll one page down | |
202 | ------------------------------------------------------------------------------ | |
203 | ||
204 | ifdef::backend-xhtml11[] | |
205 | [frame="none"] | |
206 | `-----------------------`----------------------------------------------------- | |
207 | endif::backend-xhtml11[] | |
765595f3 | 208 | Misc: |
2bc4f7bd | 209 | ------------------------------------------------------------------------------ |
1d754561 | 210 | none Do nothing |
2bc4f7bd | 211 | prompt Bring up the prompt |
2bc4f7bd JF |
212 | screen-redraw Redraw the screen |
213 | screen-resize Resize the screen | |
214 | show-version Show version information | |
215 | stop-loading Stop all loading views | |
216 | toggle-lineno Toggle line numbers | |
217 | toggle-rev_graph Toggle revision graph visualization | |
218 | ------------------------------------------------------------------------------ | |
219 | ||
220 | ||
221 | Color command | |
222 | ------------- | |
cb7f42cd | 223 | |
2bc4f7bd JF |
224 | Color commands control highlighting and the user interface styles. If your |
225 | terminal supports color, these commands can be used to assign foreground and | |
226 | backgound combinations to certain areas. Optionally, an attribute can be given | |
227 | as the last parameter. The syntax is: | |
228 | ||
229 | [verse] | |
230 | .............................................................................. | |
231 | *color* 'area' 'fgcolor' 'bgcolor' '[attributes]' | |
232 | .............................................................................. | |
cb7f42cd | 233 | |
2bc4f7bd | 234 | Examples: |
cb7f42cd | 235 | |
2bc4f7bd | 236 | ------------------------------------------------------------------------------ |
cb7f42cd JF |
237 | # Diff colors |
238 | color diff-header yellow default | |
239 | color diff-index blue default | |
240 | color diff-chunk magenta default | |
2bc4f7bd JF |
241 | # A strange looking cursor line |
242 | color cursor red default underline | |
cb7f42cd JF |
243 | # UI colors |
244 | color title-blur white blue | |
245 | color title-focus white blue bold | |
2bc4f7bd JF |
246 | ------------------------------------------------------------------------------ |
247 | ||
248 | Area names:: | |
249 | ||
250 | Valid area names are described below. Note, all names are | |
251 | case-insensitive, and you may use '-', '_', and '.' interchangeably, | |
252 | e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same. | |
253 | ||
254 | Color names:: | |
255 | ||
256 | Valid colors include: *white*, *black*, *green*, *magenta*, *blue*, | |
257 | *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the | |
258 | default terminal colors. | |
259 | ||
260 | Attribute names:: | |
261 | ||
262 | Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*, | |
263 | *standout*, and *underline*. Note, not all attributes may be supported | |
264 | by the terminal. | |
265 | ||
266 | ||
267 | UI colors | |
268 | ~~~~~~~~~ | |
269 | ||
270 | -- | |
271 | ||
272 | Status window colors:: | |
273 | ||
274 | Appearance of the bottom window showing info messages. | |
275 | ||
276 | *status* | |
277 | ||
278 | Title window colors:: | |
279 | ||
280 | Appearence of the title windows when they are attached | |
281 | to any backgrounded windows and the current window. | |
282 | ||
283 | *title-blur*, *title-focus* | |
284 | ||
285 | Cursor line colors:: | |
286 | ||
287 | *cursor* | |
288 | ||
289 | Main view specific:: | |
290 | ||
291 | Appearance of the various columns in the main view, including the '~' used for | |
292 | delimiting long author names and labels for tag and branch references. | |
293 | ||
294 | *main-date*, *main-author*, *main-commit*, *main-delim*, *main-tag*, | |
295 | *main-ref* | |
296 | ||
297 | -- | |
298 | ||
299 | Highlighting | |
300 | ~~~~~~~~~~~~ | |
301 | ||
302 | The colors and attributes for text that is not highlighted can be controlled | |
303 | by changing the *default* color option. | |
304 | ||
305 | -- | |
306 | ||
307 | Diff markup:: | |
308 | ||
309 | Options concerning diff start, chunks and lines added and deleted. | |
310 | ||
311 | *diff-header*, *diff-chunk*, *diff-add*, *diff-del* | |
312 | ||
313 | Enhanced git diff markup:: | |
314 | ||
315 | Extra diff information emitted by the git diff machinery, such as mode | |
316 | changes, rename detection, and similarity. | |
317 | ||
318 | *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*, | |
319 | *diff-rename-from*, *diff-rename-to*, *diff-similarity* *diff-dissimilarity* | |
320 | *diff-tree*, *diff-index* | |
321 | ||
322 | Pretty print commit headers:: | |
323 | ||
324 | Commit diffs and the revision logs are usually formatted using pretty printed | |
325 | headers , unless `--pretty=raw` was given. This includes lines, such as merge | |
326 | info, commit ID, and author and comitter date. | |
327 | ||
328 | *pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate* | |
329 | ||
330 | Raw commit header:: | |
331 | ||
332 | Usually shown when `--pretty=raw` is given, however 'commit' is pretty much | |
333 | omnipresent. | |
334 | ||
335 | *commit*, *parent*, *tree*, *author*, *committer* | |
336 | ||
337 | Commit message:: | |
338 | ||
d4d8de8f | 339 | For now only `Signed-off-by` and `Acked-by` lines are colorized. |
2bc4f7bd | 340 | |
d4d8de8f | 341 | *signoff*, *acked* |
2bc4f7bd JF |
342 | |
343 | -- | |
344 | ||
345 | COPYRIGHT | |
346 | --------- | |
347 | Copyright (c) 2006 Jonas Fonseca <fonseca@diku.dk> | |
348 | ||
349 | Licensed under the terms of the GNU General Public License. | |
cb7f42cd JF |
350 | |
351 | SEE ALSO | |
352 | -------- | |
e664e260 | 353 | gitlink:tig[1] and the http://jonas.nitro.dk/tig/manual.html[tig manual]. |