1 # Tig default configuration
3 # Please see 'man tigrc' for a complete reference.
7 # Most of these settings can be toggleable, either via the toggle-*
8 # actions or via the option menu (bound to `o` by default).
12 # Supported column types and their options:
15 # - display (enum) [no|full|abbreviated|email|email-user]
16 # : Show author information?
18 # - display (bool) : Show the commit title?
19 # - graph (enum) [no|v2|v1] : Show the commit graph? (main view only)
20 # - refs (bool) : Show branches, tags and remotes? (main view only)
21 # - overflow (boolint) : Highlight overflows? Defaults to 50 when enabled.
24 # - display (enum) [no|default|relative|relative-compact|custom]
26 # - local (bool) : Show local dates?
27 # - format (string) : Custom strftime(3) format
30 # - display (enum) [no|always|auto] : Show file names?
33 # - display (enum) [no|default|units] : Show file sizes?
36 # - display (bool) : Show commit/tree ID?
39 # - display (bool) : Show line numbers?
40 # - interval (int) : Interval between line numbers; defaults to 5
43 # - display (bool) : Show file modes?
46 # - display (enum) [no|short|long] : Show status label?
49 # - display (bool) : Show text?
50 # - commit-title-overflow (boolint) : Highlight overflow in log and diff view?
52 # All columns also support a width option to configure the max width of
53 # the column. Use zero (the default value) to auto-size the column based
56 set blame-view = date:default author:full file-name:auto id:yes,color line-number:no,interval=5 text
57 set grep-view = file-name:no line-number:yes,interval=1 text
58 set main-view = line-number:no,interval=5 id:no date:default author:full commit-title:yes,graph,refs,overflow=no
59 set refs-view = line-number:no id:no date:default author:full ref commit-title
60 set stash-view = line-number:no,interval=5 id:no date:default author:full commit-title
61 set status-view = line-number:no,interval=5 status:short file-name
62 set tree-view = line-number:no,interval=5 mode author:full file-size date:default id:no file-name
65 set pager-view = line-number:no,interval=5 text
66 set stage-view = line-number:no,interval=5 text
67 set log-view = line-number:no,interval=5 text
68 set blob-view = line-number:no,interval=5 text
69 set diff-view = line-number:no,interval=5 text:yes,commit-title-overflow=no
72 set show-changes = yes # Show changes commits in the main view?
73 set wrap-lines = no # Wrap long lines in pager views?
74 set tab-size = 8 # Number of spaces to use when expanding tabs
75 set line-graphics = default # Enum: ascii, default, utf-8
77 # Format reference names based on type.
78 # - head : The current HEAD.
79 # - tag : A signed tag.
80 # - local-tag : An unsigned tag.
81 # - remote : A remote.
82 # - tracked-remote : The remote tracked by current HEAD.
83 # - replace : A replaced reference.
84 # - branch : Any other reference.
85 # If no format is defined for `local-tag` then the one for `tag` is used.
86 # Similarly, `remote` is used if no `tracked-remote` format exists.
87 # Prefix with `hide:` to not show that reference type, e.g. `hide:remote`.
88 # Expects a space separated list of format strings.
89 set reference-format = [branch] <tag> {remote} ~replace~
91 # Settings controlling how content is read from Git
92 set commit-order = auto # Enum: auto, default, topo, date, reverse (main)
93 set status-untracked-dirs = yes # Show files in untracked directories? (status)
94 set ignore-space = no # Enum: no, all, some, at-eol (diff)
95 set show-notes = yes # When non-bool passed as `--show-notes=...` (diff)
96 #set diff-context = 3 # Number of lines to show around diff changes (diff)
97 #set diff-options = -C # User-defined options for `tig show` (git-diff)
98 #set blame-options = -C -C -C # User-defined options for `tig blame` (git-blame)
99 #set log-options = --pretty=raw # User-defined options for `tig log` (git-log)
100 #set main-options = -n 1000 # User-defined options for `tig` (git-log)
101 #set mailmap = yes # Use .mailmap to show canonical name and email address
104 set refresh-mode = auto # Enum: manual, auto, after-command, periodic
105 set refresh-interval = 10 # Interval in seconds between refreshes
106 set ignore-case = no # Ignore case when searching?
107 set wrap-search = yes # Wrap around to top/bottom of view when searching
108 set focus-child = yes # Move focus to child view when opened?
109 set horizontal-scroll = 50% # Number of columns to scroll as % of width
110 set split-view-height = 67% # Height of the bottom view for horizontal splits
111 set vertical-split = auto # Enum: horizontal, vertical, auto; Use auto to
112 # switch to horizontal split when width allows it
113 set split-view-width = 50% # Width of right-most view for vertical splits
114 set editor-line-number = yes # Automatically pass line number to editor? Used
115 # for opening file at specific line e.g. from a diff
116 set mouse = no # Enable mouse support?
117 set mouse-scroll = 3 # Number of lines to scroll via the mouse
119 # User-defined commands
120 # ---------------------
121 # These commands allow to run shell commands directly from within Tig.
122 # Unless otherwise specified, commands are run in the foreground with
123 # their console output shown (as if '!' was specified). When multiple
124 # command options are specified their behavior are combined, e.g. "?<git
125 # commit" will prompt the user whether to execute the command and will
126 # exit Tig after completion.
128 # ! Run the command in the foreground with output shown.
129 # @ Run the command in the background with no output.
130 # ? Prompt the user before executing the command.
131 # < Exit Tig after executing the command.
133 # User-defined commands can optionally refer to Tig's internal state
134 # using the following variable names, which are substituted before
137 # %(head) The current ref ID. Defaults to HEAD
138 # %(commit) The current commit ID.
139 # %(blob) The current blob ID.
140 # %(branch) The current branch name.
141 # %(remote) The current remote name.
142 # %(tag) The current tag name.
143 # %(stash) The current stash name.
144 # %(directory) The current directory path in the tree view;
145 # empty for the root directory.
146 # %(file) The currently selected file.
147 # %(ref) The reference given to blame or HEAD if undefined.
148 # %(revargs) The revision arguments passed on the command line.
149 # %(fileargs) The file arguments passed on the command line.
150 # %(cmdlineargs) All other options passed on the command line.
151 # %(diffargs) The diff options from `diff-options` or `TIG_DIFF_OPTS`
152 # %(prompt) Prompt for the argument value.
154 bind main C ?git cherry-pick %(commit)
155 bind status C !git commit
156 bind stash A ?git stash apply %(stash)
157 bind stash P ?git stash pop %(stash)
158 bind stash ! ?git stash drop %(stash)
159 bind refs C ?git checkout %(branch)
160 bind refs ! ?git branch -D %(branch)
166 bind generic m view-main
167 bind generic d view-diff
168 bind generic l view-log
169 bind generic t view-tree
170 bind generic f view-blob
171 bind generic b view-blame
172 bind generic r view-refs
173 bind generic p view-pager
174 bind generic h view-help
175 bind generic s view-status
176 bind generic S view-status # Compat binding to avoid going crazy!
177 bind generic c view-stage
178 bind generic y view-stash
179 bind generic g view-grep
182 bind generic <Enter> enter # Enter and open selected entry
183 bind generic <Lt> back # Go back to the previous view state
184 bind generic <Down> next # Move to next
185 bind generic <C-N> next
187 bind generic <Up> previous # Move to previous
188 bind generic <C-P> previous
189 bind generic K previous
190 bind generic , parent # Move to parent
191 bind generic <Tab> view-next # Move focus to the next view
192 bind generic R refresh # Reload and refresh view
193 bind generic <F5> refresh
194 bind generic O maximize # Maximize the current view
195 bind generic q view-close # Close the current view
196 bind generic Q quit # Close all views and quit
199 bind status u status-update # Stage/unstage changes in file
200 bind status ! status-revert # Revert changes in file
201 bind status M status-merge # Open git-mergetool(1)
202 #bind status ??? :toggle status # Show short or long status labels
203 bind stage u status-update # Stage/unstage current diff (c)hunk
204 bind stage 1 stage-update-line # Stage/unstage current line
205 bind stage ! status-revert # Revert current diff (c)hunk
206 bind stage \ stage-split-chunk # Split current diff (c)hunk
207 bind stage @ :/^@@ # Jump to next (c)hunk
208 bind stage [ :toggle diff-context -1 # Decrease the diff context
209 bind stage ] :toggle diff-context +1 # Increase the diff context
210 bind diff @ :/^@@ # Jump to next (c)hunk
211 bind diff [ :toggle diff-context -1
212 bind diff ] :toggle diff-context +1
213 bind main G :toggle commit-title-graph # Toggle revision graph visualization
214 bind main F :toggle commit-title-refs # Toggle reference display (tags/branches)
217 bind generic j move-down
218 bind generic k move-up
219 bind generic <C-D> move-half-page-down
220 bind generic <C-U> move-half-page-up
221 bind generic <PgDown> move-page-down
222 bind generic <Space> move-page-down
223 bind generic <PgUp> move-page-up
224 bind generic - move-page-up
225 bind generic <Home> move-first-line
226 bind generic <End> move-last-line
229 bind generic | scroll-first-col
230 bind generic <Left> scroll-left
231 bind generic <Right> scroll-right
232 bind generic <Ins> scroll-line-up
233 bind generic <C-Y> scroll-line-up
234 bind generic <Del> scroll-line-down
235 bind generic <C-E> scroll-line-down
236 bind generic <SBack> scroll-page-up
237 bind generic <SFwd> scroll-page-down
240 bind generic / search
241 bind generic ? search-back
242 bind generic n find-next
243 bind generic N find-prev
244 # Navigation keys used while searching
245 bind search <Down> find-next
246 bind search <C-N> find-next
247 bind search <C-J> find-next
248 bind search <Up> find-prev
249 bind search <C-P> find-prev
250 bind search <C-K> find-prev
252 # Option manipulation
253 bind generic o options # Open the options menu
254 # Bindings for toggling settings
255 bind generic I :toggle sort-order # Toggle ascending/descending sort order
256 bind generic i :toggle sort-field # Toggle field to sort by
257 bind generic <Hash> :toggle line-number # Toggle line numbers
258 bind generic D :toggle date # Toggle date display
259 bind generic A :toggle author # Toggle author display
260 bind generic ~ :toggle line-graphics # Toggle (line) graphics mode
261 bind generic F :toggle file-name # Toggle file name display
262 # bind generic ??? :toogle show-changes # Toggle local changes display in the main view
263 bind generic W :toggle ignore-space # Toggle ignoring whitespace in diffs
264 # bind generic ? :toggle commit-order # Toggle commit ordering
265 bind generic X :toggle id # Toggle commit ID display
266 bind generic $ :toggle commit-title-overflow
267 # Toggle highlighting of commit title overflow
268 # bind generic ??? :toggle file-size # Toggle file size format
269 # bind generic ??? :toggle status # Toggle status display
270 # bind generic ??? :toggle status-untracked-dirs
271 # Toggle display of file in untracked directories
272 # bind generic ??? :toggle vertical-split # Toggle vertical split
273 bind generic % :toggle file-filter
276 bind generic e edit # Open in editor
277 bind generic : prompt # Open the prompt
278 bind generic <C-L> screen-redraw # Redraw the screen
279 bind generic z stop-loading # Stop all loading views
280 bind generic v show-version # Show Tig version
285 # The colors in the UI can be customized. In addition to the colors used
286 # for the UI you can also define new colors to use in the pager, blob,
287 # diff, and stage views by placing the text to match for in quotes.
289 # Prefix the name of a view to set a color only for that view, e.g.
291 # color grep.file blue default
293 # As an example, this setting will to color Signed-off-by lines with a
294 # yellow foreground color and use the default background color.
296 # color " Signed-off-by" yellow default
298 # Note the four leading spaces in the string to match. This is because
299 # Git automatically indents commit messages by four spaces.
301 color "---" blue default
302 color "diff --" yellow default
303 color "--- " yellow default
304 color "+++ " yellow default
305 color "@@" magenta default
306 color "+" green default
307 color " +" green default
308 color "-" red default
309 color " -" red default
310 color "index " blue default
311 color "old file mode " yellow default
312 color "new file mode " yellow default
313 color "deleted file mode " yellow default
314 color "copy from " yellow default
315 color "copy to " yellow default
316 color "rename from " yellow default
317 color "rename to " yellow default
318 color "similarity " yellow default
319 color "dissimilarity " yellow default
320 color "diff-tree " blue default
321 color "Author: " cyan default
322 color "Commit: " magenta default
323 color "Tagger: " magenta default
324 color "Merge: " blue default
325 color "Date: " yellow default
326 color "AuthorDate: " yellow default
327 color "CommitDate: " yellow default
328 color "TaggerDate: " yellow default
329 color "Refs: " red default
330 color "Reflog: " red default
331 color "Reflog message: " yellow default
332 color "stash@{" magenta default
333 color "commit " green default
334 color "parent " blue default
335 color "tree " blue default
336 color "author " green default
337 color "committer " magenta default
338 color " Signed-off-by" yellow default
339 color " Acked-by" yellow default
340 color " Tested-by" yellow default
341 color " Reviewed-by" yellow default
342 color default default default normal
343 color cursor white green bold
344 color status green default
345 color delimiter magenta default
346 color date blue default
347 color mode cyan default
348 color id magenta default
349 color overflow red default
350 color header yellow default
351 color section cyan default
352 color directory yellow default
353 color file default default
354 color grep.file blue default
355 color file-size default default
356 color line-number cyan default
357 color title-blur white blue
358 color title-focus white blue bold
359 color main-commit default default
360 color main-tag magenta default bold
361 color main-local-tag magenta default
362 color main-remote yellow default
363 color main-replace cyan default
364 color main-tracked yellow default bold
365 color main-ref cyan default
366 color main-head cyan default bold
367 color stat-none default default
368 color stat-staged magenta default
369 color stat-unstaged magenta default
370 color stat-untracked magenta default
371 color help-group blue default
372 color help-action yellow default
373 color diff-stat blue default
374 color palette-0 magenta default
375 color palette-1 yellow default
376 color palette-2 cyan default
377 color palette-3 green default
378 color palette-4 default default
379 color palette-5 white default
380 color palette-6 red default
381 color palette-7 magenta default bold
382 color palette-8 yellow default bold
383 color palette-9 cyan default bold
384 color palette-10 green default bold
385 color palette-11 default default bold
386 color palette-12 white default bold
387 color palette-13 red default bold
388 color graph-commit blue default
389 color search-result black yellow
391 # Mappings for colors read from git configuration.
392 # Set to "no" to disable.
394 branch.current=main-head \
395 branch.local=main-ref \
396 branch.plain=main-ref \
397 branch.remote=main-remote \
399 diff.meta=diff-header \
400 diff.meta=diff-index \
401 diff.meta=diff-oldmode \
402 diff.meta=diff-newmode \
403 diff.frag=diff-chunk \
407 grep.filename=grep.file \
408 grep.linenumber=grep.line-number \
409 grep.separator=grep.delimiter \
411 status.branch=status.header \
412 status.added=stat-staged \
413 status.updated=stat-staged \
414 status.changed=stat-unstaged \
415 status.untracked=stat-untracked