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