From 27056ad8e5247da859a6d6f987b03957c29ed9da Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 6 May 2014 20:28:37 -0400 Subject: [PATCH] Improve documentation of view settings in tigrc(5) Use more consistent naming convention (view setting vs column option). Move examples up before the column option documentation to give a better idea of how the view settings work. Mention 'column option' several places so users can copy-paste key words from the obsolete option warning and find the documentation in tigrc(5). --- doc/tigrc.5.adoc | 61 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/doc/tigrc.5.adoc b/doc/tigrc.5.adoc index 1a9c228..ae498b8 100644 --- a/doc/tigrc.5.adoc +++ b/doc/tigrc.5.adoc @@ -286,17 +286,37 @@ The following variables can be set: View settings ~~~~~~~~~~~~~ -The view settings, e.g. `blame-view`, can be used to configure the order and -settings for the different columns of a view. Each view option expects a space -separated list of column specifications. Column specifications first give the -column type, and can optionally be followed by a colon (`:`) and a list of -column settings, e.g. `author:full,width=20`. The first setting value is always -the 'display' setting. When no 'display' setting value is given, 'yes' is -assumed. For 'display' settings taking an enumerated value this will -automatically resolve to the default enum value. For example, `file-name` will -automatically have its 'display' setting resolve to 'auto'. - -The following list shows which the available view options and what column types +The view settings define the order and options for the different columns of a +view. Each view setting expects a space separated list of column specifications. +Column specifications starts with the column type, and can optionally be +followed by a colon (`:`) and a list of column options. E.g. the following +column specification defines an 'author' column displaying the author email and +with a maximum width of 20 characters: `author:email,width=20`. + +The first option value in a column specification is always the 'display' option. +When no 'display' value is given, 'yes' is assumed. For 'display' options +expecting an enumerated value this will automatically resolve to the default +enum value. For example, `file-name` will automatically have its 'display' +setting resolve to 'auto'. + +Examples: +-------------------------------------------------------------------------- +# Enable both ID and line numbers in the blame view +set blame-view = date:default author:full file-name:auto id:yes,color \ + line-number:yes,interval=5 text + +# Change grep view to be similar to `git grep` format +set grep-view = file-name:yes line-number:yes,interval=1 text + +# Show file sizes as units +set tree-view = line-number:no,interval=5 mode author:full \ + file-size:units date:default id:no file-name + +# Show line numbers for every 10th line in the pager view +set pager-view = line-number:yes,interval=10 text +-------------------------------------------------------------------------- + +The following list shows which the available view settings and what column types they support: blob-view, diff-view, log-view, pager-view, stage-view:: line-number, text @@ -308,7 +328,7 @@ stash-view:: author, date, commit-title, id, line-number status-view:: file-name, line-number, status tree-view:: author, date, id, file-name, file-size, line-number, mode -Supported column types and their respective settings: +Supported column types and their respective column options: author:: @@ -388,22 +408,7 @@ text:: width of 50 character. When set to an int, the assigned value is used as the maximum character width. -Examples: --------------------------------------------------------------------------- -# Enable both ID and line numbers in the blame view -set blame-view = date:default author:full file-name:auto id:yes,color line-number:yes,interval=5 text - -# Change grep view to be similar to `git grep` format -set grep-view = file-name:yes line-number:yes,interval=1 text - -# Show file sizes as units -set tree-view = line-number:no,interval=5 mode author:full file-size:units date:default id:no file-name - -# Show line numbers for every 10th line in the pager view -set pager-view = line-number:yes,interval=10 text --------------------------------------------------------------------------- - -Note that all column options can be toggled. For 'display' options, use the +All column options can be toggled. For 'display' options, use the option name as the prefix followed by a dash and the column name. E.g. `:toggle author-display` will toggle the 'display' option in the 'author' column. For all other options use the column name followed by a dash and -- 2.11.4.GIT