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
107 bind generic Enter enter # Enter and open selected entry
108 bind generic < back # Go back to the previous view state
109 bind generic Down next # Move to next
111 bind generic Up previous # Move to previous
112 bind generic ^P previous
113 bind generic , parent # Move to parent
114 bind generic Tab view-next # Move focus to the next view
115 bind generic R refresh # Reload and refresh
116 bind generic F5 refresh
117 bind generic O maximize # Maximize the current view
118 bind generic q view-close # Close the current view
119 bind generic Q quit # Close all views and quit
122 bind status u status-update # Stage/unstage changes in file
123 bind status ! status-revert # Revert changes in file
124 bind status M status-merge # Open git-mergetool(1)
125 bind stage u status-update # Stage/unstage current diff (c)hunk
126 bind stage 1 stage-update-line # Stage/unstage current line
127 bind stage ! status-revert # Revert current diff (c)hunk
128 bind stage @ stage-next # Jump to next (c)hunk
129 bind stage \ stage-split-chunk # Split current diff (c)hunk
130 bind stage [ diff-context-down # Decrease the diff context
131 bind stage ] diff-context-up # Increase the diff context
132 bind diff [ diff-context-down
133 bind diff ] diff-context-up
136 bind generic k move-up
137 bind generic j move-down
138 bind generic PgDown move-page-down
139 bind generic ^D move-page-down
140 bind generic Space move-page-down
141 bind generic PgUp move-page-up
142 bind generic ^U move-page-up
143 bind generic b move-page-up
144 bind generic - move-page-up
145 bind generic Home move-first-line
146 bind generic End move-last-line
149 bind generic | scroll-first-col
150 bind generic Left scroll-left
151 bind generic Right scroll-right
152 bind generic Insert scroll-line-up
153 bind generic ^Y scroll-line-up
154 bind generic Delete scroll-line-down
155 bind generic ^E scroll-line-down
156 bind generic w scroll-page-up
157 bind generic s scroll-page-down
160 bind generic / search
161 bind generic ? search-back
162 bind generic n find-next
163 bind generic N find-prev
165 # Option manipulation
166 bind generic o options # Open the option menu
167 bind generic . toggle-lineno
168 bind generic D toggle-date
169 bind generic A toggle-author
170 bind generic g toggle-rev-graph
171 bind generic ~ toggle-graphic
172 bind generic Hash toggle-filename
173 bind generic F toggle-refs
174 # bind generic ? toogle-changes
175 bind generic I toggle-sort-order
176 bind generic i toggle-sort-field
177 bind generic W toggle-ignore-space
178 # bind generic ? toggle-commit-order
179 bind generic X toggle-id
180 bind generic % toggle-files
181 bind generic $ toggle-title-overflow
182 # bind generic ? toggle-file-size
183 # bind genric ? toggle-untracked-dirs
186 bind generic e edit # Open in editor
187 bind generic : prompt # Open the prompt
188 bind generic z stop-loading # Stop all loading views
189 bind generic v show-version # Show Tig version
190 bind generic r screen-redraw # Redraw the screen
191 bind generic ^L screen-redraw
196 # The colors in the UI can be customized. In addition to the colors used
197 # for the UI you can also define new colors to use in the pager, blob,
198 # diff, and stage views by placing the text to match for in quotes.
200 # As an example, this setting will to color Signed-off-by lines with a
201 # yellow foreground color and use the default background color.
203 # color " Signed-off-by" yellow default
205 # Note the four leading spaces in the string to match. This is because
206 # Git automatically indents commit messages by four spaces.
208 color "diff --" yellow default
209 color "@@" magenta default
210 color "+" green default
211 color " +" green default
212 color "-" red default
213 color " -" red default
214 color "index " blue default
215 color "old file mode " yellow default
216 color "new file mode " yellow default
217 color "deleted file mode " yellow default
218 color "copy from " yellow default
219 color "copy to " yellow default
220 color "rename from " yellow default
221 color "rename to " yellow default
222 color "similarity " yellow default
223 color "dissimilarity " yellow default
224 color "diff-tree " blue default
225 color "Author: " cyan default
226 color "Commit: " magenta default
227 color "Merge: " blue default
228 color "Date: " yellow default
229 color "AuthorDate: " yellow default
230 color "CommitDate: " yellow default
231 color "Refs: " red default
232 color "Reflog: " red default
233 color "Reflog message: " yellow default
234 color "stash@{" magenta default
235 color "commit " green default
236 color "parent " blue default
237 color "tree " blue default
238 color "author " green default
239 color "committer " magenta default
240 color " Signed-off-by" yellow default
241 color " Acked-by" yellow default
242 color " Tested-by" yellow default
243 color " Reviewed-by" yellow default
244 color default default default normal
245 color cursor white green bold
246 color status green default
247 color delimiter magenta default
248 color date blue default
249 color mode cyan default
250 color id magenta default
251 color overflow red default
252 color filename default default
253 color file-size default default
254 color line-number cyan default
255 color title-blur white blue
256 color title-focus white blue bold
257 color main-commit default default
258 color main-tag magenta default bold
259 color main-local-tag magenta default
260 color main-remote yellow default
261 color main-replace cyan default
262 color main-tracked yellow default bold
263 color main-ref cyan default
264 color main-head cyan default bold
265 color main-revgraph magenta default
266 color tree-head default default bold
267 color tree-dir yellow default normal
268 color tree-file default default normal
269 color stat-head yellow default
270 color stat-section cyan default
271 color stat-none default default
272 color stat-staged magenta default
273 color stat-unstaged magenta default
274 color stat-untracked magenta default
275 color help-keymap cyan default
276 color help-group blue default
277 color diff-stat blue default
278 color palette-0 magenta default
279 color palette-1 yellow default
280 color palette-2 cyan default
281 color palette-3 green default
282 color palette-4 default default
283 color palette-5 white default
284 color palette-6 red default
285 color graph-commit blue default