Make tig handle GIT_DIR better
[tig] / tigrc.5.txt
... / ...
CommitLineData
1tigrc(5)
2========
3
4NAME
5----
6tigrc - tig user configuration file
7
8
9SYNOPSIS
10--------
11[verse]
12.............................................................................
13*set* variable *=* value
14*bind* keymap key action
15*color* area fgcolor bgcolor [attributes]
16.............................................................................
17
18
19DESCRIPTION
20-----------
21
22You can permanently set an option by putting it in the `~/.tigrc` file. The
23file consists of a series of 'commands'. Each line of the file may contain
24only one command.
25
26The hash mark ('#') is used as a 'comment' character. All text after the
27comment character to the end of the line is ignored. You can use comments to
28annotate your initialization file.
29
30
31Set command
32-----------
33
34A few selective variables can be configured via the set command. The syntax
35is:
36
37[verse]
38..............................................................................
39 *set* variables *=* value
40..............................................................................
41
42Examples:
43
44--------------------------------------------------------------------------
45 set show-rev-graph = yes # Show revision graph?
46 set line-number-interval = 5 # Interval between line numbers
47 set tab-size = 8 # Number of spaces pr tab
48 set encoding = "UTF-8" # Commit encoding
49--------------------------------------------------------------------------
50
51The type of variables are either bool, int, and string.
52
53Valid bool values::
54
55 To set a bool variable to true use either "1", "true", or "yes".
56 Any other value will set the variable to false.
57
58Valid int values::
59
60 A non-negative integer.
61
62Valid string values::
63
64 A string of characters. Optionally, use either ' or " as delimiters.
65
66Variables
67~~~~~~~~~
68
69The following variables can be set:
70
71'show-rev-graph' (bool)::
72
73 Show revision graph in the main view on start-up. Can be toggled with
74 'g'.
75
76'line-number-interval' (int)::
77
78 Interval between line numbers. Note, you have to toggle on line
79 numbering with 'n' or the `-n` command line option. The default is to
80 number every line.
81
82'tab-size' (int)::
83
84 Number of spaces per tab. The default is 8 spaces.
85
86'commit-encoding' (string)::
87
88 The encoding used for commits. The default is UTF-8. Not this option
89 is shadowed by the "i18n.commitencoding" option in `.git/config`.
90
91
92Bind command
93------------
94
95Using bind commands keys can be mapped to an action when pressed in a given
96key map. The syntax is:
97
98[verse]
99..............................................................................
100 *bind* 'keymap' 'key' 'action'
101..............................................................................
102
103Examples:
104
105--------------------------------------------------------------------------
106 # A few keybindings
107 bind main w scroll-line-up
108 bind main s scroll-line-down
109 bind main space enter
110 bind diff a previous
111 bind diff d next
112 bind diff b move-first-line
113 # 'unbind' the default quit key binding
114 bind main Q none
115--------------------------------------------------------------------------
116
117Keys are mapped by first searching the keybindings for the current view, then
118the keybindings for the *generic* keymap, and last the default keybindings.
119Thus, the view keybindings shadow the generic keybindings which Shadow the
120built-in keybindings.
121
122--
123
124Keymaps::
125
126Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, and *generic*. Use
127*generic* to set key mapping in all keymaps.
128
129Key values::
130
131Key values should never be quoted. Use either the ASCII value or one of the
132following symbolic key names. Symbolic key names are case insensitive, Use
133*Hash* to bind to the `#` key, since the hash mark is used as a comment
134character.
135
136*Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*,
137*Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*,
138*F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*.
139
140Action names::
141
142Valid action names are described below. Note, all names are
143case-insensitive, and you may use '-', '_', and '.' interchangeably,
144e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
145
146--
147
148Actions
149~~~~~~~
150
151ifdef::backend-xhtml11[]
152[frame="none"]
153`-----------------------`-----------------------------------------------------
154endif::backend-xhtml11[]
155View switching:
156------------------------------------------------------------------------------
157view-main Show main view
158view-diff Show diff view
159view-log Show log view
160view-tree Show tree view
161view-blob Show blob view
162view-pager Show pager view
163view-help Show help page
164------------------------------------------------------------------------------
165
166ifdef::backend-xhtml11[]
167[frame="none"]
168`-----------------------`-----------------------------------------------------
169endif::backend-xhtml11[]
170View manipulation:
171------------------------------------------------------------------------------
172enter Enter current line and scroll
173next Move to next
174previous Move to previous
175view-next Move focus to next view
176view-close Close the current view
177quit Close all views and quit
178------------------------------------------------------------------------------
179
180ifdef::backend-xhtml11[]
181[frame="none"]
182`-----------------------`-----------------------------------------------------
183endif::backend-xhtml11[]
184Cursor navigation:
185------------------------------------------------------------------------------
186move-up Move cursor one line up
187move-down Move cursor one line down
188move-page-down Move cursor one page down
189move-page-up Move cursor one page up
190move-first-line Move cursor to first line
191move-last-line Move cursor to last line
192------------------------------------------------------------------------------
193
194ifdef::backend-xhtml11[]
195[frame="none"]
196`-----------------------`-----------------------------------------------------
197endif::backend-xhtml11[]
198Scrolling:
199------------------------------------------------------------------------------
200scroll-line-up Scroll one line up
201scroll-line-down Scroll one line down
202scroll-page-eup Scroll one page up
203scroll-page-down Scroll one page down
204------------------------------------------------------------------------------
205
206ifdef::backend-xhtml11[]
207[frame="none"]
208`-----------------------`-----------------------------------------------------
209endif::backend-xhtml11[]
210Misc:
211------------------------------------------------------------------------------
212none Do nothing
213prompt Bring up the prompt
214screen-redraw Redraw the screen
215screen-resize Resize the screen
216show-version Show version information
217stop-loading Stop all loading views
218toggle-lineno Toggle line numbers
219toggle-rev-graph Toggle revision graph visualization
220------------------------------------------------------------------------------
221
222
223Color command
224-------------
225
226Color commands control highlighting and the user interface styles. If your
227terminal supports color, these commands can be used to assign foreground and
228background combinations to certain areas. Optionally, an attribute can be given
229as the last parameter. The syntax is:
230
231[verse]
232..............................................................................
233 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
234..............................................................................
235
236Examples:
237
238------------------------------------------------------------------------------
239 # Diff colors
240 color diff-header yellow default
241 color diff-index blue default
242 color diff-chunk magenta default
243 # A strange looking cursor line
244 color cursor red default underline
245 # UI colors
246 color title-blur white blue
247 color title-focus white blue bold
248------------------------------------------------------------------------------
249
250Area names::
251
252 Valid area names are described below. Note, all names are
253 case-insensitive, and you may use '-', '_', and '.' interchangeably,
254 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
255
256Color names::
257
258 Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
259 *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
260 default terminal colors.
261
262Attribute names::
263
264 Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
265 *standout*, and *underline*. Note, not all attributes may be supported
266 by the terminal.
267
268
269UI colors
270~~~~~~~~~
271
272--
273
274Status window colors::
275
276Appearance of the bottom window showing info messages.
277
278*status*
279
280Title window colors::
281
282Appearance of the title windows when they are attached
283to any backgrounded windows and the current window.
284
285*title-blur*, *title-focus*
286
287Cursor line colors::
288
289*cursor*
290
291Main view specific::
292
293Appearance of the various columns in the main view, including the '~' used for
294delimiting long author names and labels for tag and branch references.
295
296*main-date*, *main-author*, *main-commit*, *main-delim*, *main-tag*,
297*main-ref*
298
299--
300
301Highlighting
302~~~~~~~~~~~~
303
304The colors and attributes for text that is not highlighted can be controlled
305by changing the *default* color option.
306
307--
308
309Diff markup::
310
311Options concerning diff start, chunks and lines added and deleted.
312
313*diff-header*, *diff-chunk*, *diff-add*, *diff-del*
314
315Enhanced git diff markup::
316
317Extra diff information emitted by the git diff machinery, such as mode
318changes, rename detection, and similarity.
319
320*diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
321*diff-rename-from*, *diff-rename-to*, *diff-similarity* *diff-dissimilarity*
322*diff-tree*, *diff-index*
323
324Pretty print commit headers::
325
326Commit diffs and the revision logs are usually formatted using pretty printed
327headers , unless `--pretty=raw` was given. This includes lines, such as merge
328info, commit ID, and author and committer date.
329
330*pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*
331
332Raw commit header::
333
334Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
335omnipresent.
336
337*commit*, *parent*, *tree*, *author*, *committer*
338
339Commit message::
340
341For now only `Signed-off-by` and `Acked-by` lines are colorized.
342
343*signoff*, *acked*
344
345--
346
347COPYRIGHT
348---------
349Copyright (c) 2006 Jonas Fonseca <fonseca@diku.dk>
350
351Licensed under the terms of the GNU General Public License.
352
353SEE ALSO
354--------
355gitlink:tig[1] and the http://jonas.nitro.dk/tig/manual.html[tig manual].