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