From cbe4d8faa1b0de9b01048ad094bb8e8295ea7653 Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 7 Dec 2022 19:53:42 +0100 Subject: Update documentation --- doc/config.md | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 128 insertions(+), 17 deletions(-) (limited to 'doc/config.md') diff --git a/doc/config.md b/doc/config.md index bfb1ee7c..dcd88b79 100644 --- a/doc/config.md +++ b/doc/config.md @@ -9,18 +9,33 @@ configuration. A list of configurable options follows. -## General +## External -General options must be placed in a section called `[general]`. +External options must be placed in a section called `[external]`. -Following is a list of general options: +Following is a list of external options: - + + + + + + + + + + + + + + + + +
**Name****Value****Function** -
double-width-ambiguousboolean -Assume the terminal displays characters in the East Asian Ambiguous -category as double-width characters. If you don't know what this means, you -probably won't need to enable it. + +
**Name****Value****Function**
tmpdirpathDirectory used to save temporary files.
editorshell commandExternal editor command. %s is substituted for the file name, %d for +the line number.
## Display @@ -30,10 +45,105 @@ Display options must be placed in a section called `[display]`. Following is a list of display options: - + + + + + + + + + +for black on white, "ansi" for ansi colors, "24bit" for true colors. "8bit" +is currently unimplemented (and fallbacks to ansi). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
**Name****Value****Function** -
mark-colorcolorSet the marker's color. Valid options are -"black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", -"terminal". + +
**Name****Value****Function**
color-mode"monochrome"/"ansi"/"8bit"/"24bit"/"auto"Set the color mode. "auto" for automatic detection, "monochrome"
format-mode"auto"/["bold", "italic", "underline", "reverse", "strike", "overline", +"blink"]Specifies output formatting modes. Accepts the string "auto" or an array +of specific attributes. An empty array (`[]`) disables formatting +completely.
no-format-mode +["bold", "italic", "underline", "reverse", "strike", "overline", "blink"] +Disable specified formatting modes.
emulate-overlinebooleanWhen set to true and the overline formatting attribute is not enabled, +overlines are substituted by underlines on the previous line.
alt-screen"auto"/booleanEnable/disable the alternative screen.
highlight-colorcolorSet the highlight color. Both hex values and CSS color names are +accepted.
double-width-ambiguousbooleanAssume the terminal displays characters in the East Asian Ambiguous +category as double-width characters. Useful when e.g. ○ occupies two +cells.
minimum-contrastnumberSpecify the minimum number of euclidian distance of the background and +foreground colors on the RGB plane. -1 disables this function (i.e. allows +black letters on black background, etc).
force-clearbooleanForce the screen to be completely cleared every time it is redrawn.
+ +## Siteconf + +Configuration options can be specified for individual sites. Each entry must +be in the table array `[[siteconf]]`. + + + + + + + + + + + + + + + + + + + + +
**Name****Value****Function**
urlregexRegular expression used to match the URL.
substitute_urlJS functionA JavaScript function returning the substituted url.
## Stylesheets @@ -45,7 +155,7 @@ There are two ways to import user stylesheets: 1. Include a user stylesheet using the format `include = 'path-to-user.css'`. To include multiple stylesheets, use `include = ['first-stylesheet.css, second-stylesheet.css']`. - Relative paths are interpreted as relative to the config directory. + Relative paths are interpreted relative to the config directory. 2. Place your stylesheet directly in your configuration file using `inline = """your-style"""`. @@ -54,7 +164,7 @@ There are two ways to import user stylesheets: Keybindings must be placed in these sections: -* for page browsing: `[page]` +* for pager interaction: `[page]` * for line editing: `[line]` Keybindings are configured using the syntax @@ -66,9 +176,6 @@ modifiers. Modifiers are the prefixes `C-` and `M-`, which add control or escape to the keybinding respectively (essentially making `M-` the same as `C-[`). Modifiers can be escaped with the `\` sign. -(Note: it is highly recommended to use single quotes here; escaping can get -quite ugly with double quotes.) - ```Examples: 'C-M-j' = 'pager.changeLocation()' # change URL when Control, Escape and j are pressed 'gg' = 'pager.cursorFirstLine()' # go to the first line of the page when g is pressed twice @@ -121,6 +228,8 @@ is typed in. A list of built-in pager functions can be found below. `pager.isearchBackward()`Search and highlight the first result, backwards `pager.searchPrev()`Jump to the next search result `pager.searchNext()`Jump to the previous search result +`pager.peek()`Display an alert of the current URL +`pager.peekCursor()`Display an alert of the URL under the cursor ### Line-editing actions @@ -142,6 +251,8 @@ is typed in. A list of built-in pager functions can be found below. `line.begin()`Move cursor to the previous word by one character `line.end()`Move cursor to the previous word by one character `line.escape()`Ignore keybindings for next character +`line.prevHist()`Jump to the previous history entry +`line.nextHist()`Jump to the next history entry Some entries have an optional `bounds` parameter. If passed, this must be a -- cgit 1.4.1-2-gfad0