Add missing = for comparison in obsolete actions check
[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 # An external command to update from upstream
116 bind generic F !git fetch
117 # Cherry-pick current commit unto current branch
118 bind generic C !git cherry-pick %(commit)
119--------------------------------------------------------------------------
120
121Keys are mapped by first searching the keybindings for the current view, then
122the keybindings for the *generic* keymap, and last the default keybindings.
123Thus, the view keybindings shadow the generic keybindings which Shadow the
124built-in keybindings.
125
126--
127
128Keymaps::
129
130Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
131and *generic*. Use *generic* to set key mapping in all keymaps.
132
133Key values::
134
135Key values should never be quoted. Use either the ASCII value or one of the
136following symbolic key names. Symbolic key names are case insensitive, Use
137*Hash* to bind to the `#` key, since the hash mark is used as a comment
138character.
139
140*Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*,
141*Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*,
142*F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*.
143
144Action names::
145
146Valid action names are described below. Note, all names are
147case-insensitive, and you may use '-', '_', and '.' interchangeably,
148e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
149
150--
151
152Actions
153~~~~~~~
154
155Apart from the action names listed below, all actions starting with a '!' will
156be available as an external command. External commands can contain variable
157names that will be substituted before the command is run. Valid variable names
158are "%(head)", "%(commit)", and "%(blob)".
159
160As an example, the following external command will save the current commit as
161a patch file: "!git format-patch %(commit)^..%(commit)".
162
163ifdef::backend-xhtml11[]
164[frame="none"]
165`-----------------------`-----------------------------------------------------
166endif::backend-xhtml11[]
167View switching:
168------------------------------------------------------------------------------
169view-main Show main view
170view-diff Show diff view
171view-log Show log view
172view-tree Show tree view
173view-blob Show blob view
174view-status Show status view
175view-stage Show stage view
176view-pager Show pager view
177view-help Show help page
178------------------------------------------------------------------------------
179
180ifdef::backend-xhtml11[]
181[frame="none"]
182`-----------------------`-----------------------------------------------------
183endif::backend-xhtml11[]
184View manipulation:
185------------------------------------------------------------------------------
186enter Enter current line and scroll
187next Move to next
188previous Move to previous
189view-next Move focus to next view
190refresh Reload and refresh view
191view-close Close the current view
192quit Close all views and quit
193------------------------------------------------------------------------------
194
195ifdef::backend-xhtml11[]
196[frame="none"]
197`-----------------------`-----------------------------------------------------
198endif::backend-xhtml11[]
199Cursor navigation:
200------------------------------------------------------------------------------
201move-up Move cursor one line up
202move-down Move cursor one line down
203move-page-down Move cursor one page down
204move-page-up Move cursor one page up
205move-first-line Move cursor to first line
206move-last-line Move cursor to last line
207------------------------------------------------------------------------------
208
209ifdef::backend-xhtml11[]
210[frame="none"]
211`-----------------------`-----------------------------------------------------
212endif::backend-xhtml11[]
213Scrolling:
214------------------------------------------------------------------------------
215scroll-line-up Scroll one line up
216scroll-line-down Scroll one line down
217scroll-page-eup Scroll one page up
218scroll-page-down Scroll one page down
219------------------------------------------------------------------------------
220
221ifdef::backend-xhtml11[]
222[frame="none"]
223`-----------------------`-----------------------------------------------------
224endif::backend-xhtml11[]
225Searching:
226------------------------------------------------------------------------------
227search Search the view
228search-back Search backwards in the view
229find-next Find next search match
230find-prev Find previous search match
231------------------------------------------------------------------------------
232
233ifdef::backend-xhtml11[]
234[frame="none"]
235`-----------------------`-----------------------------------------------------
236endif::backend-xhtml11[]
237Misc:
238------------------------------------------------------------------------------
239none Do nothing
240prompt Bring up the prompt
241screen-redraw Redraw the screen
242screen-resize Resize the screen
243show-version Show version information
244stop-loading Stop all loading views
245toggle-lineno Toggle line numbers
246toggle-rev-graph Toggle revision graph visualization
247status-update Update file status
248status-merge Resolve unmerged file
249edit Open in editor
250------------------------------------------------------------------------------
251
252
253Color command
254-------------
255
256Color commands control highlighting and the user interface styles. If your
257terminal supports color, these commands can be used to assign foreground and
258background combinations to certain areas. Optionally, an attribute can be given
259as the last parameter. The syntax is:
260
261[verse]
262..............................................................................
263 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
264..............................................................................
265
266Examples:
267
268------------------------------------------------------------------------------
269 # Diff colors
270 color diff-header yellow default
271 color diff-index blue default
272 color diff-chunk magenta default
273 # A strange looking cursor line
274 color cursor red default underline
275 # UI colors
276 color title-blur white blue
277 color title-focus white blue bold
278------------------------------------------------------------------------------
279
280Area names::
281
282 Valid area names are described below. Note, all names are
283 case-insensitive, and you may use '-', '_', and '.' interchangeably,
284 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
285
286Color names::
287
288 Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
289 *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
290 default terminal colors.
291
292Attribute names::
293
294 Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
295 *standout*, and *underline*. Note, not all attributes may be supported
296 by the terminal.
297
298
299UI colors
300~~~~~~~~~
301
302--
303
304Status window colors::
305
306Appearance of the bottom window showing info messages.
307
308*status*
309
310Title window colors::
311
312Appearance of the title windows when they are attached
313to any backgrounded windows and the current window.
314
315*title-blur*, *title-focus*
316
317Cursor line colors::
318
319*cursor*
320
321Main view specific::
322
323Appearance of the various columns in the main view, including the '~' used for
324delimiting long author names and labels for tag and branch references.
325
326*main-date*, *main-author*, *main-commit*, *main-delim*, *main-tag*,
327*main-ref*, *main-remote*
328
329--
330
331Highlighting
332~~~~~~~~~~~~
333
334The colors and attributes for text that is not highlighted can be controlled
335by changing the *default* color option.
336
337--
338
339Diff markup::
340
341Options concerning diff start, chunks and lines added and deleted.
342
343*diff-header*, *diff-chunk*, *diff-add*, *diff-del*
344
345Enhanced git diff markup::
346
347Extra diff information emitted by the git diff machinery, such as mode
348changes, rename detection, and similarity.
349
350*diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
351*diff-rename-from*, *diff-rename-to*, *diff-similarity* *diff-dissimilarity*
352*diff-tree*, *diff-index*
353
354Pretty print commit headers::
355
356Commit diffs and the revision logs are usually formatted using pretty printed
357headers , unless `--pretty=raw` was given. This includes lines, such as merge
358info, commit ID, and author and committer date.
359
360*pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*
361
362Raw commit header::
363
364Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
365omnipresent.
366
367*commit*, *parent*, *tree*, *author*, *committer*
368
369Commit message::
370
371For now only `Signed-off-by` and `Acked-by` lines are colorized.
372
373*signoff*, *acked*
374
375--
376
377COPYRIGHT
378---------
379Copyright (c) 2006-2007 Jonas Fonseca <fonseca@diku.dk>
380
381Licensed under the terms of the GNU General Public License.
382
383SEE ALSO
384--------
385gitlink:tig[1] and the http://jonas.nitro.dk/tig/manual.html[tig manual].