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