From: Jonas Fonseca Date: Wed, 14 Jun 2006 20:29:22 +0000 (+0200) Subject: Sync docs X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/tig/commitdiff_plain/b484cbc84ae8fc3d2241e56c0048de9d99d650b8?ds=inline Sync docs --- diff --git a/README.html b/README.html index 2406800..18d18a0 100644 --- a/README.html +++ b/README.html @@ -1,4 +1,4 @@ -
+

Tig: text-mode interface for git

@@ -82,15 +82,7 @@ cellspacing="0" cellpadding="4"> ncurses - Be sure to also have development files installed. Usually they are available in a - - - - - - - - separate package ending with -dev. + Be sure to also have development files installed. Usually they are available in a separate package ending with -dev. diff --git a/manual.html b/manual.html index 63ac2c4..0f787e7 100644 --- a/manual.html +++ b/manual.html @@ -272,20 +272,146 @@ display input from stdin and colorize it.

When browsing repositories, tig uses the underlying git commands to present the user with various views, such as summarized commit log and showing the commit with the log message, diffstat, and the diff.

+

Table of Contents

+
    +
  1. +

    +Calling Conventions +

    + +
  2. +
  3. +

    +Environment Variables +

    + +
  4. +
  5. +

    +The Viewer +

    + +
  6. +
  7. +

    +Revision Specification +

    + +
  8. +
  9. +

    +Copyright +

    +
  10. +
  11. +

    +References and Related Tools +

    +
  12. +
-

Calling Conventions

+

1. Calling Conventions

-

Pager Mode

+

1.1. Pager Mode

If stdin is a pipe, any log or diff options will be ignored and the pager view will be opened loading data from stdin. The pager mode can be used for colorizing output from various git commands.

Example on how to colorize the output of git-show(1):

-
+
$ git show | tig
-

Git Command Options

+

1.2. Git Command Options

All git command options specified on the command line will be passed to the given command and all will be shell quoted before they are passed to the shell.

@@ -301,7 +427,7 @@ expected by the main view.

Example on how to open the log view and show both author and committer information:

-
+
$ tig log --pretty=fuller
@@ -309,20 +435,20 @@ information:

to revision options supported by the git commands. For details on specific git command options, refer to the man page of the command in question.

-

Environment Variables

+

2. Environment Variables

Several options related to the interface with git can be configured via environment options.

-

Repository References

+

2.1. Repository References

Commits that are referenced by tags and branch heads will be marked by the reference name surrounded by [ and ]:

-
+
2006-03-26 19:42 Petr Baudis         | [cogito-0.17.1] Cogito 0.17.1

If you want to filter out certain directories under .git/refs/, say tmp you can do it by setting the following variable:

-
+
$ TIG_LS_REMOTE="git ls-remote . | sed /\/tmp\//d" tig
@@ -338,11 +464,11 @@ TIG_LS_REMOTE

-

History Commands

+

2.2. History Commands

It is possible to alter which commands are used for the different views. If for example you prefer commits in the main view to be sorted by date and only show 500 commits, use:

-
+
$ TIG_MAIN_CMD="git log --date-order -n500 --pretty=raw %s" tig
@@ -381,29 +507,29 @@ TIG_MAIN_CMD
-

The Viewer

+

3. The Viewer

The display consists of a status window on the last line of the screen and one or more views. The default is to only show one view at the time but it is possible to split both the main and log view to also show the commit diff.

If you are in the log view and press Enter when the current line is a commit line, such as:

-
+
commit 4d55caff4cc89335192f3e566004b4ceef572521

You will split the view so that the log view is displayed in the top window and the diff view in the bottom window. You can switch between the two views by pressing Tab. To maximize the log view again, simply press l.

-

Current Head and Commit ID

+

3.1. Current Head and Commit ID

The viewer keeps track of both what head and commit ID you are currently viewing. The commit ID will follow the cursor line and change everytime time you highlight a different commit. Whenever you reopen the diff view it will be reloaded, if the commit ID changed.

The head ID is used when opening the main and log view to indicate from what revision to show history.

-

Views

-

tig(1) presents various views of a repository. Each view is based on output +

3.2. Views

+

Various views of a repository is presented. Each view is based on output from an external command, most often git log, git diff, or git show.

@@ -454,25 +580,25 @@ The help view

-

Title Windows

+

3.3. Title Windows

Each view has a title window which shows the name of the view, current commit ID if available, and where the view is positioned:

-
+
[main] c622eefaa485995320bc743431bae0d497b1d875 - commit 1 of 61 (1%)

By default, the title of the current view is highlighted using bold font. For long loading views (taking over 3 seconds) the time since loading started will be appended:

-
+
[main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 (0%) 5s
-

Keys

+

4. Keys

Below the default key bindings are shown.

-

View Switching

+

4.1. View Switching

m @@ -515,7 +641,7 @@ h, ?

-

View Manipulation

+

4.2. View Manipulation

q @@ -567,7 +693,7 @@ Down

-

Cursor Navigation

+

4.3. Cursor Navigation

j @@ -627,7 +753,7 @@ End

-

Scrolling

+

4.4. Scrolling

Insert @@ -662,7 +788,7 @@ s

-

Misc

+

4.5. Misc

Q @@ -686,7 +812,7 @@ z

Stop all background loading. This can be useful if you use - tig(1) in a repository with a long history without limiting + tig in a repository with a long history without limiting the revision log.

@@ -729,20 +855,20 @@ g
-

Revision Specification

+

5. Revision Specification

This section describes various ways to specify what revisions to display or -otherwise limit the view to. tig(1) does not itself parse the described +otherwise limit the view to. Tig does not itself parse the described revision options so refer to the relevant git man pages for futher information. Relevant man pages besides git-log(1) are git-diff(1) and git-rev-list(1).

You can tune the interaction with git by making use of the options explained in this section. For example, by configuring the environment variables described in the "History commands" section.

-

Limit by Path Name

+

5.1. Limit by Path Name

If you are interested only in those revisions that made changes to a specific file (or even several files) list the files like this:

-
+
$ tig log Makefile README
@@ -750,7 +876,7 @@ file (or even several files) list the files like this:

separate file names from other git options using "--". So if you have a file named master it will clash with the reference named master, and thus you will have to use:

-
+
$ tig log -- master
@@ -760,17 +886,17 @@ will have to use:

Note
For the main view, avoiding ambiguity will in some cases require you to -specify two "--" options. The first will make tig(1) stop option processing +specify two "--" options. The first will make tig stop option processing and the latter will be passed to git log.
-

Limit by Date or Number

+

5.2. Limit by Date or Number

To speed up interaction with git, you can limit the amount of commits to show both for the log and main view. Either limit by date using e.g. —since=1.month or limit by the number of commits using -n400.

If you are only interested in changed that happened between two dates you can use:

-
+
$ tig -- --after="May 5th" --before="2006-05-16 15:44"
@@ -783,54 +909,54 @@ use:

"." instead, e.g. —after=May.5th.
-

Limiting by Commit Ranges

+

5.3. Limiting by Commit Ranges

Alternatively, commits can be limited to a specific range, such as "all commits between tag-1.0 and tag-2.0". For example:

-
+
$ tig log tag-1.0..tag-2.0

This way of commit limiting makes it trivial to only browse the commits which haven't been pushed to a remote branch. Assuming origin is your upstream remote branch, using:

-
+
$ tig log origin..HEAD

will list what will be pushed to the remote branch. Optionally, the ending HEAD can be left out since it is implied.

-

Limiting by Reachability

+

5.4. Limiting by Reachability

Git interprets the range specifier "tag-1.0..tag-2.0" as "all commits reachable from tag-2.0 but not from tag-1.0". Where reachability refers to what commits are ancestors (or part of the history) of the branch or tagged revision in question.

If you prefer to specify which commit to preview in this way use the following:

-
+
$ tig log tag-2.0 ^tag-1.0

You can think of ^ as a negation operator. Using this alternate syntax, it is possible to further prune commits by specifying multiple branch cut offs.

-

Combining Revisions Specification

+

5.5. Combining Revisions Specification

Revisions options can to some degree be combined, which makes it possible to say "show at most 20 commits from within the last month that changed files under the Documentation/ directory."

-
+
$ tig -- --since=1.month -n20 -- Documentation/
-

Examining All Repository References

+

5.6. Examining All Repository References

In some cases, it can be useful to query changes across all references in a repository. An example is to ask "did any line of development in this repository change a particular file within the last week". This can be accomplished using:

-
+
$ tig -- --all --since=1.week -- Makefile
-

BUGS

+

6. BUGS

Known bugs and problems:

    @@ -852,14 +978,9 @@ The cursor can wrap-around on the last line and cause the window to scroll.

    -
  • -

    -The prompt doesn't work while loading. -

    -
-

Copyright

+

7. Copyright

Copyright (c) 2006 Jonas Fonseca <fonseca@diku.dk>

This program is free software; you can redistribute it and/or modify @@ -867,8 +988,22 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

-

References and Related Tools

+

8. References and Related Tools

+

Manpages:

+ +

Online resources:

  • @@ -925,7 +1060,7 @@ gitview(1)

diff --git a/tig.1 b/tig.1 index d5a3393..08ce8ca 100644 --- a/tig.1 +++ b/tig.1 @@ -118,7 +118,7 @@ The command used for the main view\&. Note, you must always specify the option: .TP \fI~/\&.tigrc\fR -User configuration file\&. See tigrc(5) for examples\&. +User configuration file\&. See \fBtigrc\fR(5) for examples\&. .TP \fI\&.git/config\fR @@ -138,9 +138,6 @@ If the screen width is very small the main view can draw outside the current vie .TP \(bu The cursor can wrap\-around on the last line and cause the window to scroll\&. -.TP -\(bu -The prompt doesn't work while loading\&. .LP .SH "COPYRIGHT" @@ -154,6 +151,12 @@ This program is free software; you can redistribute it and/or modify it under th .SH "SEE ALSO" .TP 3 +\(bu + \fBtigrc\fR(5) +.TP +\(bu + The tig manual: \fIhttp://jonas.nitro.dk/tig/manual.html\fR, +.TP \(bu git(7): \fIhttp://www.kernel.org/pub/software/scm/git/docs/\fR, .TP diff --git a/tig.1.html b/tig.1.html index 5c34111..4df2da9 100644 --- a/tig.1.html +++ b/tig.1.html @@ -448,7 +448,7 @@ TIG_MAIN_CMD

- User configuration file. See tigrc(5) for examples. + User configuration file. See tigrc(5) for examples.

@@ -484,11 +484,6 @@ The cursor can wrap-around on the last line and cause the window to scroll.

-
  • -

    -The prompt doesn't work while loading. -

    -
  • COPYRIGHT

    @@ -504,6 +499,16 @@ the Free Software Foundation; either version 2 of the License, or
    diff --git a/tigrc.5 b/tigrc.5 index 25d1ce8..7eab048 100644 --- a/tigrc.5 +++ b/tigrc.5 @@ -23,7 +23,9 @@ tigrc \- tig user configuration file .SH "SYNOPSIS" .nf -\fIcolor\fR \fIfgcolor\fR \fIbgcolor\fR \fI[attributes]\fR +\fIset\fR variable \fI=\fR value +\fIbind\fR keymap key action +\fIcolor\fR area fgcolor bgcolor [attributes] .fi .SH "DESCRIPTION" @@ -32,102 +34,273 @@ tigrc \- tig user configuration file You can permanently set an option by putting it in the ~/\&.tigrc file\&. The file consists of a series of \fIcommands\fR\&. Each line of the file may contain only one command\&. -The hash mark (\fI#\fR), or semi\-colon (\fI;\fR) is used as a \fIcomment\fR character\&. All text after the comment character to the end of the line is ignored\&. You can use comments to annotate your initialization file\&. +The hash mark (\fI#\fR) is used as a \fIcomment\fR character\&. All text after the comment character to the end of the line is ignored\&. You can use comments to annotate your initialization file\&. -.SH "COLOR OPTIONS" +.SH "SET COMMAND" -Color options control highlighting and the user interface styles\&. If your terminal supports color, these commands can be used to assign foreground/backgound combinations to certain areas\&. Optionally, an attribute can be given as the last parameter\&. The syntax is: +A few selective variables can be configured via the set command\&. The syntax is: .nf - \fIcolor\fR \fIarea\fR \fIfgcolor\fR \fIbgcolor\fR \fI[attributes]\fR + \fIset\fR variables \fI=\fR value .fi -Valid colors include: \fIwhite\fR, \fIblack\fR, \fIgreen\fR, \fImagenta\fR, \fIblue\fR, \fIcyan\fR, \fIyellow\fR, \fIred\fR, \fIdefault\fR\&. Use \fIdefault\fR to refer to the default terminal colors\&. +Examples: +.nf + set show\-rev\-graph = yes # Show revision graph? + set line\-number\-interval = 5 # Interval between line numbers + set tab\-size = 8 # Number of spaces pr tab + set encoding = "UTF\-8" # Commit encoding +.fi -Valid attributes include: \fInormal\fR, \fIblink\fR, \fIbold\fR, \fIdim\fR, \fIreverse\fR, \fIstandout\fR, and \fIunderline\fR\&. Note, not all attributes may be supported by the terminal\&. +The type of variables are either bool, int, and string\&. -Valid area names are described below\&. Note, all names are case\-insensitive, and you may use \fI\-\fR, \fI_\fR, and \fI\&.\fR interchangeably\&. So "Diff\-Header", "DIFF_HEADER", and "diff\&.header" are the same\&. +.TP +Valid bool values +To set a bool variable to true use either "1", "true", or "yes"\&. Any other value will set the variable to false\&. -.SS "Diff markup" +.TP +Valid int values +A non\-negative integer\&. +.TP +Valid string values +A string of characters\&. Optionally, use either ' or " as delimiters\&. -Options concerning diff start, chunks and lines added and deleted\&. +.SS "Variables" -\fIdiff\-header\fR, \fIdiff\-chunk\fR, \fIdiff\-add\fR, \fIdiff\-del\fR +The following variables can be set: -.SS "Enhanced git diff markup" +.TP +\fIshow\-rev\-graph\fR (bool) +Show revision graph in the main view on startup\&. Can be toggled with \fIg\fR\&. +.TP +\fIline\-number\-interval\fR (int) +Interval between line numbers\&. Note, you have to toggle on line numbering with \fIn\fR or the \-n command line option\&. The default is to number every line\&. -Extra diff information emitted by the git diff machinery, such as mode changes, rename detection, and similarity\&. +.TP +\fItab\-size\fR (int) +Number of spaces per tab\&. The default is 8 spaces\&. +.TP +\fIcommit\-encoding\fR (string) +The encoding used for commits\&. The default is UTF\-8\&. Not this option is shadowed by the "i18n\&.commitencoding" option in \&.git/config\&. -\fIdiff\-oldmode\fR, \fIdiff\-newmode\fR, \fIdiff\-copy\-from\fR, \fIdiff\-copy\-to\fR, \fIdiff\-rename\-from\fR, \fIdiff\-rename\-to\fR, \fIdiff\-similarity\fR \fIdiff\-dissimilarity\fR \fIdiff\-tree\fR, \fIdiff\-index\fR +.SH "BIND COMMAND" -.SS "Pretty print commit headers" +Using bind commands keys can be mapped to an action when pressed in a given key map\&. The syntax is: -Commit diffs and the revision logs are usually formatted using pretty printed headers , unless \-\-pretty=raw was given\&. This includes lines, such as merge info, commit ID, and author and comitter date\&. +.nf + \fIbind\fR \fIkeymap\fR \fIkey\fR \fIaction\fR +.fi -\fIpp\-author\fR, \fIpp\-commit\fR, \fIpp\-merge\fR, \fIpp\-date\fR, \fIpp\-adate\fR, \fIpp\-cdate\fR +Examples: -.SS "Raw commit header" +.nf + # A few keybindings + bind main w scroll\-line\-up + bind main s scroll\-line\-down + bind main space enter + bind diff a previous + bind diff d next + bind diff b move\-first\-line +.fi -Usually shown when \-\-pretty=raw is given, however \fIcommit\fR is pretty much omnipresent\&. +Keys are mapped by first searching the keybindings for the current view, then the keybindings for the \fIgeneric\fR keymap, and last the default keybindings\&. Thus, the view keybindings shaddow the generic keybindings which shaddow the built\-in keybindings\&. +.TP +Keymaps +Valid keymaps are: \fImain\fR, \fIdiff\fR, \fIlog\fR, \fIhelp\fR, \fIpager\fR, and \fIgeneric\fR\&. Use \fIgeneric\fR to set key mapping in all keymaps\&. -\fIcommit\fR, \fIparent\fR, \fItree\fR, \fIauthor\fR, \fIcommitter\fR +.TP +Key values +Key values should never be quoted\&. Use either the ASCII value or one of the following symbolic key names\&. Symbolic key names are case insensitive, Use \fIHash\fR to bind to the # key, since the hash mark is used as a comment character\&. -.SS "Commit message" +\fIEnter\fR, \fISpace\fR, \fIBackspace\fR, \fITab\fR, \fIEscape\fR, \fILeft\fR, \fIRight\fR, \fIUp\fR, \fIDown\fR, \fIInsert\fR, \fIDelete\fR, \fIHash\fR, \fIHome\fR, \fIEnd\fR, \fIPageUp\fR, \fIPageDown\fR, \fIF1\fR, \fIF2\fR, \fIF3\fR, \fIF4\fR, \fIF5\fR, \fIF6\fR, \fIF7\fR, \fIF8\fR, \fIF9\fR, \fIF10\fR, \fIF11\fR, \fIF12\fR\&. +.TP +Action names +Valid action names are described below\&. Note, all names are case\-insensitive, and you may use \fI\-\fR, \fI_\fR, and \fI\&.\fR interchangeably, e\&.g\&. "view\-main", "View\&.Main", and "VIEW_MAIN" are the same\&. -For now only Signed\-off\-by lines are colorized\&. +.SS "Actions" +.TP +View switching -\fIsignoff\fR -.SS "UI colors" +.nf +view\-main Show main view +view\-diff Show diff view +view\-log Show log view +view\-help Show help page +view\-pager Show pager view +.fi +.TP +View manipulation -Colors for text not matching any of the above: \fIdefault\fR +.nf +enter Enter current line and scroll +next Move to next +previous Move to previous +view\-next Move focus to next view +view\-close Close the current view +quit Close all views and quit +.fi -Status window colors: \fIstatus\fR +.TP +Cursor navigation -Title window colors: \fItitle\-blur\fR, \fItitle\-focus\fR +.nf +move\-up Move cursor one line up +move\-down Move cursor one line down +move\-page_down Move cursor one page down +move\-page_up Move cursor one page up +move\-first_line Move cursor to first line +move\-last_line Move cursor to last line +.fi + +.TP +Scrolling -Cursor line colors: \fIcursor\fR +.nf +scroll\-line_up Scroll one line up +scroll\-line_down Scroll one line down +scroll\-page_up Scroll one page up +scroll\-page_down Scroll one page down +.fi +.TP +Misc -Main view specific: \fImain\-date\fR, \fImain\-author\fR, \fImain\-commit\fR, \fImain\-delim\fR, \fImain\-tag\fR, \fImain\-ref\fR -.SH "EXAMPLES" +.nf +prompt Bring up the prompt +screen\-update Update the screen +screen\-redraw Redraw the screen +screen\-resize Resize the screen +show\-version Show version information +stop\-loading Stop all loading views +toggle\-lineno Toggle line numbers +toggle\-rev_graph Toggle revision graph visualization +.fi +.SH "COLOR COMMAND" -Some sample options: -.IP +Color commands control highlighting and the user interface styles\&. If your terminal supports color, these commands can be used to assign foreground and backgound combinations to certain areas\&. Optionally, an attribute can be given as the last parameter\&. The syntax is: .nf -# Diff colors -color diff\-header yellow default -color diff\-index blue default -color diff\-chunk magenta default -# UI colors -color title\-blur white blue -color title\-focus white blue bold + \fIcolor\fR \fIarea\fR \fIfgcolor\fR \fIbgcolor\fR \fI[attributes]\fR .fi + +Examples: + +.nf + # Diff colors + color diff\-header yellow default + color diff\-index blue default + color diff\-chunk magenta default + # A strange looking cursor line + color cursor red default underline + # UI colors + color title\-blur white blue + color title\-focus white blue bold +.fi + +.TP +Area names +Valid area names are described below\&. Note, all names are case\-insensitive, and you may use \fI\-\fR, \fI_\fR, and \fI\&.\fR interchangeably, e\&.g\&. "Diff\-Header", "DIFF_HEADER", and "diff\&.header" are the same\&. + +.TP +Color names +Valid colors include: \fIwhite\fR, \fIblack\fR, \fIgreen\fR, \fImagenta\fR, \fIblue\fR, \fIcyan\fR, \fIyellow\fR, \fIred\fR, \fIdefault\fR\&. Use \fIdefault\fR to refer to the default terminal colors\&. + +.TP +Attribute names +Valid attributes include: \fInormal\fR, \fIblink\fR, \fIbold\fR, \fIdim\fR, \fIreverse\fR, \fIstandout\fR, and \fIunderline\fR\&. Note, not all attributes may be supported by the terminal\&. + +.SS "UI colors" + +.TP +Status window colors +Appearance of the bottom window showing info messages\&. + +\fIstatus\fR + +.TP +Title window colors +Appearence of the title windows when they are attached to any backgrounded windows and the current window\&. + +\fItitle\-blur\fR, \fItitle\-focus\fR + +.TP +Cursor line colors + \fIcursor\fR + +.TP +Main view specific +Appearance of the various columns in the main view, including the \fI~\fR used for delimiting long author names and labels for tag and branch references\&. + +\fImain\-date\fR, \fImain\-author\fR, \fImain\-commit\fR, \fImain\-delim\fR, \fImain\-tag\fR, \fImain\-ref\fR + +.SS "Highlighting" + + +The colors and attributes for text that is not highlighted can be controlled by changing the \fIdefault\fR color option\&. + +.TP +Diff markup +Options concerning diff start, chunks and lines added and deleted\&. + +\fIdiff\-header\fR, \fIdiff\-chunk\fR, \fIdiff\-add\fR, \fIdiff\-del\fR + +.TP +Enhanced git diff markup +Extra diff information emitted by the git diff machinery, such as mode changes, rename detection, and similarity\&. + +\fIdiff\-oldmode\fR, \fIdiff\-newmode\fR, \fIdiff\-copy\-from\fR, \fIdiff\-copy\-to\fR, \fIdiff\-rename\-from\fR, \fIdiff\-rename\-to\fR, \fIdiff\-similarity\fR \fIdiff\-dissimilarity\fR \fIdiff\-tree\fR, \fIdiff\-index\fR + +.TP +Pretty print commit headers +Commit diffs and the revision logs are usually formatted using pretty printed headers , unless \-\-pretty=raw was given\&. This includes lines, such as merge info, commit ID, and author and comitter date\&. + +\fIpp\-author\fR, \fIpp\-commit\fR, \fIpp\-merge\fR, \fIpp\-date\fR, \fIpp\-adate\fR, \fIpp\-cdate\fR + +.TP +Raw commit header +Usually shown when \-\-pretty=raw is given, however \fIcommit\fR is pretty much omnipresent\&. + +\fIcommit\fR, \fIparent\fR, \fItree\fR, \fIauthor\fR, \fIcommitter\fR + +.TP +Commit message +For now only Signed\-off\-by lines are colorized\&. + +\fIsignoff\fR + +.SH "COPYRIGHT" + + +Copyright (c) 2006 Jonas Fonseca + + +Licensed under the terms of the GNU General Public License\&. + .SH "SEE ALSO" -tig(1) +\fBtig\fR(1) and the tig manual: \fIhttp://jonas.nitro.dk/tig/tig.html\fR\&. diff --git a/tigrc.5.html b/tigrc.5.html index 493ad53..2dcc616 100644 --- a/tigrc.5.html +++ b/tigrc.5.html @@ -273,86 +273,655 @@ tigrc(5) Manual Page

    SYNOPSIS

    -
    color fgcolor bgcolor [attributes]
    +
    set variable = value +bind keymap key action +color area fgcolor bgcolor [attributes]

    DESCRIPTION

    -

    You can permanently set an option by putting it in the ~/.tigrc file. -The file consists of a series of commands. Each -line of the file may contain only one command.

    -

    The hash mark (#), or semi-colon (;) is used as a comment character. -All text after the comment character to the end of the line is ignored. -You can use comments to annotate your initialization file.

    +

    You can permanently set an option by putting it in the ~/.tigrc file. The +file consists of a series of commands. Each line of the file may contain +only one command.

    +

    The hash mark (#) is used as a comment character. All text after the +comment character to the end of the line is ignored. You can use comments to +annotate your initialization file.

    -

    Color options

    +

    Set command

    -

    Color options control highlighting and the user interface styles. -If your terminal supports color, these commands can be used to assign -foreground/backgound combinations to certain areas. Optionally, an -attribute can be given as the last parameter. The syntax is:

    +

    A few selective variables can be configured via the set command. The syntax +is:

    +
    +
    set variables = value
    +

    Examples:

    +
    +
    +
            set show-rev-graph = yes        # Show revision graph?
    +        set line-number-interval = 5    # Interval between line numbers
    +        set tab-size = 8                # Number of spaces pr tab
    +        set encoding = "UTF-8"          # Commit encoding
    +
    +

    The type of variables are either bool, int, and string.

    +
    +
    +Valid bool values +
    +
    +

    + To set a bool variable to true use either "1", "true", or "yes". + Any other value will set the variable to false. +

    +
    +
    +Valid int values +
    +
    +

    + A non-negative integer. +

    +
    +
    +Valid string values +
    +
    +

    + A string of characters. Optionally, use either ' or " as delimiters. +

    +
    +
    +

    Variables

    +

    The following variables can be set:

    +
    +
    +show-rev-graph (bool) +
    +
    +

    + Show revision graph in the main view on startup. Can be toggled with + g. +

    +
    +
    +line-number-interval (int) +
    +
    +

    + Interval between line numbers. Note, you have to toggle on line + numbering with n or the -n command line option. The default is to + number every line. +

    +
    +
    +tab-size (int) +
    +
    +

    + Number of spaces per tab. The default is 8 spaces. +

    +
    +
    +commit-encoding (string) +
    +
    +

    + The encoding used for commits. The default is UTF-8. Not this option + is shadowed by the "i18n.commitencoding" option in .git/config. +

    +
    +
    +
    +

    Bind command

    +
    +

    Using bind commands keys can be mapped to an action when pressed in a given +key map. The syntax is:

    +
    +
    bind keymap key action
    +

    Examples:

    +
    +
    +
            # A few keybindings
    +        bind main w scroll-line-up
    +        bind main s scroll-line-down
    +        bind main space enter
    +        bind diff a previous
    +        bind diff d next
    +        bind diff b move-first-line
    +
    +

    Keys are mapped by first searching the keybindings for the current view, then +the keybindings for the generic keymap, and last the default keybindings. +Thus, the view keybindings shaddow the generic keybindings which shaddow the +built-in keybindings.

    +
    +
    +Keymaps +
    +
    +

    +Valid keymaps are: main, diff, log, help, pager, and generic. Use +generic to set key mapping in all keymaps. +

    +
    +
    +Key values +
    +
    +

    +Key values should never be quoted. Use either the ASCII value or one of the +following symbolic key names. Symbolic key names are case insensitive, Use +Hash to bind to the # key, since the hash mark is used as a comment +character. +

    +

    Enter, Space, Backspace, Tab, Escape, Left, Right, Up, Down, +Insert, Delete, Hash, Home, End, PageUp, PageDown, F1, F2, F3, +F4, F5, F6, F7, F8, F9, F10, F11, F12.

    +
    +
    +Action names +
    +
    +

    +Valid action names are described below. Note, all names are +case-insensitive, and you may use -, _, and . interchangeably, +e.g. "view-main", "View.Main", and "VIEW_MAIN" are the same. +

    +
    +
    +

    Actions

    +
    + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + View switching:: + + +
    + view-main + + Show main view +
    + view-diff + + Show diff view +
    + view-log + + Show log view +
    + view-help + + Show help page +
    + view-pager + + Show pager view +
    +
    +
    + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + View manipulation:: + + +
    + enter + + Enter current line and scroll +
    + next + + Move to next +
    + previous + + Move to previous +
    + view-next + + Move focus to next view +
    + view-close + + Close the current view +
    + quit + + Close all views and quit +
    +
    +
    + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Cursor navigation:: + + +
    + move-up + + Move cursor one line up +
    + move-down + + Move cursor one line down +
    + move-page_down + + Move cursor one page down +
    + move-page_up + + Move cursor one page up +
    + move-first_line + + Move cursor to first line +
    + move-last_line + + Move cursor to last line +
    +
    +
    + +++ + + + + + + + + + + + + + + + + + + + + + + + +
    + Scrolling:: + + +
    + scroll-line_up + + Scroll one line up +
    + scroll-line_down + + Scroll one line down +
    + scroll-page_up + + Scroll one page up +
    + scroll-page_down + + Scroll one page down +
    +
    +
    + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Misc:: + + +
    + prompt + + Bring up the prompt +
    + screen-update + + Update the screen +
    + screen-redraw + + Redraw the screen +
    + screen-resize + + Resize the screen +
    + show-version + + Show version information +
    + stop-loading + + Stop all loading views +
    + toggle-lineno + + Toggle line numbers +
    + toggle-rev_graph + + Toggle revision graph visualization +
    +
    +
    +

    Color command

    +
    +

    Color commands control highlighting and the user interface styles. If your +terminal supports color, these commands can be used to assign foreground and +backgound combinations to certain areas. Optionally, an attribute can be given +as the last parameter. The syntax is:

    color area fgcolor bgcolor [attributes]
    -

    Valid colors include: white, black, green, magenta, blue, cyan, -yellow, red, default. Use default to refer to the default terminal -colors.

    -

    Valid attributes include: normal, blink, bold, dim, reverse, standout, -and underline. Note, not all attributes may be supported by the terminal.

    -

    Valid area names are described below. Note, all names are case-insensitive, -and you may use -, _, and . interchangeably. So "Diff-Header", -"DIFF_HEADER", and "diff.header" are the same.

    -

    Diff markup

    -

    Options concerning diff start, chunks and lines added and deleted.

    +

    Examples:

    +
    +
    +
            # Diff colors
    +        color diff-header       yellow  default
    +        color diff-index        blue    default
    +        color diff-chunk        magenta default
    +        # A strange looking cursor line
    +        color cursor            red     default underline
    +        # UI colors
    +        color title-blur        white   blue
    +        color title-focus       white   blue    bold
    +
    +
    +
    +Area names +
    +
    +

    + Valid area names are described below. Note, all names are + case-insensitive, and you may use -, _, and . interchangeably, + e.g. "Diff-Header", "DIFF_HEADER", and "diff.header" are the same. +

    +
    +
    +Color names +
    +
    +

    + Valid colors include: white, black, green, magenta, blue, + cyan, yellow, red, default. Use default to refer to the + default terminal colors. +

    +
    +
    +Attribute names +
    +
    +

    + Valid attributes include: normal, blink, bold, dim, reverse, + standout, and underline. Note, not all attributes may be supported + by the terminal. +

    +
    +
    +

    UI colors

    +
    +
    +Status window colors +
    +
    +

    +Appearance of the bottom window showing info messages. +

    +

    status

    +
    +
    +Title window colors +
    +
    +

    +Appearence of the title windows when they are attached +to any backgrounded windows and the current window. +

    +

    title-blur, title-focus

    +
    +
    +Cursor line colors +
    +
    +

    +cursor +

    +
    +
    +Main view specific +
    +
    +

    +Appearance of the various columns in the main view, including the ~ used for +delimiting long author names and labels for tag and branch references. +

    +

    main-date, main-author, main-commit, main-delim, main-tag, +main-ref

    +
    +
    +

    Highlighting

    +

    The colors and attributes for text that is not highlighted can be controlled +by changing the default color option.

    +
    +
    +Diff markup +
    +
    +

    +Options concerning diff start, chunks and lines added and deleted. +

    diff-header, diff-chunk, diff-add, diff-del

    -

    Enhanced git diff markup

    -

    Extra diff information emitted by the git diff machinery, such as mode -changes, rename detection, and similarity.

    +
    +
    +Enhanced git diff markup +
    +
    +

    +Extra diff information emitted by the git diff machinery, such as mode +changes, rename detection, and similarity. +

    diff-oldmode, diff-newmode, diff-copy-from, diff-copy-to, diff-rename-from, diff-rename-to, diff-similarity diff-dissimilarity diff-tree, diff-index

    -

    Pretty print commit headers

    -

    Commit diffs and the revision logs are usually formatted using pretty -printed headers , unless --pretty=raw was given. This includes lines, -such as merge info, commit ID, and author and comitter date.

    +
    +
    +Pretty print commit headers +
    +
    +

    +Commit diffs and the revision logs are usually formatted using pretty printed +headers , unless --pretty=raw was given. This includes lines, such as merge +info, commit ID, and author and comitter date. +

    pp-author, pp-commit, pp-merge, pp-date, pp-adate, pp-cdate

    -

    Raw commit header

    -

    Usually shown when --pretty=raw is given, however commit is pretty -much omnipresent.

    +
    +
    +Raw commit header +
    +
    +

    +Usually shown when --pretty=raw is given, however commit is pretty much +omnipresent. +

    commit, parent, tree, author, committer

    -

    Commit message

    -

    For now only Signed-off-by lines are colorized.

    +
    +
    +Commit message +
    +
    +

    +For now only Signed-off-by lines are colorized. +

    signoff

    -

    UI colors

    -

    Colors for text not matching any of the above: default

    -

    Status window colors: status

    -

    Title window colors: title-blur, title-focus

    -

    Cursor line colors: cursor

    -

    Main view specific: main-date, main-author, main-commit, main-delim, -main-tag, main-ref

    +
    +
    -

    EXAMPLES

    +

    COPYRIGHT

    -

    Some sample options:

    -
    -
    -
    -
    -
    # Diff colors
    -color diff-header       yellow  default
    -color diff-index        blue    default
    -color diff-chunk        magenta default
    -# UI colors
    -color title-blur        white   blue
    -color title-focus       white   blue    bold
    -
    -
    +

    Copyright (c) 2006 Jonas Fonseca <fonseca@diku.dk>

    +

    Licensed under the terms of the GNU General Public License.

    SEE ALSO