Code

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