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