bccb30474c3797509a51d463ade00277cdc15501
1 tigrc(5)
2 ========
4 NAME
5 ----
6 tigrc - tig user 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.
31 Set command
32 -----------
34 A few selective variables can be configured via the set command. The syntax
35 is:
37 [verse]
38 ..............................................................................
39 *set* variables *=* value
40 ..............................................................................
42 Examples:
44 --------------------------------------------------------------------------
45 set show-author = yes # Show author?
46 set show-date = yes # Show commit date?
47 set show-rev-graph = yes # Show revision graph?
48 set show-refs = yes # Show references?
49 set show-line-numbers = no # Show line numbers?
50 set line-number-interval = 5 # Interval between line numbers
51 set tab-size = 8 # Number of spaces per tab
52 set encoding = "UTF-8" # Commit encoding
53 --------------------------------------------------------------------------
55 The type of variables are either bool, int, and string.
57 Valid bool values::
59 To set a bool variable to true use either "1", "true", or "yes".
60 Any other value will set the variable to false.
62 Valid int values::
64 A non-negative integer.
66 Valid string values::
68 A string of characters. Optionally, use either ' or " as delimiters.
70 Variables
71 ~~~~~~~~~
73 The following variables can be set:
75 'show-author' (bool)::
76 'show-date' (bool)::
77 'show-rev-graph' (bool)::
78 'show-refs' (bool)::
80 Whether to show author, date, revision graph, and references
81 (branches, tags, and remotes) in the main view on start-up. Can all be
82 toggled.
84 'line-number-interval' (int)::
86 Interval between line numbers. Note, you have to toggle on line
87 numbering with 'n' or the `-n` command line option. The default is to
88 number every line.
90 'tab-size' (int)::
92 Number of spaces per tab. The default is 8 spaces.
94 'commit-encoding' (string)::
96 The encoding used for commits. The default is UTF-8. Not this option
97 is shadowed by the "i18n.commitencoding" option in `.git/config`.
100 Bind command
101 ------------
103 Using bind commands keys can be mapped to an action when pressed in a given
104 key map. The syntax is:
106 [verse]
107 ..............................................................................
108 *bind* 'keymap' 'key' 'action'
109 ..............................................................................
111 Examples:
113 --------------------------------------------------------------------------
114 # A few keybindings
115 bind main w scroll-line-up
116 bind main s scroll-line-down
117 bind main space enter
118 bind diff a previous
119 bind diff d next
120 bind diff b move-first-line
121 # 'unbind' the default quit key binding
122 bind main Q none
123 # An external command to update from upstream
124 bind generic F !git fetch
125 # Cherry-pick current commit unto current branch
126 bind generic C !git cherry-pick %(commit)
127 --------------------------------------------------------------------------
129 Keys are mapped by first searching the keybindings for the current view, then
130 the keybindings for the *generic* keymap, and last the default keybindings.
131 Thus, the view keybindings shadow the generic keybindings which Shadow the
132 built-in keybindings.
134 --
136 Keymaps::
138 Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*,
139 and *generic*. Use *generic* to set key mapping in all keymaps.
141 Key values::
143 Key values should never be quoted. Use either the ASCII value or one of the
144 following symbolic key names. Symbolic key names are case insensitive, Use
145 *Hash* to bind to the `#` key, since the hash mark is used as a comment
146 character.
148 *Enter*, *Space*, *Backspace*, *Tab*, *Escape*, *Left*, *Right*, *Up*, *Down*,
149 *Insert*, *Delete*, *Hash*, *Home*, *End*, *PageUp*, *PageDown*, *F1*, *F2*, *F3*,
150 *F4*, *F5*, *F6*, *F7*, *F8*, *F9*, *F10*, *F11*, *F12*.
152 Action names::
154 Valid action names are described below. Note, all names are
155 case-insensitive, and you may use '-', '_', and '.' interchangeably,
156 e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same.
158 --
160 Actions
161 ~~~~~~~
163 Apart from the action names listed below, all actions starting with a '!' will
164 be available as an external command. External commands can contain variable
165 names that will be substituted before the command is run. Valid variable names
166 are "%(head)", "%(commit)", and "%(blob)".
168 As an example, the following external command will save the current commit as
169 a patch file: "!git format-patch %(commit)^..%(commit)".
171 ifdef::backend-xhtml11[]
172 [frame="none"]
173 `-----------------------`-----------------------------------------------------
174 endif::backend-xhtml11[]
175 View switching:
176 ------------------------------------------------------------------------------
177 view-main Show main view
178 view-diff Show diff view
179 view-log Show log view
180 view-tree Show tree view
181 view-blob Show blob view
182 view-blame Show blame view
183 view-status Show status view
184 view-stage Show stage view
185 view-pager Show pager view
186 view-help Show help page
187 ------------------------------------------------------------------------------
189 ifdef::backend-xhtml11[]
190 [frame="none"]
191 `-----------------------`-----------------------------------------------------
192 endif::backend-xhtml11[]
193 View manipulation:
194 ------------------------------------------------------------------------------
195 enter Enter current line and scroll
196 next Move to next
197 previous Move to previous
198 view-next Move focus to next view
199 refresh Reload and refresh view
200 maximize Maximize the current view
201 view-close Close the current view
202 quit Close all views and quit
203 ------------------------------------------------------------------------------
205 ifdef::backend-xhtml11[]
206 [frame="none"]
207 `-----------------------`-----------------------------------------------------
208 endif::backend-xhtml11[]
209 Cursor navigation:
210 ------------------------------------------------------------------------------
211 move-up Move cursor one line up
212 move-down Move cursor one line down
213 move-page-down Move cursor one page down
214 move-page-up Move cursor one page up
215 move-first-line Move cursor to first line
216 move-last-line Move cursor to last line
217 ------------------------------------------------------------------------------
219 ifdef::backend-xhtml11[]
220 [frame="none"]
221 `-----------------------`-----------------------------------------------------
222 endif::backend-xhtml11[]
223 Scrolling:
224 ------------------------------------------------------------------------------
225 scroll-line-up Scroll one line up
226 scroll-line-down Scroll one line down
227 scroll-page-eup Scroll one page up
228 scroll-page-down Scroll one page down
229 ------------------------------------------------------------------------------
231 ifdef::backend-xhtml11[]
232 [frame="none"]
233 `-----------------------`-----------------------------------------------------
234 endif::backend-xhtml11[]
235 Searching:
236 ------------------------------------------------------------------------------
237 search Search the view
238 search-back Search backwards in the view
239 find-next Find next search match
240 find-prev Find previous search match
241 ------------------------------------------------------------------------------
243 ifdef::backend-xhtml11[]
244 [frame="none"]
245 `-----------------------`-----------------------------------------------------
246 endif::backend-xhtml11[]
247 Misc:
248 ------------------------------------------------------------------------------
249 none Do nothing
250 prompt Bring up the prompt
251 screen-redraw Redraw the screen
252 screen-resize Resize the screen
253 show-version Show version information
254 stop-loading Stop all loading views
255 toggle-lineno Toggle line numbers
256 toggle-date Toggle date display
257 toggle-author Toggle author display
258 toggle-rev-graph Toggle revision graph visualization
259 toggle-refs Toggle reference display
260 status-update Update file status
261 status-merge Resolve unmerged file
262 tree-parent Switch to parent directory in tree view
263 edit Open in editor
264 ------------------------------------------------------------------------------
267 Color command
268 -------------
270 Color commands control highlighting and the user interface styles. If your
271 terminal supports color, these commands can be used to assign foreground and
272 background combinations to certain areas. Optionally, an attribute can be
273 given as the last parameter. The syntax is:
275 [verse]
276 ..............................................................................
277 *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
278 ..............................................................................
280 Examples:
282 ------------------------------------------------------------------------------
283 # Overwrite the default terminal colors to white on black.
284 color default white black
285 # Diff colors
286 color diff-header yellow default
287 color diff-index blue default
288 color diff-chunk magenta default
289 # A strange looking cursor line
290 color cursor red default underline
291 # UI colors
292 color title-blur white blue
293 color title-focus white blue bold
294 ------------------------------------------------------------------------------
296 Area names::
298 Valid area names are described below. Note, all names are
299 case-insensitive, and you may use '-', '_', and '.' interchangeably,
300 e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same.
302 Color names::
304 Valid colors include: *white*, *black*, *green*, *magenta*, *blue*,
305 *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the
306 default terminal colors. This is recommended for background colors
307 if you are using a terminal with a transparent background.
309 Attribute names::
311 Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*,
312 *standout*, and *underline*. Note, not all attributes may be supported
313 by the terminal.
315 UI colors
316 ~~~~~~~~~
318 The colors and attributes to be used for the text that is not highlighted or
319 that specify the use of the default terminal colors can be controlled by
320 setting the *default* color option.
322 ifdef::backend-xhtml11[]
323 [frame="none"]
324 `-----------------------`-----------------------------------------------------
325 endif::backend-xhtml11[]
326 General:
327 ------------------------------------------------------------------------------
328 default Overwrite default terminal colors (see above).
329 cursor The cursor line.
330 status The status window showing info messages.
331 title-focus The title window for the current view.
332 title-blur The title window of any backgrounded view.
333 delimiter Delimiter shown for truncated lines.
334 line-number Line numbers.
335 date The commit date.
336 ------------------------------------------------------------------------------
338 ifdef::backend-xhtml11[]
339 [frame="none"]
340 `-----------------------`-----------------------------------------------------
341 endif::backend-xhtml11[]
342 Main view colors:
343 ------------------------------------------------------------------------------
344 main-author The commit author.
345 main-revgraph The revision graph.
346 main-commit The commit comment.
347 main-head Label of the current branch.
348 main-remote Label of a remote.
349 main-tracked Label of the remote tracked by the current branch.
350 main-tag Label of a signed tag.
351 main-local-tag Label of a local tag.
352 main-ref Label of any other reference.
353 ------------------------------------------------------------------------------
355 ifdef::backend-xhtml11[]
356 [frame="none"]
357 `-----------------------`-----------------------------------------------------
358 endif::backend-xhtml11[]
359 Status view:
360 ------------------------------------------------------------------------------
361 stat-head The "On branch"-line.
362 stat-section Status section titles,
363 stat-staged Status flag of staged files.
364 stat-unstaged Status flag of unstaged files.
365 stat-untracked Status flag of untracked files.
366 ------------------------------------------------------------------------------
368 ifdef::backend-xhtml11[]
369 [frame="none"]
370 `-----------------------`-----------------------------------------------------
371 endif::backend-xhtml11[]
372 Blame view:
373 ------------------------------------------------------------------------------
374 blame-id The commit ID.
375 ------------------------------------------------------------------------------
377 Highlighting
378 ~~~~~~~~~~~~
380 --
382 Diff markup::
384 Options concerning diff start, chunks and lines added and deleted.
386 *diff-header*, *diff-chunk*, *diff-add*, *diff-del*
388 Enhanced git diff markup::
390 Extra diff information emitted by the git diff machinery, such as mode
391 changes, rename detection, and similarity.
393 *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*,
394 *diff-rename-from*, *diff-rename-to*, *diff-similarity*, *diff-dissimilarity*
395 *diff-tree*, *diff-index*
397 Pretty print commit headers::
399 Commit diffs and the revision logs are usually formatted using pretty printed
400 headers , unless `--pretty=raw` was given. This includes lines, such as merge
401 info, commit ID, and author and committer date.
403 *pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*,
404 *pp-refs*
406 Raw commit header::
408 Usually shown when `--pretty=raw` is given, however 'commit' is pretty much
409 omnipresent.
411 *commit*, *parent*, *tree*, *author*, *committer*
413 Commit message::
415 For now only `Signed-off-by` and `Acked-by` lines are colorized.
417 *signoff*, *acked*
419 Tree markup::
421 Colors for information of the tree view.
423 *tree-dir*, *tree-file*
425 --
427 COPYRIGHT
428 ---------
429 Copyright (c) 2006-2008 Jonas Fonseca <fonseca@diku.dk>
431 Licensed under the terms of the GNU General Public License.
433 SEE ALSO
434 --------
435 gitlink:tig[1] and the http://jonas.nitro.dk/tig/manual.html[tig manual].