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