Code

Add an option (and toggle) for shortening the date column by skipping the time.
[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 = yes           # Show author?
45 set show-rev-graph = yes        # Show revision graph?
46 set show-refs = yes             # Show references?
47 set show-line-numbers = no      # Show line numbers?
48 set line-number-interval = 5    # Interval between line numbers
49 set commit-encoding = "UTF-8"   # Commit encoding
50 set horizontal-scroll = 33%     # Scroll 33% of the view width
51 --------------------------------------------------------------------------
53 Or in the git configuration files:
55 --------------------------------------------------------------------------
56 [tig]
57         show-date = yes         # Show commit date?
58         author-width = 10       # Set width of the author column
59         line-graphics = no      # Disable graphics characters
60         tab-size = 8            # Number of spaces per tab
61 --------------------------------------------------------------------------
63 The type of variables are either bool, int, string, or mixed.
65 Valid bool values::
67         To set a bool variable to true use either "1", "true", or "yes".
68         Any other value will set the variable to false.
70 Valid int values::
72         A non-negative integer.
74 Valid string values::
76         A string of characters. Optionally, use either ' or " as delimiters.
78 Valid mixed values::
80         These values are composites of the above types. The valid values are
81         specified in the description.
83 Variables
84 ~~~~~~~~~
86 The following variables can be set:
88 'show-author' (bool)::
89 'show-date' (bool)::
90 'show-rev-graph' (bool)::
91 'show-refs' (bool)::
93         Whether to show author, date, revision graph, and references
94         (branches, tags, and remotes) in the main view on start-up. Can all be
95         toggled.
97 'date-short' (bool)::
99         Whether to shorten the date column in the main view to just the date
100         on startup. Can be toggled.
102 'author-width' (int)::
104         Width of the author column. When set to 5 or below, the author name
105         will be abbreviated to the author's initials.
107 'line-graphics' (bool)::
109         Whether to use graphic characters for line drawing.
111 'line-number-interval' (int)::
113         Interval between line numbers. Note, you have to toggle on line
114         numbering with 'n' or the `-n` command line option.  The default is to
115         number every line.
117 'tab-size' (int)::
119         Number of spaces per tab. The default is 8 spaces.
121 'horizontal-scroll' (mixed)::
123         Interval to scroll horizontally in each step. Can be specified either
124         as the number of columns, e.g. '5', or as a percentage of the view
125         width, e.g. '33%', where the maximum is 100%. For percentages it is
126         always ensured that at least one column is scrolled. The default is to
127         scroll '50%' of the view width.
129 'split-view-height' (mixed)::
131         Height of the lower view in a split view. Can be specified either as
132         the number of rows, e.g. '5', or as a percentage of the view height,
133         e.g. '80%', where the maximum is 100%. It is always ensured that the
134         smaller of the views is at least four rows high. The default is a view
135         height of '66%'.
137 'commit-encoding' (string)::
139         The encoding used for commits. The default is UTF-8. Not this option
140         is shadowed by the "i18n.commitencoding" option in `.git/config`.
143 Bind command
144 ------------
146 Using bind commands keys can be mapped to an action when pressed in a given
147 key map. The syntax is:
149 [verse]
150 *bind* 'keymap' 'key' 'action'
152 Examples:
154 --------------------------------------------------------------------------
155 # A few keybindings
156 bind main w scroll-line-up
157 bind main s scroll-line-down
158 bind main space enter
159 bind diff a previous
160 bind diff d next
161 bind diff b move-first-line
162 # An external command to update from upstream
163 bind generic F !git fetch
164 --------------------------------------------------------------------------
166 Or in the git configuration files:
168 --------------------------------------------------------------------------
169 [tig "bind"]
170         # 'unbind' the default quit key binding
171         main = Q none
172         # Cherry-pick current commit onto current branch
173         generic = C !git cherry-pick %(commit)
174 --------------------------------------------------------------------------
176 Keys are mapped by first searching the keybindings for the current view, then
177 the keybindings for the *generic* keymap, and last the default keybindings.
178 Thus, the view keybindings shadow the generic keybindings which Shadow the
179 built-in keybindings.
181 --
183 Keymaps::
185 Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
186 *tree*, *blob*, *blame*, *branch*, and *generic*.  Use *generic* to set key
187 mapping in all keymaps.
189 Key values::
191 Key values should never be quoted. Use either the ASCII value or one of the
192 following symbolic key names. Symbolic key names are case insensitive, Use
193 *Hash* to bind to the `#` key, since the hash mark is used as a comment
194 character.
196 *Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*,
197 *Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*,
198 *F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*.
200 Action names::
202 Valid action names are described below. Note, all names are
203 case-insensitive, and you may use '-', '_', and '.' interchangeably,
204 e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
206 --
208 Actions
209 ~~~~~~~
211 Apart from the action names listed below, all actions starting with a '!' will
212 be available as an external command. External commands can contain variable
213 names that will be substituted before the command is run. Valid variable names
214 are:
216 ifdef::backend-xhtml11[]
217 [frame="none"]
218 `-----------------------`-----------------------------------------------------
219 endif::backend-xhtml11[]
220 Browsing state variables
221 ------------------------------------------------------------------------------
222 %(head)                 The currently viewed 'head' ID. Defaults to HEAD
223 %(commit)               The currently selected commit ID.
224 %(blob)                 The currently selected blob ID.
225 %(directory)            The current directory path in the tree view; \
226                         empty for the root directory.
227 %(file)                 The currently selected file.
228 %(ref)                  The reference given to blame or HEAD if undefined.
229 ------------------------------------------------------------------------------
231 As an example, the following external command will save the current commit as
232 a patch file: "!git format-patch -1 %(commit)". If your external command
233 require use of dynamic features, such as subshells, expansion of environment
234 variables and process control, this can be achieved by using a combination of
235 git aliases and tig external commands. The following example entries can be
236 put in either the .gitconfig or .git/config file:
238 --------------------------------------------------------------------------
239 [alias]
240         gitk-bg = !"gitk HEAD --not $(git rev-parse --remotes) &"
241         publish = !"for i in origin public; do git push $i; done"
242 [tig "bind"]
243         generic = V !git gitk-bg
244         generic = > !git publish
245 --------------------------------------------------------------------------
247 ifdef::backend-xhtml11[]
248 [frame="none"]
249 `-----------------------`-----------------------------------------------------
250 endif::backend-xhtml11[]
251 View switching:
252 ------------------------------------------------------------------------------
253 view-main               Show main view
254 view-diff               Show diff view
255 view-log                Show log view
256 view-tree               Show tree view
257 view-blob               Show blob view
258 view-blame              Show blame view
259 view-branch             Show branch view
260 view-status             Show status view
261 view-stage              Show stage view
262 view-pager              Show pager view
263 view-help               Show help page
264 ------------------------------------------------------------------------------
266 ifdef::backend-xhtml11[]
267 [frame="none"]
268 `-----------------------`-----------------------------------------------------
269 endif::backend-xhtml11[]
270 View manipulation:
271 ------------------------------------------------------------------------------
272 enter                   Enter current line and scroll
273 next                    Move to next
274 previous                Move to previous
275 parent                  Move to parent
276 view-next               Move focus to next view
277 refresh                 Reload and refresh view
278 maximize                Maximize the current view
279 view-close              Close the current view
280 quit                    Close all views and quit
281 ------------------------------------------------------------------------------
283 ifdef::backend-xhtml11[]
284 [frame="none"]
285 `-----------------------`-----------------------------------------------------
286 endif::backend-xhtml11[]
287 View specific actions:
288 ------------------------------------------------------------------------------
289 status-update           Update file status
290 status-merge            Resolve unmerged file
291 stage-next              Find next chunk to stage
292 ------------------------------------------------------------------------------
294 ifdef::backend-xhtml11[]
295 [frame="none"]
296 `-----------------------`-----------------------------------------------------
297 endif::backend-xhtml11[]
298 Cursor navigation:
299 ------------------------------------------------------------------------------
300 move-up                 Move cursor one line up
301 move-down               Move cursor one line down
302 move-page-down          Move cursor one page down
303 move-page-up            Move cursor one page up
304 move-first-line         Move cursor to first line
305 move-last-line          Move cursor to last line
306 ------------------------------------------------------------------------------
308 ifdef::backend-xhtml11[]
309 [frame="none"]
310 `-----------------------`-----------------------------------------------------
311 endif::backend-xhtml11[]
312 Scrolling:
313 ------------------------------------------------------------------------------
314 scroll-line-up          Scroll one line up
315 scroll-line-down        Scroll one line down
316 scroll-page-up          Scroll one page up
317 scroll-page-down        Scroll one page down
318 scroll-left             Scroll one column left
319 scroll-right            Scroll one column right
320 ------------------------------------------------------------------------------
322 ifdef::backend-xhtml11[]
323 [frame="none"]
324 `-----------------------`-----------------------------------------------------
325 endif::backend-xhtml11[]
326 Searching:
327 ------------------------------------------------------------------------------
328 search                  Search the view
329 search-back             Search backwards in the view
330 find-next               Find next search match
331 find-prev               Find previous search match
332 ------------------------------------------------------------------------------
334 ifdef::backend-xhtml11[]
335 [frame="none"]
336 `-----------------------`-----------------------------------------------------
337 endif::backend-xhtml11[]
338 Misc:
339 ------------------------------------------------------------------------------
340 prompt                  Bring up the prompt
341 screen-redraw           Redraw the screen
342 screen-resize           Resize the screen
343 show-version            Show version information
344 stop-loading            Stop all loading views
345 options                 Open options menu
346 toggle-lineno           Toggle line numbers
347 toggle-date             Toggle date display
348 toggle-date-short       Toggle short (date-only) dates
349 toggle-author           Toggle author display
350 toggle-rev-graph        Toggle revision graph visualization
351 toggle-refs             Toggle reference display
352 edit                    Open in editor
353 none                    Do nothing
354 ------------------------------------------------------------------------------
357 Color command
358 -------------
360 Color commands control highlighting and the user interface styles. If your
361 terminal supports color, these commands can be used to assign foreground and
362 background combinations to certain areas. Optionally, an attribute can be
363 given as the last parameter. The syntax is:
365 [verse]
366 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
368 Examples:
370 ------------------------------------------------------------------------------
371 # Overwrite the default terminal colors to white on black.
372 color default           white   black
373 # Diff colors
374 color diff-header       yellow  default
375 color diff-index        blue    default
376 color diff-chunk        magenta default
377 --------------------------------------------------------------------------
379 Or in the git configuration files:
381 --------------------------------------------------------------------------
382 [tig "color"]
383         # A strange looking cursor line
384         cursor          red     default underline
385         # UI colors
386         title-blur      white   blue
387         title-focus     white   blue    bold
388 ------------------------------------------------------------------------------
390 Area names::
392         Valid area names are described below. Note, all names are
393         case-insensitive, and you may use '-', '_', and '.' interchangeably,
394         e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
396 Color names::
398         Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
399         *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
400         default terminal colors. This is recommended for background colors if
401         you are using a terminal with a transparent background.
403 Colors can also be specified using the keywords color0, color1, ..., colorN-1
404 (N being the number of colors supported by your terminal). This is useful when
405 you remap the colors for your display or want to enable colors supported by
406 256-color terminals.
408 Attribute names::
410         Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
411         *standout*, and *underline*. Note, not all attributes may be supported
412         by the terminal.
414 UI colors
415 ~~~~~~~~~
417 The colors and attributes to be used for the text that is not highlighted or
418 that specify the use of the default terminal colors can be controlled by
419 setting the *default* color option.
421 ifdef::backend-xhtml11[]
422 [frame="none"]
423 `-----------------------`-----------------------------------------------------
424 endif::backend-xhtml11[]
425 General:
426 ------------------------------------------------------------------------------
427 default                 Overwrite default terminal colors (see above).
428 cursor                  The cursor line.
429 status                  The status window showing info messages.
430 title-focus             The title window for the current view.
431 title-blur              The title window of any backgrounded view.
432 delimiter               Delimiter shown for truncated lines.
433 line-number             Line numbers.
434 date                    The commit date.
435 author                  The commit author.
436 mode                    The file mode holding the permissions and type.
437 ------------------------------------------------------------------------------
439 ifdef::backend-xhtml11[]
440 [frame="none"]
441 `-----------------------`-----------------------------------------------------
442 endif::backend-xhtml11[]
443 Main view colors:
444 ------------------------------------------------------------------------------
445 main-revgraph           The revision graph.
446 main-commit             The commit comment.
447 main-head               Label of the current branch.
448 main-remote             Label of a remote.
449 main-tracked            Label of the remote tracked by the current branch.
450 main-tag                Label of a signed tag.
451 main-local-tag          Label of a local tag.
452 main-ref                Label of any other reference.
453 ------------------------------------------------------------------------------
455 ifdef::backend-xhtml11[]
456 [frame="none"]
457 `-----------------------`-----------------------------------------------------
458 endif::backend-xhtml11[]
459 Status view:
460 ------------------------------------------------------------------------------
461 stat-head               The "On branch"-line.
462 stat-section            Status section titles,
463 stat-staged             Status flag of staged files.
464 stat-unstaged           Status flag of unstaged files.
465 stat-untracked          Status flag of untracked files.
466 ------------------------------------------------------------------------------
468 ifdef::backend-xhtml11[]
469 [frame="none"]
470 `-----------------------`-----------------------------------------------------
471 endif::backend-xhtml11[]
472 Blame view:
473 ------------------------------------------------------------------------------
474 blame-id                The commit ID.
475 ------------------------------------------------------------------------------
477 ifdef::backend-xhtml11[]
478 [frame="none"]
479 `-----------------------`-----------------------------------------------------
480 endif::backend-xhtml11[]
481 Tree view:
482 ------------------------------------------------------------------------------
483 tree-head               The "Directory /"-line
484 tree-dir                The directory name.
485 tree-file               The file name.
486 ------------------------------------------------------------------------------
488 Highlighting
489 ~~~~~~~~~~~~
491 --
493 Diff markup::
495 Options concerning diff start, chunks and lines added and deleted.
497 *diff-header*, *diff-chunk*, *diff-add*, *diff-del*
499 Enhanced git diff markup::
501 Extra diff information emitted by the git diff machinery, such as mode
502 changes, rename detection, and similarity.
504 *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
505 *diff-rename-from*, *diff-rename-to*, *diff-similarity*, *diff-dissimilarity*
506 *diff-tree*, *diff-index*
508 Pretty print commit headers::
510 Commit diffs and the revision logs are usually formatted using pretty printed
511 headers , unless `--pretty=raw` was given. This includes lines, such as merge
512 info, commit ID, and author and committer date.
514 *pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*,
515 *pp-refs*
517 Raw commit header::
519 Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
520 omnipresent.
522 *commit*, *parent*, *tree*, *author*, *committer*
524 Commit message::
526 For now only `Signed-off-by` and `Acked-by` lines are colorized.
528 *signoff*, *acked*
530 Tree markup::
532 Colors for information of the tree view.
534 *tree-dir*, *tree-file*
536 --
538 COPYRIGHT
539 ---------
540 Copyright (c) 2006-2009 Jonas Fonseca <fonseca@diku.dk>
542 Licensed under the terms of the GNU General Public License.
544 SEE ALSO
545 --------
546 manpage:tig[1], git-config(1),
547 and the http://jonas.nitro.dk/tig/manual.html[tig manual].