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