Advertisement
thioshp

Terminal Command tig

Jul 15th, 2018
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.23 KB | None | 0 0
  1. Comman tig's configuration
  2. # Tig default configuration
  3. #
  4. # Please see 'man tigrc' for a complete reference.
  5.  
  6. # Settings
  7. # --------
  8. # Most of these settings can be toggleable, either via the toggle-*
  9. # actions or via the option menu (bound to `o` by default).
  10.  
  11. # View settings
  12. #
  13. # Supported column types and their options:
  14. #
  15. # author
  16. # - display (enum) [no|full|abbreviated|email|email-user]
  17. # : Show author information?
  18. # commit-title
  19. # - display (bool) : Show the commit title?
  20. # - graph (enum) [no|v2|v1] : Show the commit graph? (main view only)
  21. # - refs (bool) : Show branches, tags and remotes? (main view only)
  22. # - overflow (boolint) : Highlight overflows? Defaults to 50 when enabled.
  23. #
  24. # date
  25. # - display (enum) [no|default|relative|relative-compact|custom]
  26. # : Show dates?
  27. # - local (bool) : Show local dates?
  28. # - format (string) : Custom strftime(3) format
  29. #
  30. # file-name
  31. # - display (enum) [no|always|auto] : Show file names?
  32. #
  33. # file-size
  34. # - display (enum) [no|default|units] : Show file sizes?
  35. #
  36. # id
  37. # - display (bool) : Show commit/tree ID?
  38. #
  39. # line-number
  40. # - display (bool) : Show line numbers?
  41. # - interval (int) : Interval between line numbers; defaults to 5
  42. #
  43. # mode
  44. # - display (bool) : Show file modes?
  45. #
  46. # status
  47. # - display (enum) [no|short|long] : Show status label?
  48. #
  49. # text
  50. # - display (bool) : Show text?
  51. # - commit-title-overflow (boolint) : Highlight overflow in log and diff view?
  52. #
  53. # All columns also support a width option to configure the max width of
  54. # the column. Use zero (the default value) to auto-size the column based
  55. # on the content.
  56.  
  57. set blame-view = date:default author:full file-name:auto id:yes,color line-number:no,interval=5 text
  58. set grep-view = file-name:no line-number:yes,interval=1 text
  59. set main-view = line-number:no,interval=5 id:no date:default author:full commit-title:yes,graph,refs,overflow=no
  60. set refs-view = line-number:no id:no date:default author:full ref commit-title
  61. set stash-view = line-number:no,interval=5 id:no date:default author:full commit-title
  62. set status-view = line-number:no,interval=5 status:short file-name
  63. set tree-view = line-number:no,interval=5 mode author:full file-size date:default id:no file-name
  64.  
  65. # Pager based views
  66. set pager-view = line-number:no,interval=5 text
  67. set stage-view = line-number:no,interval=5 text
  68. set log-view = line-number:no,interval=5 text
  69. set blob-view = line-number:no,interval=5 text
  70. set diff-view = line-number:no,interval=5 text:yes,commit-title-overflow=no
  71.  
  72. # UI display settings
  73. set show-changes = yes # Show changes commits in the main view?
  74. set wrap-lines = no # Wrap long lines in pager views?
  75. set tab-size = 8 # Number of spaces to use when expanding tabs
  76. set line-graphics = default # Enum: ascii, default, utf-8
  77. set truncation-delimiter = ~ # Character drawn for truncations, or "utf-8"
  78.  
  79. # Format reference names based on type.
  80. # - head : The current HEAD.
  81. # - tag : A signed tag.
  82. # - local-tag : An unsigned tag.
  83. # - remote : A remote.
  84. # - tracked-remote : The remote tracked by current HEAD.
  85. # - replace : A replaced reference.
  86. # - branch : Any other reference.
  87. # If no format is defined for `local-tag` then the one for `tag` is used.
  88. # Similarly, `remote` is used if no `tracked-remote` format exists.
  89. # Prefix with `hide:` to not show that reference type, e.g. `hide:remote`.
  90. # Expects a space-separated list of format strings.
  91. set reference-format = [branch] <tag> {remote} ~replace~
  92.  
  93. # Settings controlling how content is read from Git
  94. set commit-order = auto # Enum: auto, default, topo, date, reverse (main)
  95. set status-show-untracked-dirs = yes # Show files in untracked directories? (status)
  96. set status-show-untracked-files = yes # Show untracked files?
  97. set ignore-space = no # Enum: no, all, some, at-eol (diff)
  98. set show-notes = yes # When non-bool passed as `--show-notes=...` (diff)
  99. #set diff-context = 3 # Number of lines to show around diff changes (diff)
  100. #set diff-options = -C # User-defined options for `tig show` (git-diff)
  101. #set diff-highlight = true # String (or bool): Path to diff-highlight script,
  102. # defaults to `diff-highlight`.
  103. #set blame-options = -C -C -C # User-defined options for `tig blame` (git-blame)
  104. #set log-options = --pretty=raw # User-defined options for `tig log` (git-log)
  105. #set main-options = -n 1000 # User-defined options for `tig` (git-log)
  106. #set mailmap = yes # Use .mailmap to show canonical name and email address
  107.  
  108. # Misc
  109. set refresh-mode = auto # Enum: manual, auto, after-command, periodic
  110. set refresh-interval = 10 # Interval in seconds between refreshes
  111. set ignore-case = no # Enum: no, yes, smart-case
  112. # Ignore case when searching? Smart-case option will
  113. set wrap-search = yes # Wrap around to top/bottom of view when searching
  114. set focus-child = yes # Move focus to child view when opened?
  115. set horizontal-scroll = 50% # Number of columns to scroll as % of width
  116. set split-view-height = 67% # Height of the bottom view for horizontal splits
  117. set vertical-split = auto # Enum: horizontal, vertical, auto; Use auto to
  118. # switch to horizontal split when width allows it
  119. set split-view-width = 50% # Width of right-most view for vertical splits
  120. set editor-line-number = yes # Automatically pass line number to editor? Used
  121. # for opening file at specific line e.g. from a diff
  122. set history-size = 500 # Size of persistent history, 0 to disable
  123. set mouse = no # Enable mouse support?
  124. set mouse-scroll = 3 # Number of lines to scroll via the mouse
  125. set mouse-wheel-cursor = no # Prefer moving the cursor to scrolling the view?
  126.  
  127. # User-defined commands
  128. # ---------------------
  129. # These commands allow to run shell commands directly from within Tig.
  130. # Unless otherwise specified, commands are run in the foreground with
  131. # their console output shown (as if '!' was specified). When multiple
  132. # command options are specified their behavior are combined, e.g. "?<git
  133. # commit" will prompt the user whether to execute the command and will
  134. # exit Tig after completion.
  135. #
  136. # ! Run the command in the foreground with output shown.
  137. # @ Run the command in the background with no output.
  138. # ? Prompt the user before executing the command.
  139. # < Exit Tig after executing the command.
  140. #
  141. # User-defined commands can optionally refer to Tig's internal state
  142. # using the following variable names, which are substituted before
  143. # commands are run:
  144. #
  145. # %(head) The current ref ID. Defaults to HEAD
  146. # %(commit) The current commit ID.
  147. # %(blob) The current blob ID.
  148. # %(branch) The current branch name.
  149. # %(remote) The current remote name.
  150. # %(tag) The current tag name.
  151. # %(stash) The current stash name.
  152. # %(directory) The current directory path in the tree view;
  153. # empty for the root directory.
  154. # %(file) The currently selected file.
  155. # %(ref) The reference given to blame or HEAD if undefined.
  156. # %(revargs) The revision arguments passed on the command line.
  157. # %(fileargs) The file arguments passed on the command line.
  158. # %(cmdlineargs) All other options passed on the command line.
  159. # %(diffargs) The diff options from `diff-options` or `TIG_DIFF_OPTS`
  160. # %(prompt) Prompt for the argument value.
  161.  
  162. bind main C ?git cherry-pick %(commit)
  163. bind status C !git commit
  164. bind stash A ?git stash apply %(stash)
  165. bind stash P ?git stash pop %(stash)
  166. bind stash ! ?git stash drop %(stash)
  167. bind refs C ?git checkout %(branch)
  168. bind refs ! ?git branch -D %(branch)
  169.  
  170. # Normal commands
  171. # ---------------
  172.  
  173. # View switching
  174. bind generic m view-main
  175. bind generic d view-diff
  176. bind generic l view-log
  177. bind generic t view-tree
  178. bind generic f view-blob
  179. bind generic b view-blame
  180. bind generic r view-refs
  181. bind generic p view-pager
  182. bind generic h view-help
  183. bind generic s view-status
  184. bind generic S view-status # Compat binding to avoid going crazy!
  185. bind generic c view-stage
  186. bind generic y view-stash
  187. bind generic g view-grep
  188.  
  189. # View manipulation
  190. bind generic <Enter> enter # Enter and open selected entry
  191. bind generic <Lt> back # Go back to the previous view state
  192. bind generic <Down> next # Move to next
  193. bind generic <C-N> next
  194. bind generic J next
  195. bind generic <Up> previous # Move to previous
  196. bind generic <C-P> previous
  197. bind generic K previous
  198. bind generic , parent # Move to parent
  199. bind generic <Tab> view-next # Move focus to the next view
  200. bind generic R refresh # Reload and refresh view
  201. bind generic <F5> refresh
  202. bind generic O maximize # Maximize the current view
  203. bind generic q view-close # Close the current view
  204. bind generic Q quit # Close all views and quit
  205. bind generic <C-C> quit # Close all views and quit
  206.  
  207. # View specific
  208. bind status u status-update # Stage/unstage changes in file
  209. bind status ! status-revert # Revert changes in file
  210. bind status M status-merge # Open git-mergetool(1)
  211. #bind status ??? :toggle status # Show short or long status labels
  212. bind stage u status-update # Stage/unstage current diff (c)hunk
  213. bind stage 1 stage-update-line # Stage/unstage current line
  214. bind stage ! status-revert # Revert current diff (c)hunk
  215. bind stage \ stage-split-chunk # Split current diff (c)hunk
  216. bind stage @ :/^@@ # Jump to next (c)hunk
  217. bind stage [ :toggle diff-context -1 # Decrease the diff context
  218. bind stage ] :toggle diff-context +1 # Increase the diff context
  219. bind diff @ :/^@@ # Jump to next (c)hunk
  220. bind diff [ :toggle diff-context -1
  221. bind diff ] :toggle diff-context +1
  222. bind main G :toggle commit-title-graph # Toggle revision graph visualization
  223. bind main F :toggle commit-title-refs # Toggle reference display (tags/branches)
  224.  
  225. # Cursor navigation
  226. bind generic j move-down
  227. bind generic k move-up
  228. bind generic <C-D> move-half-page-down
  229. bind generic <C-U> move-half-page-up
  230. bind generic <PgDown> move-page-down
  231. bind generic <Space> move-page-down
  232. bind generic <PgUp> move-page-up
  233. bind generic - move-page-up
  234. bind generic <Home> move-first-line
  235. bind generic <End> move-last-line
  236.  
  237. # Scrolling
  238. bind generic | scroll-first-col
  239. bind generic <Left> scroll-left
  240. bind generic <Right> scroll-right
  241. bind generic <Ins> scroll-line-up
  242. bind generic <C-Y> scroll-line-up
  243. bind generic <Del> scroll-line-down
  244. bind generic <C-E> scroll-line-down
  245. bind generic <SBack> scroll-page-up
  246. bind generic <SFwd> scroll-page-down
  247.  
  248. # Searching
  249. bind generic / search
  250. bind generic ? search-back
  251. bind generic n find-next
  252. bind generic N find-prev
  253. # Navigation keys used while searching
  254. bind search <Down> find-next
  255. bind search <C-N> find-next
  256. bind search <C-J> find-next
  257. bind search <Up> find-prev
  258. bind search <C-P> find-prev
  259. bind search <C-K> find-prev
  260. bind search <C-C> view-close
  261.  
  262. # Option manipulation
  263. bind generic o options # Open the options menu
  264. # Bindings for toggling settings
  265. bind generic I :toggle sort-order # Toggle ascending/descending sort order
  266. bind generic i :toggle sort-field # Toggle field to sort by
  267. bind generic <Hash> :toggle line-number # Toggle line numbers
  268. bind generic D :toggle date # Toggle date display
  269. bind generic A :toggle author # Toggle author display
  270. bind generic ~ :toggle line-graphics # Toggle (line) graphics mode
  271. bind generic F :toggle file-name # Toggle file name display
  272. # bind generic ??? :toogle show-changes # Toggle local changes display in the main view
  273. bind generic W :toggle ignore-space # Toggle ignoring whitespace in diffs
  274. # bind generic ? :toggle commit-order # Toggle commit ordering
  275. bind generic X :toggle id # Toggle commit ID display
  276. bind generic $ :toggle commit-title-overflow
  277. # Toggle highlighting of commit title overflow
  278. # bind generic ??? :toggle file-size # Toggle file size format
  279. # bind generic ??? :toggle status # Toggle status display
  280. # bind generic ??? :toggle status-show-untracked-dirs
  281. # Toggle display of file in untracked directories
  282. # bind generic ??? :toggle vertical-split # Toggle vertical split
  283. bind generic % :toggle file-filter
  284.  
  285. # Misc
  286. bind generic e edit # Open in editor
  287. bind generic : prompt # Open the prompt
  288. bind generic <C-L> screen-redraw # Redraw the screen
  289. bind generic z stop-loading # Stop all loading views
  290. bind generic v show-version # Show Tig version
  291.  
  292. # Colors
  293. # ------
  294.  
  295. # The colors in the UI can be customized. In addition to the colors used
  296. # for the UI you can also define new colors to use in the pager, blob,
  297. # diff, and stage views by placing the text to match for in quotes.
  298. #
  299. # Prefix the name of a view to set a color only for that view, e.g.
  300. #
  301. # color grep.file blue default
  302. #
  303. # As an example, this setting will to color Signed-off-by lines with a
  304. # yellow foreground color and use the default background color.
  305. #
  306. # color " Signed-off-by" yellow default
  307. #
  308. # Note the four leading spaces in the string to match. This is because
  309. # Git automatically indents commit messages by four spaces.
  310.  
  311. color "---" blue default
  312. color "diff --" yellow default
  313. color "--- " yellow default
  314. color "+++ " yellow default
  315. color "@@" magenta default
  316. color "+" green default
  317. color " +" green default
  318. color "-" red default
  319. color " -" red default
  320. color "index " blue default
  321. color "old file mode " yellow default
  322. color "new file mode " yellow default
  323. color "deleted file mode " yellow default
  324. color "copy from " yellow default
  325. color "copy to " yellow default
  326. color "rename from " yellow default
  327. color "rename to " yellow default
  328. color "similarity " yellow default
  329. color "dissimilarity " yellow default
  330. color "diff-tree " blue default
  331. color "Author: " cyan default
  332. color "Commit: " magenta default
  333. color "Tagger: " magenta default
  334. color "Merge: " blue default
  335. color "Date: " yellow default
  336. color "AuthorDate: " yellow default
  337. color "CommitDate: " yellow default
  338. color "TaggerDate: " yellow default
  339. color "Refs: " red default
  340. color "Reflog: " red default
  341. color "Reflog message: " yellow default
  342. color "stash@{" magenta default
  343. color "commit " green default
  344. color "parent " blue default
  345. color "tree " blue default
  346. color "author " green default
  347. color "committer " magenta default
  348. color " Signed-off-by" yellow default
  349. color " Acked-by" yellow default
  350. color " Tested-by" yellow default
  351. color " Reviewed-by" yellow default
  352. color default default default normal
  353. color cursor white green bold
  354. color status green default
  355. color delimiter magenta default
  356. color date blue default
  357. color mode cyan default
  358. color id magenta default
  359. color overflow red default
  360. color header yellow default
  361. color section cyan default
  362. color directory yellow default
  363. color file default default
  364. color grep.file blue default
  365. color file-size default default
  366. color line-number cyan default
  367. color title-blur white blue
  368. color title-focus white blue bold
  369. color main-commit default default
  370. color main-tag magenta default bold
  371. color main-local-tag magenta default
  372. color main-remote yellow default
  373. color main-replace cyan default
  374. color main-tracked yellow default bold
  375. color main-ref cyan default
  376. color main-head cyan default bold
  377. color stat-none default default
  378. color stat-staged magenta default
  379. color stat-unstaged magenta default
  380. color stat-untracked magenta default
  381. color help-group blue default
  382. color help-action yellow default
  383. color diff-stat blue default
  384. color diff-add-highlight green default standout
  385. color diff-del-highlight red default standout
  386. color palette-0 magenta default
  387. color palette-1 yellow default
  388. color palette-2 cyan default
  389. color palette-3 green default
  390. color palette-4 default default
  391. color palette-5 white default
  392. color palette-6 red default
  393. color palette-7 magenta default bold
  394. color palette-8 yellow default bold
  395. color palette-9 cyan default bold
  396. color palette-10 green default bold
  397. color palette-11 default default bold
  398. color palette-12 white default bold
  399. color palette-13 red default bold
  400. color graph-commit blue default
  401. color search-result black yellow
  402.  
  403. # Mappings for colors read from git configuration.
  404. # Set to "no" to disable.
  405. set git-colors = \
  406. branch.current=main-head \
  407. branch.local=main-ref \
  408. branch.plain=main-ref \
  409. branch.remote=main-remote \
  410. \
  411. diff.meta=diff-header \
  412. diff.meta=diff-index \
  413. diff.meta=diff-oldmode \
  414. diff.meta=diff-newmode \
  415. diff.frag=diff-chunk \
  416. diff.old=diff-del \
  417. diff.new=diff-add \
  418. \
  419. diff-highlight.oldHighlight=diff-del-highlight \
  420. diff-highlight.newHighlight=diff-add-highlight \
  421. \
  422. grep.filename=grep.file \
  423. grep.linenumber=grep.line-number \
  424. grep.separator=grep.delimiter \
  425. \
  426. status.branch=status.header \
  427. status.added=stat-staged \
  428. status.updated=stat-staged \
  429. status.changed=stat-unstaged \
  430. status.untracked=stat-untracked
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement