Code

tigrc(5): sort options alphabetically
[tig.git] / tigrc.5.txt
1 tigrc(5)
2 ========
4 NAME
5 ----
6 tigrc - tig configuration file
9 SYNOPSIS
10 --------
11 [verse]
12 *set*   'variable' *=* 'value'
13 *bind*  'keymap' 'key' 'action'
14 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
17 DESCRIPTION
18 -----------
20 You can permanently set an option by putting it in the `~/.tigrc` file.  The
21 file consists of a series of 'commands'.  Each line of the file may contain
22 only one command.
24 The hash mark ('#') is used as a 'comment' character. All text after the
25 comment character to the end of the line is ignored. You can use comments to
26 annotate your initialization file.
28 Alternatively, options can be set by putting them in one of the git
29 configuration files, which are read by tig on startup. See 'git-config(1)' for
30 which files to use.
32 Set command
33 -----------
35 A few selective variables can be configured via the set command. The syntax
36 is:
38 [verse]
39 *set* variables *=* value
41 Examples:
43 --------------------------------------------------------------------------
44 set show-author = abbreviated   # Show abbreviated author names.
45 set show-date = relative        # Show relative commit date.
46 set show-rev-graph = yes        # Show revision graph?
47 set show-refs = yes             # Show references?
48 set show-line-numbers = no      # Show line numbers?
49 set line-number-interval = 5    # Interval between line numbers
50 set commit-encoding = "UTF-8"   # Commit encoding
51 set horizontal-scroll = 33%     # Scroll 33% of the view width
52 --------------------------------------------------------------------------
54 Or in the git configuration files:
56 --------------------------------------------------------------------------
57 [tig]
58         show-date = yes         # Show commit date?
59         author-width = 10       # Set width of the author column
60         line-graphics = no      # Disable graphics characters
61         tab-size = 8            # Number of spaces per tab
62 --------------------------------------------------------------------------
64 The type of variables are either bool, int, string, or mixed.
66 Valid bool values::
68         To set a bool variable to true use either "1", "true", or "yes".
69         Any other value will set the variable to false.
71 Valid int values::
73         A non-negative integer.
75 Valid string values::
77         A string of characters. Optionally, use either ' or " as delimiters.
79 Valid mixed values::
81         These values are composites of the above types. The valid values are
82         specified in the description.
84 Variables
85 ~~~~~~~~~
87 The following variables can be set:
89 'author-width' (int)::
91         Width of the author column. When set to 5 or below, the author name
92         will be abbreviated to the author's initials.
94 'commit-encoding' (string)::
96         The encoding used for commits. The default is UTF-8. Note this option
97         is shadowed by the "i18n.commitencoding" option in `.git/config`.
99 'line-graphics' (mixed) [ "ascii" | "default" | "utf-8" | bool]::
101         What type of character graphics for line drawing.
103 'line-number-interval' (int)::
105         Interval between line numbers. Note, you have to toggle on line
106         numbering with 'n' or the `-n` command line option.  The default is to
107         number every line.
109 'horizontal-scroll' (mixed)::
111         Interval to scroll horizontally in each step. Can be specified either
112         as the number of columns, e.g. '5', or as a percentage of the view
113         width, e.g. '33%', where the maximum is 100%. For percentages it is
114         always ensured that at least one column is scrolled. The default is to
115         scroll '50%' of the view width.
117 'show-author' (mixed) ["abbreviated" | "default" | bool]::
119         How to display author names. If set to "abbreviated" author initials
120         will be shown. Can be toggled.
122 'show-date' (mixed) ["relative" | "short" | "default" | "local" | bool]::
124         Whether and how to show date. If set to "relative" a relative date will be
125         used, e.g. "2 minutes ago". If set to "short" no time information is
126         shown. If set to "local", localtime(3) is used. Can be toggled.
128 'show-refs' (bool)::
130         Whether to show references (branches, tags, and remotes) in the main
131         view on start-up. Can be toggled.
133 'show-rev-graph' (bool)::
135         Whether to show revision graph in the main view on start-up.
136         Can be toggled. See also line-graphics options.
138 'split-view-height' (mixed)::
140         Height of the lower view in a split view. Can be specified either as
141         the number of rows, e.g. '5', or as a percentage of the view height,
142         e.g. '80%', where the maximum is 100%. It is always ensured that the
143         smaller of the views is at least four rows high. The default is a view
144         height of '66%'.
146 'status-untracked-dirs' (bool)::
148         Show untracked directories contents in the status view (analog to
149         `git ls-files --directory` option. On by default.
151 'tab-size' (int)::
153         Number of spaces per tab. The default is 8 spaces.
155 Bind command
156 ------------
158 Using bind commands keys can be mapped to an action when pressed in a given
159 key map. The syntax is:
161 [verse]
162 *bind* 'keymap' 'key' 'action'
164 Examples:
166 --------------------------------------------------------------------------
167 # A few keybindings
168 bind main w scroll-line-up
169 bind main s scroll-line-down
170 bind main space enter
171 bind diff a previous
172 bind diff d next
173 bind diff b move-first-line
174 # An external command to update from upstream
175 bind generic F !git fetch
176 --------------------------------------------------------------------------
178 Or in the git configuration files:
180 --------------------------------------------------------------------------
181 [tig "bind"]
182         # 'unbind' the default quit key binding
183         main = Q none
184         # Cherry-pick current commit onto current branch
185         generic = C !git cherry-pick %(commit)
186 --------------------------------------------------------------------------
188 Keys are mapped by first searching the keybindings for the current view, then
189 the keybindings for the *generic* keymap, and last the default keybindings.
190 Thus, the view keybindings shadow the generic keybindings which Shadow the
191 built-in keybindings.
193 --
195 Keymaps::
197 Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
198 *tree*, *blob*, *blame*, *branch*, and *generic*.  Use *generic* to set key
199 mapping in all keymaps.
201 Key values::
203 Key values should never be quoted. Use either the ASCII value or one of the
204 following symbolic key names. Symbolic key names are case insensitive, Use
205 *Hash* to bind to the `#` key, since the hash mark is used as a comment
206 character.
208 *Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*,
209 *Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*,
210 *F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*.
212 Action names::
214 Valid action names are described below. Note, all names are
215 case-insensitive, and you may use '-', '_', and '.' interchangeably,
216 e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
218 --
220 Actions
221 ~~~~~~~
223 Apart from the action names listed below, all actions starting with a '!' will
224 be available as an external command. External commands can contain variable
225 names that will be substituted before the command is run. Valid variable names
226 are:
228 .Browsing state variables
229 [frame="none",grid="none",cols="25<m,75<"]
230 |=============================================================================
231 |%(head)                |The currently viewed 'head' ID. Defaults to HEAD
232 |%(commit)              |The currently selected commit ID.
233 |%(blob)                |The currently selected blob ID.
234 |%(branch)              |The currently selected branch name.
235 |%(directory)           |The current directory path in the tree view;
236                          empty for the root directory.
237 |%(file)                |The currently selected file.
238 |%(ref)                 |The reference given to blame or HEAD if undefined.
239 |%(revargs)             |The revision arguments passed on the command line.
240 |%(fileargs)            |The file arguments passed on the command line.
241 |%(diffargs)            |The diff options passed on the command line.
242 |=============================================================================
244 As an example, the following external command will save the current commit as
245 a patch file: "!git format-patch -1 %(commit)". If your external command
246 require use of dynamic features, such as subshells, expansion of environment
247 variables and process control, this can be achieved by using a combination of
248 git aliases and tig external commands. The following example entries can be
249 put in either the .gitconfig or .git/config file:
251 --------------------------------------------------------------------------
252 [alias]
253         gitk-bg = !"gitk HEAD --not $(git rev-parse --remotes) &"
254         publish = !"for i in origin public; do git push $i; done"
255 [tig "bind"]
256         generic = V !git gitk-bg
257         generic = > !git publish
258 --------------------------------------------------------------------------
260 .View switching
261 [frame="none",grid="none",cols="25<m,75<"]
262 |=============================================================================
263 |view-main              |Show main view
264 |view-diff              |Show diff view
265 |view-log               |Show log view
266 |view-tree              |Show tree view
267 |view-blob              |Show blob view
268 |view-blame             |Show blame view
269 |view-branch            |Show branch view
270 |view-status            |Show status view
271 |view-stage             |Show stage view
272 |view-pager             |Show pager view
273 |view-help              |Show help page
274 |=============================================================================
276 .View manipulation
277 [frame="none",grid="none",cols="25<m,75<"]
278 |=============================================================================
279 |enter                  |Enter current line and scroll
280 |next                   |Move to next
281 |previous               |Move to previous
282 |parent                 |Move to parent
283 |view-next              |Move focus to next view
284 |refresh                |Reload and refresh view
285 |maximize               |Maximize the current view
286 |view-close             |Close the current view
287 |quit                   |Close all views and quit
288 |=============================================================================
290 .View specific actions
291 [frame="none",grid="none",cols="25<m,75<"]
292 |=============================================================================
293 |status-update          |Update file status
294 |status-merge           |Resolve unmerged file
295 |stage-next             |Find next chunk to stage
296 |=============================================================================
298 .Cursor navigation
299 [frame="none",grid="none",cols="25<m,75<"]
300 |=============================================================================
301 |move-up                |Move cursor one line up
302 |move-down              |Move cursor one line down
303 |move-page-down         |Move cursor one page down
304 |move-page-up           |Move cursor one page up
305 |move-first-line        |Move cursor to first line
306 |move-last-line         |Move cursor to last line
307 |=============================================================================
309 .Scrolling
310 [frame="none",grid="none",cols="25<m,75<"]
311 |=============================================================================
312 |scroll-line-up         |Scroll one line up
313 |scroll-line-down       |Scroll one line down
314 |scroll-page-up         |Scroll one page up
315 |scroll-page-down       |Scroll one page down
316 |scroll-first-col       |Scroll to the first column
317 |scroll-left            |Scroll one column left
318 |scroll-right           |Scroll one column right
319 |=============================================================================
321 .Searching
322 [frame="none",grid="none",cols="25<m,75<"]
323 |=============================================================================
324 |search                 |Search the view
325 |search-back            |Search backwards in the view
326 |find-next              |Find next search match
327 |find-prev              |Find previous search match
328 |=============================================================================
330 .Misc
331 [frame="none",grid="none",cols="25<m,75<"]
332 |=============================================================================
333 |prompt                 |Bring up the prompt
334 |screen-redraw          |Redraw the screen
335 |screen-resize          |Resize the screen
336 |show-version           |Show version information
337 |stop-loading           |Stop all loading views
338 |options                |Open options menu
339 |toggle-lineno          |Toggle line numbers
340 |toggle-date            |Toggle date display
341 |toggle-author          |Toggle author display
342 |toggle-rev-graph       |Toggle revision graph visualization
343 |toggle-graphic         |Toggle (line) graphics mode
344 |toggle-refs            |Toggle reference display
345 |edit                   |Open in editor
346 |none                   |Do nothing
347 |=============================================================================
350 Color command
351 -------------
353 Color commands control highlighting and the user interface styles. If your
354 terminal supports color, these commands can be used to assign foreground and
355 background combinations to certain areas. Optionally, an attribute can be
356 given as the last parameter. The syntax is:
358 [verse]
359 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
361 Examples:
363 ------------------------------------------------------------------------------
364 # Overwrite the default terminal colors to white on black.
365 color default           white   black
366 # Diff colors
367 color diff-header       yellow  default
368 color diff-index        blue    default
369 color diff-chunk        magenta default
370 --------------------------------------------------------------------------
372 Or in the git configuration files:
374 --------------------------------------------------------------------------
375 [tig "color"]
376         # A strange looking cursor line
377         cursor          red     default underline
378         # UI colors
379         title-blur      white   blue
380         title-focus     white   blue    bold
381 ------------------------------------------------------------------------------
383 Area names::
385         Valid area names are described below. Note, all names are
386         case-insensitive, and you may use '-', '_', and '.' interchangeably,
387         e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
389 Color names::
391         Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
392         *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
393         default terminal colors. This is recommended for background colors if
394         you are using a terminal with a transparent background.
396 Colors can also be specified using the keywords color0, color1, ..., colorN-1
397 (N being the number of colors supported by your terminal). This is useful when
398 you remap the colors for your display or want to enable colors supported by
399 256-color terminals.
401 Attribute names::
403         Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
404         *standout*, and *underline*. Note, not all attributes may be supported
405         by the terminal.
407 UI colors
408 ~~~~~~~~~
410 The colors and attributes to be used for the text that is not highlighted or
411 that specify the use of the default terminal colors can be controlled by
412 setting the *default* color option.
414 .General
415 [frame="none",grid="none",cols="25<m,75<"]
416 |=============================================================================
417 |default                |Overwrite default terminal colors (see above).
418 |cursor                 |The cursor line.
419 |status                 |The status window showing info messages.
420 |title-focus            |The title window for the current view.
421 |title-blur             |The title window of any backgrounded view.
422 |delimiter              |Delimiter shown for truncated lines.
423 |line-number            |Line numbers.
424 |date                   |The commit date.
425 |author                 |The commit author.
426 |mode                   |The file mode holding the permissions and type.
427 |=============================================================================
429 .Main view colors
430 [frame="none",grid="none",cols="25<m,75<"]
431 |=============================================================================
432 |main-revgraph          |The revision graph.
433 |main-commit            |The commit comment.
434 |main-head              |Label of the current branch.
435 |main-remote            |Label of a remote.
436 |main-tracked           |Label of the remote tracked by the current branch.
437 |main-tag               |Label of a signed tag.
438 |main-local-tag         |Label of a local tag.
439 |main-ref               |Label of any other reference.
440 |=============================================================================
442 .Status view
443 [frame="none",grid="none",cols="25<m,75<"]
444 |=============================================================================
445 |stat-head              |The "On branch"-line.
446 |stat-section           |Status section titles,
447 |stat-staged            |Status flag of staged files.
448 |stat-unstaged          |Status flag of unstaged files.
449 |stat-untracked         |Status flag of untracked files.
450 |=============================================================================
452 .Blame view
453 [frame="none",grid="none",cols="25<m,75<"]
454 |=============================================================================
455 |blame-id               |The commit ID.
456 |=============================================================================
458 .Tree view
459 [frame="none",grid="none",cols="25<m,75<"]
460 |=============================================================================
461 |tree-head              |The "Directory /"-line
462 |tree-dir               |The directory name.
463 |tree-file              |The file name.
464 |=============================================================================
466 Highlighting
467 ~~~~~~~~~~~~
469 --
471 Diff markup::
473 Options concerning diff start, chunks and lines added and deleted.
475 *diff-header*, *diff-chunk*, *diff-add*, *diff-del*
477 Enhanced git diff markup::
479 Extra diff information emitted by the git diff machinery, such as mode
480 changes, rename detection, and similarity.
482 *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
483 *diff-rename-from*, *diff-rename-to*, *diff-similarity*, *diff-dissimilarity*
484 *diff-tree*, *diff-index*
486 Pretty print commit headers::
488 Commit diffs and the revision logs are usually formatted using pretty printed
489 headers , unless `--pretty=raw` was given. This includes lines, such as merge
490 info, commit ID, and author and committer date.
492 *pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*,
493 *pp-refs*
495 Raw commit header::
497 Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
498 omnipresent.
500 *commit*, *parent*, *tree*, *author*, *committer*
502 Commit message::
504 `Signed-off-by`, `Acked-by`, `Reviewed-by` and `Tested-by` lines are colorized.
506 *signoff*, *acked*, *reviewed*, *tested*
508 Tree markup::
510 Colors for information of the tree view.
512 *tree-dir*, *tree-file*
514 --
516 COPYRIGHT
517 ---------
518 Copyright (c) 2006-2010 Jonas Fonseca <fonseca@diku.dk>
520 Licensed under the terms of the GNU General Public License.
522 SEE ALSO
523 --------
524 manpage:tig[1], manpage:tigmanual[7], git-config(1),
525 and the http://jonas.nitro.dk/tig/manual.html[tig manual].