Commit | Line | Data |
---|---|---|
cb7f42cd JF |
1 | tigrc(5) |
2 | ======== | |
3 | ||
4 | NAME | |
5 | ---- | |
6 | tigrc - tig user configuration file | |
7 | ||
2bc4f7bd | 8 | |
cb7f42cd JF |
9 | SYNOPSIS |
10 | -------- | |
11 | [verse] | |
12 | ............................................................................. | |
c3c24b0b JF |
13 | *set* 'variable' *=* 'value' |
14 | *bind* 'keymap' 'key' 'action' | |
15 | *color* 'area' 'fgcolor' 'bgcolor' '[attributes]' | |
cb7f42cd JF |
16 | ............................................................................. |
17 | ||
2bc4f7bd | 18 | |
cb7f42cd JF |
19 | DESCRIPTION |
20 | ----------- | |
cb7f42cd | 21 | |
2bc4f7bd JF |
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. | |
cb7f42cd | 25 | |
2bc4f7bd JF |
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. | |
cb7f42cd | 29 | |
cb7f42cd | 30 | |
2bc4f7bd JF |
31 | Set command |
32 | ----------- | |
cb7f42cd | 33 | |
2bc4f7bd JF |
34 | A few selective variables can be configured via the set command. The syntax |
35 | is: | |
cb7f42cd | 36 | |
2bc4f7bd JF |
37 | [verse] |
38 | .............................................................................. | |
c3c24b0b | 39 | *set* variables *=* value |
2bc4f7bd | 40 | .............................................................................. |
cb7f42cd | 41 | |
2bc4f7bd | 42 | Examples: |
cb7f42cd | 43 | |
2bc4f7bd | 44 | -------------------------------------------------------------------------- |
8d762458 DV |
45 | set show-author = yes # Show author? |
46 | set show-date = yes # Show commit date? | |
c3c24b0b | 47 | set show-rev-graph = yes # Show revision graph? |
8d762458 DV |
48 | set show-refs = yes # Show references? |
49 | set show-line-numbers = no # Show line numbers? | |
c3c24b0b JF |
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 | |
2bc4f7bd | 53 | -------------------------------------------------------------------------- |
cb7f42cd | 54 | |
2bc4f7bd | 55 | The type of variables are either bool, int, and string. |
cb7f42cd | 56 | |
2bc4f7bd | 57 | Valid bool values:: |
cb7f42cd | 58 | |
2bc4f7bd JF |
59 | To set a bool variable to true use either "1", "true", or "yes". |
60 | Any other value will set the variable to false. | |
cb7f42cd | 61 | |
2bc4f7bd | 62 | Valid int values:: |
cb7f42cd | 63 | |
2bc4f7bd | 64 | A non-negative integer. |
cb7f42cd | 65 | |
2bc4f7bd | 66 | Valid string values:: |
cb7f42cd | 67 | |
2bc4f7bd | 68 | A string of characters. Optionally, use either ' or " as delimiters. |
cb7f42cd | 69 | |
2bc4f7bd JF |
70 | Variables |
71 | ~~~~~~~~~ | |
cb7f42cd | 72 | |
2bc4f7bd | 73 | The following variables can be set: |
cb7f42cd | 74 | |
e97cce13 JF |
75 | 'show-author' (bool):: |
76 | 'show-date' (bool):: | |
2bc4f7bd | 77 | 'show-rev-graph' (bool):: |
e97cce13 | 78 | 'show-refs' (bool):: |
cb7f42cd | 79 | |
e97cce13 JF |
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. | |
cb7f42cd | 83 | |
2bc4f7bd | 84 | 'line-number-interval' (int):: |
cb7f42cd | 85 | |
2bc4f7bd JF |
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. | |
cb7f42cd | 89 | |
2bc4f7bd | 90 | 'tab-size' (int):: |
cb7f42cd | 91 | |
2bc4f7bd | 92 | Number of spaces per tab. The default is 8 spaces. |
cb7f42cd | 93 | |
2bc4f7bd | 94 | 'commit-encoding' (string):: |
cb7f42cd | 95 | |
2bc4f7bd JF |
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`. | |
cb7f42cd | 98 | |
cb7f42cd | 99 | |
2bc4f7bd JF |
100 | Bind command |
101 | ------------ | |
cb7f42cd | 102 | |
2bc4f7bd JF |
103 | Using bind commands keys can be mapped to an action when pressed in a given |
104 | key map. The syntax is: | |
cb7f42cd | 105 | |
2bc4f7bd JF |
106 | [verse] |
107 | .............................................................................. | |
c3c24b0b | 108 | *bind* 'keymap' 'key' 'action' |
2bc4f7bd JF |
109 | .............................................................................. |
110 | ||
111 | Examples: | |
112 | ||
113 | -------------------------------------------------------------------------- | |
c3c24b0b JF |
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) | |
2bc4f7bd JF |
127 | -------------------------------------------------------------------------- |
128 | ||
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. | |
f7ffec06 | 131 | Thus, the view keybindings shadow the generic keybindings which Shadow the |
2bc4f7bd JF |
132 | built-in keybindings. |
133 | ||
134 | -- | |
135 | ||
136 | Keymaps:: | |
137 | ||
f9a044a4 JF |
138 | Valid keymaps are: *main*, *diff*, *log*, *help*, *pager*, *status*, *stage*, |
139 | and *generic*. Use *generic* to set key mapping in all keymaps. | |
2bc4f7bd JF |
140 | |
141 | Key values:: | |
142 | ||
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. | |
147 | ||
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*. | |
151 | ||
152 | Action names:: | |
153 | ||
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. | |
157 | ||
158 | -- | |
159 | ||
160 | Actions | |
161 | ~~~~~~~ | |
162 | ||
9eb14b72 JF |
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)". | |
167 | ||
168 | As an example, the following external command will save the current commit as | |
169 | a patch file: "!git format-patch %(commit)^..%(commit)". | |
170 | ||
2bc4f7bd JF |
171 | ifdef::backend-xhtml11[] |
172 | [frame="none"] | |
173 | `-----------------------`----------------------------------------------------- | |
174 | endif::backend-xhtml11[] | |
765595f3 | 175 | View switching: |
2bc4f7bd JF |
176 | ------------------------------------------------------------------------------ |
177 | view-main Show main view | |
178 | view-diff Show diff view | |
179 | view-log Show log view | |
9d6976b9 JF |
180 | view-tree Show tree view |
181 | view-blob Show blob view | |
8a680988 | 182 | view-blame Show blame view |
173d76ea | 183 | view-status Show status view |
f9a044a4 | 184 | view-stage Show stage view |
2bc4f7bd | 185 | view-pager Show pager view |
9d6976b9 | 186 | view-help Show help page |
2bc4f7bd JF |
187 | ------------------------------------------------------------------------------ |
188 | ||
189 | ifdef::backend-xhtml11[] | |
190 | [frame="none"] | |
191 | `-----------------------`----------------------------------------------------- | |
192 | endif::backend-xhtml11[] | |
765595f3 | 193 | View manipulation: |
2bc4f7bd JF |
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 | |
272818ea | 199 | refresh Reload and refresh view |
2bc4f7bd JF |
200 | view-close Close the current view |
201 | quit Close all views and quit | |
202 | ------------------------------------------------------------------------------ | |
203 | ||
204 | ifdef::backend-xhtml11[] | |
205 | [frame="none"] | |
206 | `-----------------------`----------------------------------------------------- | |
207 | endif::backend-xhtml11[] | |
765595f3 | 208 | Cursor navigation: |
2bc4f7bd JF |
209 | ------------------------------------------------------------------------------ |
210 | move-up Move cursor one line up | |
211 | move-down Move cursor one line down | |
9d6976b9 JF |
212 | move-page-down Move cursor one page down |
213 | move-page-up Move cursor one page up | |
214 | move-first-line Move cursor to first line | |
215 | move-last-line Move cursor to last line | |
2bc4f7bd JF |
216 | ------------------------------------------------------------------------------ |
217 | ||
218 | ifdef::backend-xhtml11[] | |
219 | [frame="none"] | |
220 | `-----------------------`----------------------------------------------------- | |
221 | endif::backend-xhtml11[] | |
765595f3 | 222 | Scrolling: |
2bc4f7bd | 223 | ------------------------------------------------------------------------------ |
9d6976b9 JF |
224 | scroll-line-up Scroll one line up |
225 | scroll-line-down Scroll one line down | |
226 | scroll-page-eup Scroll one page up | |
227 | scroll-page-down Scroll one page down | |
2bc4f7bd JF |
228 | ------------------------------------------------------------------------------ |
229 | ||
230 | ifdef::backend-xhtml11[] | |
231 | [frame="none"] | |
232 | `-----------------------`----------------------------------------------------- | |
233 | endif::backend-xhtml11[] | |
f9a044a4 JF |
234 | Searching: |
235 | ------------------------------------------------------------------------------ | |
236 | search Search the view | |
237 | search-back Search backwards in the view | |
238 | find-next Find next search match | |
239 | find-prev Find previous search match | |
240 | ------------------------------------------------------------------------------ | |
241 | ||
242 | ifdef::backend-xhtml11[] | |
243 | [frame="none"] | |
244 | `-----------------------`----------------------------------------------------- | |
245 | endif::backend-xhtml11[] | |
765595f3 | 246 | Misc: |
2bc4f7bd | 247 | ------------------------------------------------------------------------------ |
1d754561 | 248 | none Do nothing |
2bc4f7bd | 249 | prompt Bring up the prompt |
2bc4f7bd JF |
250 | screen-redraw Redraw the screen |
251 | screen-resize Resize the screen | |
252 | show-version Show version information | |
253 | stop-loading Stop all loading views | |
254 | toggle-lineno Toggle line numbers | |
823057f4 DV |
255 | toggle-date Toggle date display |
256 | toggle-author Toggle author display | |
9d6976b9 | 257 | toggle-rev-graph Toggle revision graph visualization |
823057f4 | 258 | toggle-refs Toggle reference display |
ca1d71ea | 259 | status-update Update file status |
b5c18d9d | 260 | status-merge Resolve unmerged file |
c509eed2 | 261 | tree-parent Switch to parent directory in tree view |
f9a044a4 | 262 | edit Open in editor |
2bc4f7bd JF |
263 | ------------------------------------------------------------------------------ |
264 | ||
265 | ||
266 | Color command | |
267 | ------------- | |
cb7f42cd | 268 | |
2bc4f7bd JF |
269 | Color commands control highlighting and the user interface styles. If your |
270 | terminal supports color, these commands can be used to assign foreground and | |
62c7d1a7 JF |
271 | background combinations to certain areas. Optionally, an attribute can be |
272 | given as the last parameter. The syntax is: | |
2bc4f7bd JF |
273 | |
274 | [verse] | |
275 | .............................................................................. | |
c3c24b0b | 276 | *color* 'area' 'fgcolor' 'bgcolor' '[attributes]' |
2bc4f7bd | 277 | .............................................................................. |
cb7f42cd | 278 | |
2bc4f7bd | 279 | Examples: |
cb7f42cd | 280 | |
2bc4f7bd | 281 | ------------------------------------------------------------------------------ |
62c7d1a7 JF |
282 | # Overwrite the default terminal colors to white on black. |
283 | color default white black | |
c3c24b0b JF |
284 | # Diff colors |
285 | color diff-header yellow default | |
286 | color diff-index blue default | |
287 | color diff-chunk magenta default | |
288 | # A strange looking cursor line | |
289 | color cursor red default underline | |
290 | # UI colors | |
291 | color title-blur white blue | |
292 | color title-focus white blue bold | |
2bc4f7bd JF |
293 | ------------------------------------------------------------------------------ |
294 | ||
295 | Area names:: | |
296 | ||
297 | Valid area names are described below. Note, all names are | |
298 | case-insensitive, and you may use '-', '_', and '.' interchangeably, | |
299 | e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same. | |
300 | ||
301 | Color names:: | |
302 | ||
303 | Valid colors include: *white*, *black*, *green*, *magenta*, *blue*, | |
304 | *cyan*, *yellow*, *red*, *default*. Use *default* to refer to the | |
305 | default terminal colors. | |
306 | ||
307 | Attribute names:: | |
308 | ||
309 | Valid attributes include: *normal*, *blink*, *bold*, *dim*, *reverse*, | |
310 | *standout*, and *underline*. Note, not all attributes may be supported | |
311 | by the terminal. | |
312 | ||
2bc4f7bd JF |
313 | UI colors |
314 | ~~~~~~~~~ | |
315 | ||
316 | -- | |
317 | ||
62c7d1a7 JF |
318 | Default terminal colors:: |
319 | ||
320 | The colors and attributes to be used for the text that is not highlighted or | |
321 | that specify the use of the default terminal colors can be controlled by | |
322 | setting the *default* color option. | |
323 | ||
324 | Use the *default* color to use the colors configured for the terminal. This is | |
325 | the default and recommended if you are using a terminal with a transparent | |
326 | background. | |
327 | ||
2bc4f7bd JF |
328 | Status window colors:: |
329 | ||
330 | Appearance of the bottom window showing info messages. | |
331 | ||
332 | *status* | |
333 | ||
334 | Title window colors:: | |
335 | ||
f7ffec06 | 336 | Appearance of the title windows when they are attached |
2bc4f7bd JF |
337 | to any backgrounded windows and the current window. |
338 | ||
339 | *title-blur*, *title-focus* | |
340 | ||
341 | Cursor line colors:: | |
342 | ||
343 | *cursor* | |
344 | ||
345 | Main view specific:: | |
346 | ||
347 | Appearance of the various columns in the main view, including the '~' used for | |
348 | delimiting long author names and labels for tag and branch references. | |
349 | ||
350 | *main-date*, *main-author*, *main-commit*, *main-delim*, *main-tag*, | |
2384880b | 351 | *main-local-tag*, *main-ref*, *main-remote*, *main-revgraph* |
2bc4f7bd | 352 | |
8a680988 JF |
353 | Blame view colors:: |
354 | ||
355 | The colors used for the blame view are similar to those in the main view. | |
356 | The commit ID color can be colored using *blame-id*. | |
357 | ||
358 | *blame-date*, *blame-author*, *blame-commit*, *blame-id*, *blame-lineno* | |
359 | ||
2bc4f7bd JF |
360 | -- |
361 | ||
362 | Highlighting | |
363 | ~~~~~~~~~~~~ | |
364 | ||
2bc4f7bd JF |
365 | -- |
366 | ||
367 | Diff markup:: | |
368 | ||
369 | Options concerning diff start, chunks and lines added and deleted. | |
370 | ||
371 | *diff-header*, *diff-chunk*, *diff-add*, *diff-del* | |
372 | ||
373 | Enhanced git diff markup:: | |
374 | ||
375 | Extra diff information emitted by the git diff machinery, such as mode | |
376 | changes, rename detection, and similarity. | |
377 | ||
378 | *diff-oldmode*, *diff-newmode*, *diff-copy-from*, *diff-copy-to*, | |
7389c87e | 379 | *diff-rename-from*, *diff-rename-to*, *diff-similarity*, *diff-dissimilarity* |
2bc4f7bd JF |
380 | *diff-tree*, *diff-index* |
381 | ||
382 | Pretty print commit headers:: | |
383 | ||
384 | Commit diffs and the revision logs are usually formatted using pretty printed | |
385 | headers , unless `--pretty=raw` was given. This includes lines, such as merge | |
f7ffec06 | 386 | info, commit ID, and author and committer date. |
2bc4f7bd | 387 | |
13f3482f DV |
388 | *pp-author*, *pp-commit*, *pp-merge*, *pp-date*, *pp-adate*, *pp-cdate*, |
389 | *pp-refs* | |
2bc4f7bd JF |
390 | |
391 | Raw commit header:: | |
392 | ||
393 | Usually shown when `--pretty=raw` is given, however 'commit' is pretty much | |
394 | omnipresent. | |
395 | ||
396 | *commit*, *parent*, *tree*, *author*, *committer* | |
397 | ||
398 | Commit message:: | |
399 | ||
d4d8de8f | 400 | For now only `Signed-off-by` and `Acked-by` lines are colorized. |
2bc4f7bd | 401 | |
d4d8de8f | 402 | *signoff*, *acked* |
2bc4f7bd | 403 | |
13f3482f DV |
404 | Tree markup:: |
405 | ||
406 | Colors for information of the tree view. | |
407 | ||
408 | *tree-dir*, *tree-file* | |
409 | ||
410 | Status markup:: | |
411 | ||
412 | Colors used in the status view. | |
413 | ||
414 | *stat-section*, *stat-none*, *stat-staged*, *stat-unstaged*, *stat-untracked* | |
415 | ||
2bc4f7bd JF |
416 | -- |
417 | ||
418 | COPYRIGHT | |
419 | --------- | |
f9a044a4 | 420 | Copyright (c) 2006-2007 Jonas Fonseca <fonseca@diku.dk> |
2bc4f7bd JF |
421 | |
422 | Licensed under the terms of the GNU General Public License. | |
cb7f42cd JF |
423 | |
424 | SEE ALSO | |
425 | -------- | |
e664e260 | 426 | gitlink:tig[1] and the http://jonas.nitro.dk/tig/manual.html[tig manual]. |