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