codekingpro/portable-devtools
114k
1# Tig default configuration2#3# Please see 'man tigrc' for a complete reference.4 5# Settings6# --------7# Most of these settings can be toggleable, either via the toggle-*8# actions or via the option menu (bound to `o` by default).9 10# View settings11#12# Supported column types and their options:13#14# author, committer15# - display (enum) [no|full|abbreviated|email|email-user]16# : Show author/committer information?17# - width (int) : Fixed width when nonzero18# - maxwidth (int) : Autosize limit19#20# commit-title21# - display (bool) : Show the commit title?22# - graph (enum) [no|v2|v1] : Show the commit graph? (main view only)23# - refs (bool) : Show branches, tags and remotes? (main view only)24# - overflow (boolint) : Highlight overflows? Defaults to 50 when enabled.25#26# date27# - display (enum) [no|default|relative|relative-compact|custom]28# : Show dates?29# - use-author (bool) : Show author date instead of committer date?30# - local (bool) : Show local dates?31# - format (string) : Custom strftime(3) format32# Note: %Z is formatted as %z33# - width (int) : Fixed width when nonzero34#35# file-name36# - display (enum) [no|always|auto] : Show file names?37# - width (int) : Fixed width when nonzero38# - maxwidth (int) : Autosize limit39#40# file-size41# - display (enum) [no|default|units]42# : Show file sizes?43# - width (int) : Fixed width when nonzero44#45# id46# - display (bool) : Show commit/tree ID?47# - width (int) : Fixed width when nonzero48#49# line-number50# - display (bool) : Show line numbers?51# - interval (int) : Interval between line numbers; defaults to 552# - width (int) : Fixed width when nonzero53#54# mode55# - display (bool) : Show file modes?56# - width (int) : Fixed width when nonzero57#58# ref59# - display (bool) : Show ref names?60# - width (int) : Fixed width when nonzero61# - maxwidth (int) : Autosize limit62#63# status64# - display (enum) [no|short|long] : Show status label?65#66# text67# - display (bool) : Show text?68# - commit-title-overflow (boolint) : Highlight overflow in log and diff view?69#70 71set blame-view = id:yes,color file-name:auto author:full committer:no date:default,format="%Y-%m-%d" line-number:yes,interval=1 text72set grep-view = file-name:no line-number:yes,interval=1 text73set main-view = line-number:no,interval=5 id:no date:default,format="%Y-%m-%d" author:full committer:no commit-title:yes,graph,refs,overflow=no74set reflog-view = line-number:no,interval=5 id:yes date:no,format="%Y-%m-%d" author:no committer:no commit-title:yes,refs,overflow=no75set refs-view = line-number:no id:no date:default,format="%Y-%m-%d" author:full committer:no ref commit-title76set stash-view = line-number:no,interval=5 id:no date:default,format="%Y-%m-%d" author:full commit-title77set status-view = line-number:no,interval=5 status:short file-name78set tree-view = line-number:no,interval=5 mode author:full committer:no file-size date:default,format="%Y-%m-%d" id:no file-name79 80# Pager based views81set pager-view = line-number:no,interval=5 text82set stage-view = line-number:no,interval=5 text83set log-view = line-number:no,interval=5 text84set blob-view = line-number:no,interval=5 text85set diff-view = line-number:no,interval=5 text:yes,commit-title-overflow=no86 87# UI display settings88set show-changes = yes # Show changes commits in the main view?89set show-untracked = yes # Show also untracked changes?90set wrap-lines = no # Wrap long lines in pager views?91set tab-size = 8 # Number of spaces to use when expanding tabs92set line-graphics = default # Enum: ascii, default, utf-8, auto93set truncation-delimiter = ~ # Character drawn for truncations, or "utf-8"94 95# Format reference names based on type:96# - head : The current HEAD.97# - tag : An annotated tag.98# - local-tag : A lightweight tag.99# - remote : A remote.100# - tracked-remote : The remote tracked by current HEAD.101# - replace : A replaced reference.102# - branch : A branch.103# - stash : The stash.104# - note : Notes.105# - prefetch : Refs prefetched by `git maintenance`.106# - other : Any other reference.107#108# Expects a space-separated list of format strings.109# If no format is specified for `local-tag`, the format for `tag` is used.110# Similarly, if no format is specified for `tracked-remote`, the format for111# `remote` is used, and if no format is specified for any other reference112# type, the format for `branch` is used.113# Prefix with `hide:` to not show that reference type, e.g. `hide:prefetch`.114set reference-format = [branch] <tag> {remote} ~replace~115 116# Settings controlling how content is read from Git117set commit-order = auto # Enum: auto, default, topo, date, reverse (main)118set status-show-untracked-dirs = yes # Show files in untracked directories? (status)119set status-show-untracked-files = yes # Show untracked files?120set ignore-space = no # Enum: no, all, some, at-eol (diff)121set show-notes = yes # When non-bool passed as `--show-notes=...` (diff)122#set diff-context = 3 # Number of lines to show around diff changes (diff)123#set word-diff = yes # Show a word diff? (diff)124#set diff-options = -C # User-defined options for `tig show` (git-diff)125#set diff-highlight = yes # String (or bool): Path to diff-highlight script,126 # defaults to `diff-highlight`.127set diff-indicator = yes # Show diff +/- signs?128#set blame-options = -C -C -C # User-defined options for `tig blame` (git-blame)129set log-options = --cc --stat # User-defined options for `tig log` (git-log)130#set main-options = -n 1000 # User-defined options for `tig` (git-log)131set mailmap = yes # Use .mailmap to show canonical name and email address?132 133# Misc134set start-on-head = no # Start with cursor on HEAD commit?135set refresh-mode = auto # Enum: manual, auto, after-command, periodic136set refresh-interval = 10 # Interval in seconds between refreshes137set ignore-case = no # Enum: no, yes, smart-case138 # Ignore case when searching?139set wrap-search = yes # Wrap around to top/bottom of view when searching?140set focus-child = yes # Move focus to child view when opened?141set send-child-enter = yes # Propagate "enter" keypresses to child views?142set horizontal-scroll = 50% # Number of columns to scroll as % of width143set split-view-height = 67% # Height of the bottom view for horizontal splits144set vertical-split = auto # Enum: horizontal, vertical, auto; Use auto to145 # switch to horizontal split when width allows it146set split-view-width = 50% # Width of right-most view for vertical splits147set editor-line-number = yes # Automatically pass line number to editor? Used148 # for opening file at specific line e.g. from a diff149set history-size = 500 # Size of persistent history, 0 to disable150set mouse = no # Enable mouse support?151set mouse-scroll = 3 # Number of lines to scroll via the mouse152set mouse-wheel-cursor = no # Prefer moving the cursor to scrolling the view?153set pgrp = no # Make tig process-group leader?154set pager-autoscroll = no # Scroll the pager view automatically while loading?155 156# User-defined commands157# ---------------------158# These commands allow to run shell commands directly from within Tig.159# Unless otherwise specified, commands are run in the foreground with160# their console output shown (as if '!' was specified). When multiple161# command options are specified their behavior are combined, e.g. "?<git162# commit" will prompt the user whether to execute the command and will163# exit Tig after completion.164#165# ! Run the command in the foreground with output shown.166# @ Run the command in the background with no output.167# ? Prompt the user before executing the command.168# + Run the command synchronously, and echo the first line of output to the status bar.169# < Exit Tig after executing the command.170# > Re-open Tig instantly in the last displayed view after executing the command.171#172# User-defined commands can optionally refer to Tig's internal state173# using the following variable names, which are substituted before174# commands are run (see 'man tigrc' for the full list):175#176# %(head) The current ref ID. Defaults to HEAD177# %(commit) The current commit ID.178# %(blob) The current blob ID.179# %(branch) The current branch name.180# %(remote) The current remote name.181# %(tag) The current tag name.182# %(stash) The current stash name.183# %(directory) The current directory path in the tree view;184# empty for the root directory.185# %(file) The currently selected file.186# %(ref) The reference given to blame or HEAD if undefined.187# %(revargs) The revision arguments passed on the command line.188# %(fileargs) The file arguments passed on the command line.189# %(cmdlineargs) All other options passed on the command line.190# %(diffargs) The diff options from `diff-options` or `TIG_DIFF_OPTS`191# %(prompt) Prompt for the argument value.192# %(repo:head) The name of the checked out branch.193# %(repo:remote) The remote name associated with the checked out branch.194# %(repo:upstream) The upstream branch associated with the checked out branch.195 196bind main C ?git cherry-pick %(commit)197bind status C !git commit198bind stash A ?git stash apply %(stash)199bind stash P ?git stash pop %(stash)200bind stash ! ?git stash drop %(stash)201bind refs C ?git checkout %(branch)202bind refs ! ?git branch -D %(branch)203bind reflog C ?git checkout %(branch)204bind reflog ! ?git reset --hard %(commit)205 206# Normal commands207# ---------------208 209# View switching210bind generic m view-main211bind generic d view-diff212bind generic l view-log213bind generic L view-reflog214bind generic t view-tree215bind generic f view-blob216bind generic b view-blame217bind generic r view-refs218bind generic p view-pager219bind generic h view-help220bind generic s view-status221bind generic S view-status # Compat binding to avoid going crazy!222bind generic c view-stage223bind generic y view-stash224bind generic g view-grep225 226# View manipulation227bind generic <Enter> enter # Enter and open selected entry228bind generic <Lt> back # Go back to the previous view state229bind generic <Down> next # Move to next230bind generic <C-N> next231bind generic J next232bind generic <Up> previous # Move to previous233bind generic <C-P> previous234bind generic K previous235bind generic , parent # Move to parent236bind generic <Tab> view-next # Move focus to the next view237bind generic R refresh # Reload and refresh view238bind generic <F5> refresh239bind generic O maximize # Maximize the current view240bind generic q view-close # Close the current view241bind generic Q quit # Close all views and quit242bind generic <C-C> quit # Close all views and quit243 244# View specific245bind status u status-update # Stage/unstage changes in file246bind status ! status-revert # Revert changes in file247bind status M status-merge # Open git-mergetool(1)248# bind status ??? :toggle status # Show short or long status labels249bind stage u status-update # Stage/unstage current diff (c)hunk250bind stage 1 stage-update-line # Stage/unstage current line251bind stage 2 stage-update-part # Stage/unstage part of chunk252bind stage ! status-revert # Revert current diff (c)hunk253bind stage \ stage-split-chunk # Split current diff (c)hunk254bind stage @ :/^@@ # Jump to next (c)hunk255bind stage [ :toggle diff-context -1 # Decrease the diff context256bind stage ] :toggle diff-context +1 # Increase the diff context257bind diff @ :/^@@ # Jump to next (c)hunk258bind diff [ :toggle diff-context -1 # Decrease the diff context259bind diff ] :toggle diff-context +1 # Increase the diff context260bind pager @ :/^@@ # Jump to next (c)hunk261bind main H :goto HEAD # Jump to HEAD commit262bind main G :toggle commit-title-graph # Toggle revision graph visualization263bind main F :toggle commit-title-refs # Toggle reference display (tags/branches)264bind reflog F :toggle commit-title-refs # Toggle reference display (tags/branches)265 266# Cursor navigation267bind generic j move-down268bind generic k move-up269bind generic <C-D> move-half-page-down270bind generic <C-U> move-half-page-up271bind generic <PgDown> move-page-down272bind generic <Space> move-page-down273bind generic <PgUp> move-page-up274bind generic - move-page-up275bind generic <Home> move-first-line276bind generic <End> move-last-line277 278# Scrolling279bind generic | scroll-first-col280bind generic <Left> scroll-left281bind generic <Right> scroll-right282bind generic <Ins> scroll-line-up283bind generic <C-Y> scroll-line-up284bind generic <Del> scroll-line-down285bind generic <C-E> scroll-line-down286bind generic <SBack> scroll-page-up287bind generic <SFwd> scroll-page-down288# bind generic ??? scroll-half-page-up289# bind generic ??? scroll-half-page-down290 291# Searching292bind generic / search293bind generic ? search-back294bind generic n find-next295bind generic N find-prev296# Navigation keys used while searching297bind search <Down> find-next298bind search <C-N> find-next299bind search <C-J> find-next300bind search <Up> find-prev301bind search <C-P> find-prev302bind search <C-K> find-prev303bind search <C-C> view-close304 305# Option manipulation306bind generic o options # Open the options menu307# Bindings for toggling settings308bind generic I :toggle sort-order # Toggle ascending/descending sort order309bind generic i :toggle sort-field # Toggle field to sort by310bind generic <Hash> :toggle line-number # Toggle line numbers311bind generic D :toggle date # Toggle date display312bind generic A :toggle author # Toggle author display313bind generic T :toggle committer # Toggle committer display314# bind generic ??? :toggle commit-title-display315 # Toggle commit title display316bind generic ~ :toggle line-graphics # Toggle (line) graphics mode317bind generic F :toggle file-name # Toggle file name display318# bind generic ??? :toggle show-changes # Toggle local changes display in the main view319bind generic W :toggle ignore-space # Toggle ignoring whitespace in diffs320# bind generic ??? :toggle ignore-case # Toggle ignoring case when searching321# bind generic ??? :toggle commit-order # Toggle commit ordering322bind generic X :toggle id # Toggle commit ID display323bind generic $ :toggle commit-title-overflow324 # Toggle highlighting of commit title overflow325# bind generic ??? :toggle file-size # Toggle file size format326# bind generic ??? :toggle status # Toggle status display327# bind generic ??? :toggle status-show-untracked-dirs328 # Toggle display of file in untracked directories329# bind generic ??? :toggle vertical-split # Toggle vertical split330# bind generic ??? :toggle word-diff # Toggle word diff331# bind generic ??? :toggle diff-indicator # Toggle display of diff +/- signs332bind generic % :toggle file-filter # Toggle filtering by pathspecs in file-args333bind generic ^ :toggle rev-filter # Toggle filtering by revisions in rev-args334 335# Misc336bind generic e edit # Open in editor337bind generic : prompt # Open the prompt338bind generic <C-L> screen-redraw # Redraw the screen339bind generic z stop-loading # Stop all loading views340bind generic v show-version # Show Tig version341 342# Colors343# ------344 345# The colors in the UI can be customized. In addition to the colors used346# for the UI you can also define new colors to use in the pager, blob,347# diff, and stage views by placing the text to match for in quotes.348#349# Prefix the name of a view to set a color only for that view, e.g.350#351# color grep.file blue default352#353# As an example, this setting will to color Signed-off-by lines with a354# yellow foreground color and use the default background color.355#356# color " Signed-off-by" yellow default357#358# Note the four leading spaces in the string to match. This is because359# Git automatically indents commit messages by four spaces.360 361color "---" blue default362color "diff --" yellow default363color "--- " yellow default364color "+++ " yellow default365color "@@" magenta default366color "+" green default367color " +" green default368color "-" red default369color " -" red default370color "index " blue default371color "old mode " yellow default372color "new mode " yellow default373color "new file mode " yellow default374color "deleted file mode " yellow default375color "copy from " yellow default376color "copy to " yellow default377color "rename from " yellow default378color "rename to " yellow default379color "similarity " yellow default380color "dissimilarity " yellow default381color "\ No newline at end of file" blue default382color "diff-tree " blue default383color "Author: " cyan default384color "Commit: " magenta default385color "Tagger: " magenta default386color "Merge: " blue default387color "Date: " yellow default388color "AuthorDate: " yellow default389color "CommitDate: " yellow default390color "TaggerDate: " yellow default391color "Refs: " red default392color "Reflog: " red default393color "Reflog message: " yellow default394color "stash@{" magenta default395color "commit " green default396color "parent " blue default397color "tree " blue default398color "author " green default399color "committer " magenta default400color " Signed-off-by:" yellow default401color " Acked-by:" yellow default402color " Reviewed-by:" yellow default403color " Helped-by:" yellow default404color " Reported-by:" yellow default405color " Mentored-by:" yellow default406color " Suggested-by:" yellow default407color " Cc:" yellow default408color " Noticed-by:" yellow default409color " Tested-by:" yellow default410color " Improved-by:" yellow default411color " Thanks-to:" yellow default412color " Based-on-patch-by:" yellow default413color " Contributions-by:" yellow default414color " Co-authored-by:" yellow default415color " Requested-by:" yellow default416color " Original-patch-by:" yellow default417color " Inspired-by:" yellow default418color default default default normal419color cursor white green bold420color cursor-blur white green421color status green default422color delimiter magenta default423color date blue default424color mode cyan default425color id magenta default426color overflow red default427color header yellow default428color section cyan default429color directory yellow default430color file default default431color grep.file blue default432color file-size default default433color line-number cyan default434color title-blur white blue435color title-focus white blue bold436color main-commit default default437color main-annotated default default bold438color main-tag magenta default bold439color main-local-tag magenta default440color main-remote yellow default441color main-stash blue default442color main-note blue default443color main-prefetch blue default444color main-other blue default445color main-replace cyan default446color main-tracked yellow default bold447color main-ref cyan default448color main-head cyan default bold449color stat-none default default450color stat-staged magenta default451color stat-unstaged magenta default452color stat-untracked magenta default453color help-group blue default454color help-action yellow default455color diff-stat blue default456color diff-add-highlight green default standout457color diff-del-highlight red default standout458color palette-0 magenta default459color palette-1 yellow default460color palette-2 cyan default461color palette-3 green default462color palette-4 default default463color palette-5 white default464color palette-6 red default465color palette-7 magenta default bold466color palette-8 yellow default bold467color palette-9 cyan default bold468color palette-10 green default bold469color palette-11 default default bold470color palette-12 white default bold471color palette-13 red default bold472color graph-commit blue default473color search-result black yellow474 475# Mappings for colors read from git configuration.476# Set to "no" to disable.477set git-colors = \478 branch.current=main-head \479 branch.local=main-ref \480 branch.plain=main-ref \481 branch.remote=main-remote \482 \483 diff.meta=diff-header \484 diff.meta=diff-index \485 diff.meta=diff-oldmode \486 diff.meta=diff-newmode \487 diff.frag=diff-chunk \488 diff.old=diff-del \489 diff.new=diff-add \490 \491 diff-highlight.oldHighlight=diff-del-highlight \492 diff-highlight.newHighlight=diff-add-highlight \493 \494 grep.filename=grep.file \495 grep.linenumber=grep.line-number \496 grep.separator=grep.delimiter \497 \498 status.branch=status.header \499 status.added=stat-staged \500 status.updated=stat-staged \501 status.changed=stat-unstaged \502 status.untracked=stat-untracked503 