tig-0.9.1
[tig] / tigrc.5.txt
CommitLineData
cb7f42cd
JF
1tigrc(5)
2========
3
4NAME
5----
6tigrc - tig user configuration file
7
2bc4f7bd 8
cb7f42cd
JF
9SYNOPSIS
10--------
11[verse]
12.............................................................................
2bc4f7bd
JF
13*set* variable *=* value
14*bind* keymap key action
15*color* area fgcolor bgcolor [attributes]
cb7f42cd
JF
16.............................................................................
17
2bc4f7bd 18
cb7f42cd
JF
19DESCRIPTION
20-----------
cb7f42cd 21
2bc4f7bd
JF
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.
cb7f42cd 25
2bc4f7bd
JF
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.
cb7f42cd 29
cb7f42cd 30
2bc4f7bd
JF
31Set command
32-----------
cb7f42cd 33
2bc4f7bd
JF
34A few selective variables can be configured via the set command. The syntax
35is:
cb7f42cd 36
2bc4f7bd
JF
37[verse]
38..............................................................................
39 *set* variables *=* value
40..............................................................................
cb7f42cd 41
2bc4f7bd 42Examples:
cb7f42cd 43
2bc4f7bd
JF
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--------------------------------------------------------------------------
cb7f42cd 50
2bc4f7bd 51The type of variables are either bool, int, and string.
cb7f42cd 52
2bc4f7bd 53Valid bool values::
cb7f42cd 54
2bc4f7bd
JF
55 To set a bool variable to true use either "1", "true", or "yes".
56 Any other value will set the variable to false.
cb7f42cd 57
2bc4f7bd 58Valid int values::
cb7f42cd 59
2bc4f7bd 60 A non-negative integer.
cb7f42cd 61
2bc4f7bd 62Valid string values::
cb7f42cd 63
2bc4f7bd 64 A string of characters. Optionally, use either ' or " as delimiters.
cb7f42cd 65
2bc4f7bd
JF
66Variables
67~~~~~~~~~
cb7f42cd 68
2bc4f7bd 69The following variables can be set:
cb7f42cd 70
2bc4f7bd 71'show-rev-graph' (bool)::
cb7f42cd 72
f7ffec06 73 Show revision graph in the main view on start-up. Can be toggled with
2bc4f7bd 74 'g'.
cb7f42cd 75
2bc4f7bd 76'line-number-interval' (int)::
cb7f42cd 77
2bc4f7bd
JF
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.
cb7f42cd 81
2bc4f7bd 82'tab-size' (int)::
cb7f42cd 83
2bc4f7bd 84 Number of spaces per tab. The default is 8 spaces.
cb7f42cd 85
2bc4f7bd 86'commit-encoding' (string)::
cb7f42cd 87
2bc4f7bd
JF
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`.
cb7f42cd 90
cb7f42cd 91
2bc4f7bd
JF
92Bind command
93------------
cb7f42cd 94
2bc4f7bd
JF
95Using bind commands keys can be mapped to an action when pressed in a given
96key map. The syntax is:
cb7f42cd 97
2bc4f7bd
JF
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
1d754561
JF
113 # 'unbind' the default quit key binding
114 bind main Q none
2bc4f7bd
JF
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.
f7ffec06 119Thus, the view keybindings shadow the generic keybindings which Shadow the
2bc4f7bd
JF
120built-in keybindings.
121
122--
123
124Keymaps::
125
f9a044a4
JF
126Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
127and *generic*. Use *generic* to set key mapping in all keymaps.
2bc4f7bd
JF
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[]
765595f3 155View switching:
2bc4f7bd
JF
156------------------------------------------------------------------------------
157view-main Show main view
158view-diff Show diff view
159view-log Show log view
9d6976b9
JF
160view-tree Show tree view
161view-blob Show blob view
173d76ea 162view-status Show status view
f9a044a4 163view-stage Show stage view
2bc4f7bd 164view-pager Show pager view
9d6976b9 165view-help Show help page
2bc4f7bd
JF
166------------------------------------------------------------------------------
167
168ifdef::backend-xhtml11[]
169[frame="none"]
170`-----------------------`-----------------------------------------------------
171endif::backend-xhtml11[]
765595f3 172View manipulation:
2bc4f7bd
JF
173------------------------------------------------------------------------------
174enter Enter current line and scroll
175next Move to next
176previous Move to previous
177view-next Move focus to next view
272818ea 178refresh Reload and refresh view
2bc4f7bd
JF
179view-close Close the current view
180quit Close all views and quit
181------------------------------------------------------------------------------
182
183ifdef::backend-xhtml11[]
184[frame="none"]
185`-----------------------`-----------------------------------------------------
186endif::backend-xhtml11[]
765595f3 187Cursor navigation:
2bc4f7bd
JF
188------------------------------------------------------------------------------
189move-up Move cursor one line up
190move-down Move cursor one line down
9d6976b9
JF
191move-page-down Move cursor one page down
192move-page-up Move cursor one page up
193move-first-line Move cursor to first line
194move-last-line Move cursor to last line
2bc4f7bd
JF
195------------------------------------------------------------------------------
196
197ifdef::backend-xhtml11[]
198[frame="none"]
199`-----------------------`-----------------------------------------------------
200endif::backend-xhtml11[]
765595f3 201Scrolling:
2bc4f7bd 202------------------------------------------------------------------------------
9d6976b9
JF
203scroll-line-up Scroll one line up
204scroll-line-down Scroll one line down
205scroll-page-eup Scroll one page up
206scroll-page-down Scroll one page down
2bc4f7bd
JF
207------------------------------------------------------------------------------
208
209ifdef::backend-xhtml11[]
210[frame="none"]
211`-----------------------`-----------------------------------------------------
212endif::backend-xhtml11[]
f9a044a4
JF
213Searching:
214------------------------------------------------------------------------------
215search Search the view
216search-back Search backwards in the view
217find-next Find next search match
218find-prev Find previous search match
219------------------------------------------------------------------------------
220
221ifdef::backend-xhtml11[]
222[frame="none"]
223`-----------------------`-----------------------------------------------------
224endif::backend-xhtml11[]
765595f3 225Misc:
2bc4f7bd 226------------------------------------------------------------------------------
1d754561 227none Do nothing
2bc4f7bd 228prompt Bring up the prompt
2bc4f7bd
JF
229screen-redraw Redraw the screen
230screen-resize Resize the screen
231show-version Show version information
232stop-loading Stop all loading views
233toggle-lineno Toggle line numbers
9d6976b9 234toggle-rev-graph Toggle revision graph visualization
ca1d71ea 235status-update Update file status
b5c18d9d 236status-merge Resolve unmerged file
f9a044a4 237edit Open in editor
226da94b 238cherry-pick Cherry-pick commit to current branch
2bc4f7bd
JF
239------------------------------------------------------------------------------
240
241
242Color command
243-------------
cb7f42cd 244
2bc4f7bd
JF
245Color commands control highlighting and the user interface styles. If your
246terminal supports color, these commands can be used to assign foreground and
f7ffec06 247background combinations to certain areas. Optionally, an attribute can be given
2bc4f7bd
JF
248as the last parameter. The syntax is:
249
250[verse]
251..............................................................................
252 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
253..............................................................................
cb7f42cd 254
2bc4f7bd 255Examples:
cb7f42cd 256
2bc4f7bd 257------------------------------------------------------------------------------
cb7f42cd
JF
258 # Diff colors
259 color diff-header yellow default
260 color diff-index blue default
261 color diff-chunk magenta default
2bc4f7bd
JF
262 # A strange looking cursor line
263 color cursor red default underline
cb7f42cd
JF
264 # UI colors
265 color title-blur white blue
266 color title-focus white blue bold
2bc4f7bd
JF
267------------------------------------------------------------------------------
268
269Area names::
270
271 Valid area names are described below. Note, all names are
272 case-insensitive, and you may use '-', '_', and '.' interchangeably,
273 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
274
275Color names::
276
277 Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
278 *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
279 default terminal colors.
280
281Attribute names::
282
283 Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
284 *standout*, and *underline*. Note, not all attributes may be supported
285 by the terminal.
286
287
288UI colors
289~~~~~~~~~
290
291--
292
293Status window colors::
294
295Appearance of the bottom window showing info messages.
296
297*status*
298
299Title window colors::
300
f7ffec06 301Appearance of the title windows when they are attached
2bc4f7bd
JF
302to any backgrounded windows and the current window.
303
304*title-blur*, *title-focus*
305
306Cursor line colors::
307
308*cursor*
309
310Main view specific::
311
312Appearance of the various columns in the main view, including the '~' used for
313delimiting long author names and labels for tag and branch references.
314
315*main-date*, *main-author*, *main-commit*, *main-delim*, *main-tag*,
e15ec88e 316*main-ref*, *main-remote*
2bc4f7bd
JF
317
318--
319
320Highlighting
321~~~~~~~~~~~~
322
323The colors and attributes for text that is not highlighted can be controlled
324by changing the *default* color option.
325
326--
327
328Diff markup::
329
330Options concerning diff start, chunks and lines added and deleted.
331
332*diff-header*, *diff-chunk*, *diff-add*, *diff-del*
333
334Enhanced git diff markup::
335
336Extra diff information emitted by the git diff machinery, such as mode
337changes, rename detection, and similarity.
338
339*diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
340*diff-rename-from*, *diff-rename-to*, *diff-similarity* *diff-dissimilarity*
341*diff-tree*, *diff-index*
342
343Pretty print commit headers::
344
345Commit diffs and the revision logs are usually formatted using pretty printed
346headers , unless `--pretty=raw` was given. This includes lines, such as merge
f7ffec06 347info, commit ID, and author and committer date.
2bc4f7bd
JF
348
349*pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*
350
351Raw commit header::
352
353Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
354omnipresent.
355
356*commit*, *parent*, *tree*, *author*, *committer*
357
358Commit message::
359
d4d8de8f 360For now only `Signed-off-by` and `Acked-by` lines are colorized.
2bc4f7bd 361
d4d8de8f 362*signoff*, *acked*
2bc4f7bd
JF
363
364--
365
366COPYRIGHT
367---------
f9a044a4 368Copyright (c) 2006-2007 Jonas Fonseca <fonseca@diku.dk>
2bc4f7bd
JF
369
370Licensed under the terms of the GNU General Public License.
cb7f42cd
JF
371
372SEE ALSO
373--------
e664e260 374gitlink:tig[1] and the http://jonas.nitro.dk/tig/manual.html[tig manual].