1 tigrc(5)
2 ========
4 NAME
5 ----
6 tigrc - tig configuration file
9 SYNOPSIS
10 --------
11 [verse]
12 .............................................................................
13 *set* 'variable' *=* 'value'
14 *bind* 'keymap' 'key' 'action'
15 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
16 .............................................................................
19 DESCRIPTION
20 -----------
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.
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.
30 Alternatively, options can be set by putting them in one of the git
31 configuration files, which are read by tig on startup. See 'git-config(1)' for
32 which files to use.
34 Set command
35 -----------
37 A few selective variables can be configured via the set command. The syntax
38 is:
40 [verse]
41 ..............................................................................
42 *set* variables *=* value
43 ..............................................................................
45 Examples:
47 --------------------------------------------------------------------------
48 set show-author = yes # Show author?
49 set show-date = yes # Show commit date?
50 set show-rev-graph = yes # Show revision graph?
51 set show-refs = yes # Show references?
52 set show-line-numbers = no # Show line numbers?
53 set line-number-interval = 5 # Interval between line numbers
54 --------------------------------------------------------------------------
56 Or in the git configuration files:
58 --------------------------------------------------------------------------
59 [tig]
60 author-width = 10 # Set width of the author column
61 line-graphics = no # Disable graphics characters
62 tab-size = 8 # Number of spaces per tab
63 encoding = "UTF-8" # Commit encoding
64 --------------------------------------------------------------------------
66 The type of variables are either bool, int, and string.
68 Valid bool values::
70 To set a bool variable to true use either "1", "true", or "yes".
71 Any other value will set the variable to false.
73 Valid int values::
75 A non-negative integer.
77 Valid string values::
79 A string of characters. Optionally, use either ' or " as delimiters.
81 Variables
82 ~~~~~~~~~
84 The following variables can be set:
86 'show-author' (bool)::
87 'show-date' (bool)::
88 'show-rev-graph' (bool)::
89 'show-refs' (bool)::
91 Whether to show author, date, revision graph, and references
92 (branches, tags, and remotes) in the main view on start-up. Can all be
93 toggled.
95 'author-width' (int)::
97 Width of the author column. When set to 5 or below, the author name
98 will be abbreviated to the author's initials.
100 'line-graphics' (bool)::
102 Whether to use graphic characters for line drawing.
104 'line-number-interval' (int)::
106 Interval between line numbers. Note, you have to toggle on line
107 numbering with 'n' or the `-n` command line option. The default is to
108 number every line.
110 'tab-size' (int)::
112 Number of spaces per tab. The default is 8 spaces.
114 'commit-encoding' (string)::
116 The encoding used for commits. The default is UTF-8. Not this option
117 is shadowed by the "i18n.commitencoding" option in `.git/config`.
120 Bind command
121 ------------
123 Using bind commands keys can be mapped to an action when pressed in a given
124 key map. The syntax is:
126 [verse]
127 ..............................................................................
128 *bind* 'keymap' 'key' 'action'
129 ..............................................................................
131 Examples:
133 --------------------------------------------------------------------------
134 # A few keybindings
135 bind main w scroll-line-up
136 bind main s scroll-line-down
137 bind main space enter
138 bind diff a previous
139 bind diff d next
140 bind diff b move-first-line
141 # An external command to update from upstream
142 bind generic F !git fetch
143 --------------------------------------------------------------------------
145 Or in the git configuration files:
147 --------------------------------------------------------------------------
148 [tig "bind"]
149 # 'unbind' the default quit key binding
150 main = Q none
151 # Cherry-pick current commit onto current branch
152 generic = C !git cherry-pick %(commit)
153 --------------------------------------------------------------------------
155 Keys are mapped by first searching the keybindings for the current view, then
156 the keybindings for the *generic* keymap, and last the default keybindings.
157 Thus, the view keybindings shadow the generic keybindings which Shadow the
158 built-in keybindings.
160 --
162 Keymaps::
164 Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
165 and *generic*. Use *generic* to set key mapping in all keymaps.
167 Key values::
169 Key values should never be quoted. Use either the ASCII value or one of the
170 following symbolic key names. Symbolic key names are case insensitive, Use
171 *Hash* to bind to the `#` key, since the hash mark is used as a comment
172 character.
174 *Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*,
175 *Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*,
176 *F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*.
178 Action names::
180 Valid action names are described below. Note, all names are
181 case-insensitive, and you may use '-', '_', and '.' interchangeably,
182 e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
184 --
186 Actions
187 ~~~~~~~
189 Apart from the action names listed below, all actions starting with a '!' will
190 be available as an external command. External commands can contain variable
191 names that will be substituted before the command is run. Valid variable names
192 are:
194 ifdef::backend-xhtml11[]
195 [frame="none"]
196 `-----------------------`-----------------------------------------------------
197 endif::backend-xhtml11[]
198 Browsing state variables
199 ------------------------------------------------------------------------------
200 %(head) The currently viewed 'head' ID. Defaults to HEAD
201 %(commit) The currently selected commit ID.
202 %(blob) The currently selected blob ID.
203 %(directory) The current directory path in the tree view; \
204 empty for the root directory.
205 %(file) The currently selected file.
206 %(ref) The reference given to blame or HEAD if undefined.
207 ------------------------------------------------------------------------------
209 As an example, the following external command will save the current commit as
210 a patch file: "!git format-patch -1 %(commit)".
212 ifdef::backend-xhtml11[]
213 [frame="none"]
214 `-----------------------`-----------------------------------------------------
215 endif::backend-xhtml11[]
216 View switching:
217 ------------------------------------------------------------------------------
218 view-main Show main view
219 view-diff Show diff view
220 view-log Show log view
221 view-tree Show tree view
222 view-blob Show blob view
223 view-blame Show blame view
224 view-status Show status view
225 view-stage Show stage view
226 view-pager Show pager view
227 view-help Show help page
228 ------------------------------------------------------------------------------
230 ifdef::backend-xhtml11[]
231 [frame="none"]
232 `-----------------------`-----------------------------------------------------
233 endif::backend-xhtml11[]
234 View manipulation:
235 ------------------------------------------------------------------------------
236 enter Enter current line and scroll
237 next Move to next
238 previous Move to previous
239 parent Move to parent
240 view-next Move focus to next view
241 refresh Reload and refresh view
242 maximize Maximize the current view
243 view-close Close the current view
244 quit Close all views and quit
245 ------------------------------------------------------------------------------
247 ifdef::backend-xhtml11[]
248 [frame="none"]
249 `-----------------------`-----------------------------------------------------
250 endif::backend-xhtml11[]
251 View specific actions:
252 ------------------------------------------------------------------------------
253 status-update Update file status
254 status-merge Resolve unmerged file
255 stage-next Find next chunk to stage
256 ------------------------------------------------------------------------------
258 ifdef::backend-xhtml11[]
259 [frame="none"]
260 `-----------------------`-----------------------------------------------------
261 endif::backend-xhtml11[]
262 Cursor navigation:
263 ------------------------------------------------------------------------------
264 move-up Move cursor one line up
265 move-down Move cursor one line down
266 move-page-down Move cursor one page down
267 move-page-up Move cursor one page up
268 move-first-line Move cursor to first line
269 move-last-line Move cursor to last line
270 ------------------------------------------------------------------------------
272 ifdef::backend-xhtml11[]
273 [frame="none"]
274 `-----------------------`-----------------------------------------------------
275 endif::backend-xhtml11[]
276 Scrolling:
277 ------------------------------------------------------------------------------
278 scroll-line-up Scroll one line up
279 scroll-line-down Scroll one line down
280 scroll-page-up Scroll one page up
281 scroll-page-down Scroll one page down
282 scroll-left Scroll one column left
283 scroll-right Scroll one column right
284 ------------------------------------------------------------------------------
286 ifdef::backend-xhtml11[]
287 [frame="none"]
288 `-----------------------`-----------------------------------------------------
289 endif::backend-xhtml11[]
290 Searching:
291 ------------------------------------------------------------------------------
292 search Search the view
293 search-back Search backwards in the view
294 find-next Find next search match
295 find-prev Find previous search match
296 ------------------------------------------------------------------------------
298 ifdef::backend-xhtml11[]
299 [frame="none"]
300 `-----------------------`-----------------------------------------------------
301 endif::backend-xhtml11[]
302 Misc:
303 ------------------------------------------------------------------------------
304 prompt Bring up the prompt
305 screen-redraw Redraw the screen
306 screen-resize Resize the screen
307 show-version Show version information
308 stop-loading Stop all loading views
309 toggle-lineno Toggle line numbers
310 toggle-date Toggle date display
311 toggle-author Toggle author display
312 toggle-rev-graph Toggle revision graph visualization
313 toggle-refs Toggle reference display
314 edit Open in editor
315 none Do nothing
316 ------------------------------------------------------------------------------
319 Color command
320 -------------
322 Color commands control highlighting and the user interface styles. If your
323 terminal supports color, these commands can be used to assign foreground and
324 background combinations to certain areas. Optionally, an attribute can be
325 given as the last parameter. The syntax is:
327 [verse]
328 ..............................................................................
329 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
330 ..............................................................................
332 Examples:
334 ------------------------------------------------------------------------------
335 # Overwrite the default terminal colors to white on black.
336 color default white black
337 # Diff colors
338 color diff-header yellow default
339 color diff-index blue default
340 color diff-chunk magenta default
341 --------------------------------------------------------------------------
343 Or in the git configuration files:
345 --------------------------------------------------------------------------
346 [tig "color"]
347 # A strange looking cursor line
348 cursor red default underline
349 # UI colors
350 title-blur white blue
351 title-focus white blue bold
352 ------------------------------------------------------------------------------
354 Area names::
356 Valid area names are described below. Note, all names are
357 case-insensitive, and you may use '-', '_', and '.' interchangeably,
358 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
360 Color names::
362 Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
363 *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
364 default terminal colors. This is recommended for background colors
365 if you are using a terminal with a transparent background.
367 Attribute names::
369 Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
370 *standout*, and *underline*. Note, not all attributes may be supported
371 by the terminal.
373 UI colors
374 ~~~~~~~~~
376 The colors and attributes to be used for the text that is not highlighted or
377 that specify the use of the default terminal colors can be controlled by
378 setting the *default* color option.
380 ifdef::backend-xhtml11[]
381 [frame="none"]
382 `-----------------------`-----------------------------------------------------
383 endif::backend-xhtml11[]
384 General:
385 ------------------------------------------------------------------------------
386 default Overwrite default terminal colors (see above).
387 cursor The cursor line.
388 status The status window showing info messages.
389 title-focus The title window for the current view.
390 title-blur The title window of any backgrounded view.
391 delimiter Delimiter shown for truncated lines.
392 line-number Line numbers.
393 date The commit date.
394 author The commit author.
395 mode The file mode holding the permissions and type.
396 ------------------------------------------------------------------------------
398 ifdef::backend-xhtml11[]
399 [frame="none"]
400 `-----------------------`-----------------------------------------------------
401 endif::backend-xhtml11[]
402 Main view colors:
403 ------------------------------------------------------------------------------
404 main-revgraph The revision graph.
405 main-commit The commit comment.
406 main-head Label of the current branch.
407 main-remote Label of a remote.
408 main-tracked Label of the remote tracked by the current branch.
409 main-tag Label of a signed tag.
410 main-local-tag Label of a local tag.
411 main-ref Label of any other reference.
412 ------------------------------------------------------------------------------
414 ifdef::backend-xhtml11[]
415 [frame="none"]
416 `-----------------------`-----------------------------------------------------
417 endif::backend-xhtml11[]
418 Status view:
419 ------------------------------------------------------------------------------
420 stat-head The "On branch"-line.
421 stat-section Status section titles,
422 stat-staged Status flag of staged files.
423 stat-unstaged Status flag of unstaged files.
424 stat-untracked Status flag of untracked files.
425 ------------------------------------------------------------------------------
427 ifdef::backend-xhtml11[]
428 [frame="none"]
429 `-----------------------`-----------------------------------------------------
430 endif::backend-xhtml11[]
431 Blame view:
432 ------------------------------------------------------------------------------
433 blame-id The commit ID.
434 ------------------------------------------------------------------------------
436 ifdef::backend-xhtml11[]
437 [frame="none"]
438 `-----------------------`-----------------------------------------------------
439 endif::backend-xhtml11[]
440 Tree view:
441 ------------------------------------------------------------------------------
442 tree-head The "Directory /"-line
443 tree-dir The directory name.
444 tree-file The file name.
445 ------------------------------------------------------------------------------
447 Highlighting
448 ~~~~~~~~~~~~
450 --
452 Diff markup::
454 Options concerning diff start, chunks and lines added and deleted.
456 *diff-header*, *diff-chunk*, *diff-add*, *diff-del*
458 Enhanced git diff markup::
460 Extra diff information emitted by the git diff machinery, such as mode
461 changes, rename detection, and similarity.
463 *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
464 *diff-rename-from*, *diff-rename-to*, *diff-similarity*, *diff-dissimilarity*
465 *diff-tree*, *diff-index*
467 Pretty print commit headers::
469 Commit diffs and the revision logs are usually formatted using pretty printed
470 headers , unless `--pretty=raw` was given. This includes lines, such as merge
471 info, commit ID, and author and committer date.
473 *pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*,
474 *pp-refs*
476 Raw commit header::
478 Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
479 omnipresent.
481 *commit*, *parent*, *tree*, *author*, *committer*
483 Commit message::
485 For now only `Signed-off-by` and `Acked-by` lines are colorized.
487 *signoff*, *acked*
489 Tree markup::
491 Colors for information of the tree view.
493 *tree-dir*, *tree-file*
495 --
497 COPYRIGHT
498 ---------
499 Copyright (c) 2006-2009 Jonas Fonseca <fonseca@diku.dk>
501 Licensed under the terms of the GNU General Public License.
503 SEE ALSO
504 --------
505 manpage:tig[1], git-config(1),
506 and the http://jonas.nitro.dk/tig/manual.html[tig manual].