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 branch C ?git checkout %(branch)
104 bind generic m view-main
105 bind generic d view-diff
106 bind generic l view-log
107 bind generic t view-tree
108 bind generic f view-blob
109 bind generic B view-blame
110 bind generic H view-refs
111 bind generic p view-pager
112 bind generic h view-help
113 bind generic S view-status
114 bind generic c view-stage
115 bind generic y view-stash
116 bind generic G view-grep
119 bind generic Enter enter # Enter and open selected entry
120 bind generic < back # Go back to the previous view state
121 bind generic Down next # Move to next
123 bind generic Up previous # Move to previous
124 bind generic ^P previous
125 bind generic , parent # Move to parent
126 bind generic Tab view-next # Move focus to the next view
127 bind generic R refresh # Reload and refresh view
128 bind generic F5 refresh
129 bind generic O maximize # Maximize the current view
130 bind generic q view-close # Close the current view
131 bind generic Q quit # Close all views and quit
134 bind status u status-update # Stage/unstage changes in file
135 bind status ! status-revert # Revert changes in file
136 bind status M status-merge # Open git-mergetool(1)
137 bind stage u status-update # Stage/unstage current diff (c)hunk
138 bind stage 1 stage-update-line # Stage/unstage current line
139 bind stage ! status-revert # Revert current diff (c)hunk
140 bind stage \ stage-split-chunk # Split current diff (c)hunk
141 bind stage @ :/^@@ # Jump to next (c)hunk
142 bind stage [ :toggle diff-context -1 # Decrease the diff context
143 bind stage ] :toggle diff-context +1 # Increase the diff context
144 bind diff @ :/^@@ # Jump to next (c)hunk
145 bind diff [ :toggle diff-context -1
146 bind diff ] :toggle diff-context +1
149 bind generic k move-up
150 bind generic j move-down
151 bind generic PgDown move-page-down
152 bind generic ^D move-page-down
153 bind generic Space move-page-down
154 bind generic PgUp move-page-up
155 bind generic ^U move-page-up
156 bind generic b move-page-up
157 bind generic - move-page-up
158 bind generic Home move-first-line
159 bind generic End move-last-line
162 bind generic | scroll-first-col
163 bind generic Left scroll-left
164 bind generic Right scroll-right
165 bind generic Insert scroll-line-up
166 bind generic ^Y scroll-line-up
167 bind generic Delete scroll-line-down
168 bind generic ^E scroll-line-down
169 bind generic w scroll-page-up
170 bind generic s scroll-page-down
173 bind generic / search
174 bind generic ? search-back
175 bind generic n find-next
176 bind generic N find-prev
178 # Option manipulation
179 bind generic o options # Open the options menu
180 # Bindings for toggling settings
181 bind generic I :toggle sort-order # Toggle ascending/descending sort order
182 bind generic i :toggle sort-field # Toggle field to sort by
183 bind generic . :toggle show-line-numbers
184 # Toggle line numbers
185 bind generic D :toggle show-date # Toggle date display
186 bind generic A :toggle show-author # Toggle author display
187 bind generic g :toggle show-rev-graph # Toggle revision graph visualization
188 bind generic ~ :toggle line-graphics # Toggle (line) graphics mode
189 bind generic Hash :toggle show-filename # Toggle file name display
190 bind generic F :toggle show-refs # Toggle reference display (tags/branches)
191 # bind generic ??? :toogle show-changes # Toggle local changes display in the main view
192 bind generic W :toggle ignore-space # Toggle ignoring whitespace in diffs
193 # bind generic ? :toggle commit-order # Toggle commit ordering
194 bind generic X :toggle show-id # Toggle commit ID display
195 bind generic $ :toggle title-overflow # Toggle highlighting of commit title overflow
196 # bind generic ??? :toggle show-file-size # Toggle file size format
197 # bind generic ??? :toggle status-untracked-dirs
198 # Toggle display of file in untracked directories
199 # bind generic ??? :toggle vertical-split # Toggle vertical split
200 bind generic % :toggle file-filter
203 bind generic e edit # Open in editor
204 bind generic : prompt # Open the prompt
205 bind generic r screen-redraw # Redraw the screen
206 bind generic ^L screen-redraw
207 bind generic z stop-loading # Stop all loading views
208 bind generic v show-version # Show Tig version
213 # The colors in the UI can be customized. In addition to the colors used
214 # for the UI you can also define new colors to use in the pager, blob,
215 # diff, and stage views by placing the text to match for in quotes.
217 # Prefix the name of a view to set a color only for that view, e.g.
219 # color grep.filename blue default
221 # As an example, this setting will to color Signed-off-by lines with a
222 # yellow foreground color and use the default background color.
224 # color " Signed-off-by" yellow default
226 # Note the four leading spaces in the string to match. This is because
227 # Git automatically indents commit messages by four spaces.
229 color "diff --" yellow default
230 color "@@" magenta default
231 color "+" green default
232 color " +" green default
233 color "-" red default
234 color " -" red default
235 color "index " blue default
236 color "old file mode " yellow default
237 color "new file mode " yellow default
238 color "deleted file mode " yellow default
239 color "copy from " yellow default
240 color "copy to " yellow default
241 color "rename from " yellow default
242 color "rename to " yellow default
243 color "similarity " yellow default
244 color "dissimilarity " yellow default
245 color "diff-tree " blue default
246 color "Author: " cyan default
247 color "Commit: " magenta default
248 color "Merge: " blue default
249 color "Date: " yellow default
250 color "AuthorDate: " yellow default
251 color "CommitDate: " yellow default
252 color "Refs: " red default
253 color "Reflog: " red default
254 color "Reflog message: " yellow default
255 color "stash@{" magenta default
256 color "commit " green default
257 color "parent " blue default
258 color "tree " blue default
259 color "author " green default
260 color "committer " magenta default
261 color " Signed-off-by" yellow default
262 color " Acked-by" yellow default
263 color " Tested-by" yellow default
264 color " Reviewed-by" yellow default
265 color default default default normal
266 color cursor white green bold
267 color status green default
268 color delimiter magenta default
269 color date blue default
270 color mode cyan default
271 color id magenta default
272 color overflow red default
273 color directory yellow default
274 color file default default
275 color grep.file blue default
276 color file-size default default
277 color line-number cyan default
278 color title-blur white blue
279 color title-focus white blue bold
280 color main-commit default default
281 color main-tag magenta default bold
282 color main-local-tag magenta default
283 color main-remote yellow default
284 color main-replace cyan default
285 color main-tracked yellow default bold
286 color main-ref cyan default
287 color main-head cyan default bold
288 color tree-head default default bold
289 color stat-head yellow default
290 color stat-section cyan default
291 color stat-none default default
292 color stat-staged magenta default
293 color stat-unstaged magenta default
294 color stat-untracked magenta default
295 color help-keymap cyan default
296 color help-group blue default
297 color help-action yellow default
298 color diff-stat blue default
299 color palette-0 magenta default
300 color palette-1 yellow default
301 color palette-2 cyan default
302 color palette-3 green default
303 color palette-4 default default
304 color palette-5 white default
305 color palette-6 red default
306 color graph-commit blue default