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