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 P ?git stash pop %(stash)
157 bind stash ! ?git stash drop %(stash)
158 bind refs C ?git checkout %(branch)
159 bind refs ! ?git branch -D %(branch)
165 bind generic m view-main
166 bind generic d view-diff
167 bind generic l view-log
168 bind generic t view-tree
169 bind generic f view-blob
170 bind generic b view-blame
171 bind generic r view-refs
172 bind generic p view-pager
173 bind generic h view-help
174 bind generic s view-status
175 bind generic S view-status # Compat binding to avoid going crazy!
176 bind generic c view-stage
177 bind generic y view-stash
178 bind generic g view-grep
181 bind generic <Enter> enter # Enter and open selected entry
182 bind generic <Lt> back # Go back to the previous view state
183 bind generic <Down> next # Move to next
184 bind generic <C-N> next
186 bind generic <Up> previous # Move to previous
187 bind generic <C-P> previous
188 bind generic K previous
189 bind generic , parent # Move to parent
190 bind generic <Tab> view-next # Move focus to the next view
191 bind generic R refresh # Reload and refresh view
192 bind generic <F5> refresh
193 bind generic O maximize # Maximize the current view
194 bind generic q view-close # Close the current view
195 bind generic Q quit # Close all views and quit
198 bind status u status-update # Stage/unstage changes in file
199 bind status ! status-revert # Revert changes in file
200 bind status M status-merge # Open git-mergetool(1)
201 #bind status ??? :toggle status # Show short or long status labels
202 bind stage u status-update # Stage/unstage current diff (c)hunk
203 bind stage 1 stage-update-line # Stage/unstage current line
204 bind stage ! status-revert # Revert current diff (c)hunk
205 bind stage \ stage-split-chunk # Split current diff (c)hunk
206 bind stage @ :/^@@ # Jump to next (c)hunk
207 bind stage [ :toggle diff-context -1 # Decrease the diff context
208 bind stage ] :toggle diff-context +1 # Increase the diff context
209 bind diff @ :/^@@ # Jump to next (c)hunk
210 bind diff [ :toggle diff-context -1
211 bind diff ] :toggle diff-context +1
212 bind main G :toggle commit-title-graph # Toggle revision graph visualization
213 bind main F :toggle commit-title-refs # Toggle reference display (tags/branches)
216 bind generic j move-down
217 bind generic k move-up
218 #bind generic ? move-half-page-down
219 #bind generic ? move-half-page-up
220 bind generic <PgDown> move-page-down
221 bind generic <C-D> move-page-down
222 bind generic <Space> move-page-down
223 bind generic <PgUp> move-page-up
224 bind generic <C-U> move-page-up
225 bind generic - move-page-up
226 bind generic <Home> move-first-line
227 bind generic <End> move-last-line
230 bind generic | scroll-first-col
231 bind generic <Left> scroll-left
232 bind generic <Right> scroll-right
233 bind generic <Ins> scroll-line-up
234 bind generic <C-Y> scroll-line-up
235 bind generic <Del> scroll-line-down
236 bind generic <C-E> scroll-line-down
237 bind generic <SBack> scroll-page-up
238 bind generic <SFwd> scroll-page-down
241 bind generic / search
242 bind generic ? search-back
243 bind generic n find-next
244 bind generic N find-prev
245 # Navigation keys used while searching
246 bind search <Down> find-next
247 bind search <C-N> find-next
248 bind search <C-J> find-next
249 bind search <Up> find-prev
250 bind search <C-P> find-prev
251 bind search <C-K> find-prev
253 # Option manipulation
254 bind generic o options # Open the options menu
255 # Bindings for toggling settings
256 bind generic I :toggle sort-order # Toggle ascending/descending sort order
257 bind generic i :toggle sort-field # Toggle field to sort by
258 bind generic <Hash> :toggle line-number # Toggle line numbers
259 bind generic D :toggle date # Toggle date display
260 bind generic A :toggle author # Toggle author display
261 bind generic ~ :toggle line-graphics # Toggle (line) graphics mode
262 bind generic F :toggle file-name # Toggle file name display
263 # bind generic ??? :toogle show-changes # Toggle local changes display in the main view
264 bind generic W :toggle ignore-space # Toggle ignoring whitespace in diffs
265 # bind generic ? :toggle commit-order # Toggle commit ordering
266 bind generic X :toggle id # Toggle commit ID display
267 bind generic $ :toggle commit-title-overflow
268 # Toggle highlighting of commit title overflow
269 # bind generic ??? :toggle file-size # Toggle file size format
270 # bind generic ??? :toggle status # Toggle status display
271 # bind generic ??? :toggle status-untracked-dirs
272 # Toggle display of file in untracked directories
273 # bind generic ??? :toggle vertical-split # Toggle vertical split
274 bind generic % :toggle file-filter
277 bind generic e edit # Open in editor
278 bind generic : prompt # Open the prompt
279 bind generic <C-L> screen-redraw # Redraw the screen
280 bind generic z stop-loading # Stop all loading views
281 bind generic v show-version # Show Tig version
286 # The colors in the UI can be customized. In addition to the colors used
287 # for the UI you can also define new colors to use in the pager, blob,
288 # diff, and stage views by placing the text to match for in quotes.
290 # Prefix the name of a view to set a color only for that view, e.g.
292 # color grep.file blue default
294 # As an example, this setting will to color Signed-off-by lines with a
295 # yellow foreground color and use the default background color.
297 # color " Signed-off-by" yellow default
299 # Note the four leading spaces in the string to match. This is because
300 # Git automatically indents commit messages by four spaces.
302 color "---" blue default
303 color "diff --" yellow default
304 color "--- " yellow default
305 color "+++ " yellow default
306 color "@@" magenta default
307 color "+" green default
308 color " +" green default
309 color "-" red default
310 color " -" red default
311 color "index " blue default
312 color "old file mode " yellow default
313 color "new file mode " yellow default
314 color "deleted file mode " yellow default
315 color "copy from " yellow default
316 color "copy to " yellow default
317 color "rename from " yellow default
318 color "rename to " yellow default
319 color "similarity " yellow default
320 color "dissimilarity " yellow default
321 color "diff-tree " blue default
322 color "Author: " cyan default
323 color "Commit: " magenta default
324 color "Tagger: " magenta default
325 color "Merge: " blue default
326 color "Date: " yellow default
327 color "AuthorDate: " yellow default
328 color "CommitDate: " yellow default
329 color "TaggerDate: " yellow default
330 color "Refs: " red default
331 color "Reflog: " red default
332 color "Reflog message: " yellow default
333 color "stash@{" magenta default
334 color "commit " green default
335 color "parent " blue default
336 color "tree " blue default
337 color "author " green default
338 color "committer " magenta default
339 color " Signed-off-by" yellow default
340 color " Acked-by" yellow default
341 color " Tested-by" yellow default
342 color " Reviewed-by" yellow default
343 color default default default normal
344 color cursor white green bold
345 color status green default
346 color delimiter magenta default
347 color date blue default
348 color mode cyan default
349 color id magenta default
350 color overflow red default
351 color header yellow default
352 color section cyan default
353 color directory yellow default
354 color file default default
355 color grep.file blue default
356 color file-size default default
357 color line-number cyan default
358 color title-blur white blue
359 color title-focus white blue bold
360 color main-commit default default
361 color main-tag magenta default bold
362 color main-local-tag magenta default
363 color main-remote yellow default
364 color main-replace cyan default
365 color main-tracked yellow default bold
366 color main-ref cyan default
367 color main-head cyan default bold
368 color stat-none default default
369 color stat-staged magenta default
370 color stat-unstaged magenta default
371 color stat-untracked magenta default
372 color help-group blue default
373 color help-action yellow default
374 color diff-stat blue default
375 color palette-0 magenta default
376 color palette-1 yellow default
377 color palette-2 cyan default
378 color palette-3 green default
379 color palette-4 default default
380 color palette-5 white default
381 color palette-6 red default
382 color palette-7 magenta default bold
383 color palette-8 yellow default bold
384 color palette-9 cyan default bold
385 color palette-10 green default bold
386 color palette-11 default default bold
387 color palette-12 white default bold
388 color palette-13 red default bold
389 color graph-commit blue default
390 color search-result black yellow
392 # Mappings for colors read from git configuration.
393 # Set to "no" to disable.
395 branch.current=main-head \
396 branch.local=main-ref \
397 branch.plain=main-ref \
398 branch.remote=main-remote \
400 diff.meta=diff-header \
401 diff.meta=diff-index \
402 diff.meta=diff-oldmode \
403 diff.meta=diff-newmode \
404 diff.frag=diff-chunk \
408 grep.filename=grep.file \
409 grep.linenumber=grep.line-number \
410 grep.separator=grep.delimiter \
412 status.branch=status.header \
413 status.added=stat-staged \
414 status.updated=stat-staged \
415 status.changed=stat-unstaged \
416 status.untracked=stat-untracked