diff options
author | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-07-31 02:05:02 +0300 |
commit | fbe60af538aa6c723779ae7a816de845460619ae (patch) | |
tree | b541ffeeaa5046de170cac688c72aeb891c61ebb /runtime/doc | |
parent | 1011462b40502e6039494e70a870f0360f152b1b (diff) | |
parent | 13e8356f52d9dc1da96179ee425168740874c8c7 (diff) | |
download | rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.gz rneovim-fbe60af538aa6c723779ae7a816de845460619ae.tar.bz2 rneovim-fbe60af538aa6c723779ae7a816de845460619ae.zip |
Merge branch 'master' into colored-cmdline
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/change.txt | 3 | ||||
-rw-r--r-- | runtime/doc/digraph.txt | 3 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 85 | ||||
-rw-r--r-- | runtime/doc/intro.txt | 3 | ||||
-rw-r--r-- | runtime/doc/map.txt | 1 | ||||
-rw-r--r-- | runtime/doc/nvim.txt | 2 | ||||
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 3 | ||||
-rw-r--r-- | runtime/doc/term.txt | 154 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 8 |
10 files changed, 152 insertions, 112 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 6af3c4d5d7..f82d61370c 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -861,8 +861,7 @@ Exceptions: Substitute with an expression *sub-replace-expression* *sub-replace-\=* *s/\=* When the substitute string starts with "\=" the remainder is interpreted as an -expression. This does not work recursively: a |substitute()| function inside -the expression cannot use "\=" for the substitute string. +expression. The special meaning for characters as mentioned at |sub-replace-special| does not apply except for "<CR>". A <NL> character is used as a line break, you diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index 89351c5b4f..43f8ccab06 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -143,7 +143,7 @@ a standard meaning: Two 2 Hook Nine 9 Horn - Equals = Cyrillic (= used as second char) + Equals = Cyrillic (= used as second char) Asterisk * Greek Percent sign % Greek/Cyrillic special Plus + smalls: Arabic, capitals: Hebrew @@ -922,6 +922,7 @@ char digraph hex dec official name ~ † /- 2020 8224 DAGGER ‡ /= 2021 8225 DOUBLE DAGGER ‥ .. 2025 8229 TWO DOT LEADER +… ,. 2026 8230 HORIZONTAL ELLIPSIS ‰ %0 2030 8240 PER MILLE SIGN ′ 1' 2032 8242 PRIME ″ 2' 2033 8243 DOUBLE PRIME diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3a928c97ec..e1d156e91f 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4046,7 +4046,9 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* locale locale names (as output of locale -a) mapping mapping name menu menus + messages |:messages| suboptions option options + packadd optional package |pack-add| names shellcmd Shell command sign |:sign| suboptions syntax syntax file names |'syntax'| @@ -4273,7 +4275,8 @@ getqflist([{what}]) *getqflist()* If the optional {what} dictionary argument is supplied, then returns only the items listed in {what} as a dictionary. The following string items are supported in {what}: - nr get information for this quickfix list + nr get information for this quickfix list; zero + means the current quickfix list title get the list title winid get the |window-ID| (if opened) all all of the above quickfix properties @@ -5526,6 +5529,51 @@ max({expr}) Return the maximum value of all items in {expr}. items in {expr} cannot be used as a Number this results in an error. An empty |List| or |Dictionary| results in zero. +menu_get({path}, {modes}) *menu_get()* + Returns a |List| of |Dictionaries| describing |menus| (defined + by |:menu|, |:amenu|, etc.). + {path} limits the result to a subtree of the menu hierarchy + (empty string matches all menus). E.g. to get items in the + "File" menu subtree: > + :echo menu_get('File','') +< + {modes} is a string of zero or more modes (see |maparg()| or + |creating-menus| for the list of modes). "a" means "all". + + For example: > + nnoremenu &Test.Test inormal + inoremenu Test.Test insert + vnoremenu Test.Test x + echo menu_get("") +< + returns something like this: +> + [ { + "hidden": 0, + "name": "Test", + "priority": 500, + "shortcut": 84, + "submenus": [ { + "hidden": 0, + "mappings": { + i": { + "enabled": 1, + "noremap": 1, + "rhs": "insert", + "sid": 1, + "silent": 0 + }, + n": { ... }, + s": { ... }, + v": { ... } + }, + "name": "Test", + "priority": 500, + "shortcut": 0 + } ] + } ] +< + *min()* min({expr}) Return the minimum value of all items in {expr}. {expr} can be a list or a dictionary. For a dictionary, @@ -5984,9 +6032,9 @@ range({expr} [, {max} [, {stride}]]) *range()* *readfile()* readfile({fname} [, {binary} [, {max}]]) Read file {fname} and return a |List|, each line of the file - as an item. Lines broken at NL characters. Macintosh files - separated with CR will result in a single long line (unless a - NL appears somewhere). + as an item. Lines are broken at NL characters. Macintosh + files separated with CR will result in a single long line + (unless a NL appears somewhere). All NUL characters are replaced with a NL character. When {binary} contains "b" binary mode is used: - When the last line ends in a NL an extra empty list item is @@ -6504,15 +6552,27 @@ serverlist() *serverlist()* nvim --cmd "echo serverlist()" --cmd "q" < serverstart([{address}]) *serverstart()* - Opens a TCP socket (IPv4/IPv6), Unix domain socket (Unix), - or named pipe (Windows) at {address} for clients to connect - to and returns {address}. + Opens a socket or named pipe at {address} and listens for + |RPC| messages. Clients can send |API| commands to the address + to control Nvim. Returns the address string. - If {address} contains `:`, a TCP socket is used. Everything in - front of the last occurrence of `:` is the IP or hostname, - everything after it the port. If the port is empty or `0`, - a random port will be assigned. + If {address} does not contain a colon ":" it is interpreted as + a named pipe or Unix domain socket path. + Example: > + if has('win32') + call serverstart('\\.\pipe\nvim-pipe-1234') + else + call serverstart('nvim.sock') + endif +< + If {address} contains a colon ":" it is interpreted as a TCP + address where the last ":" separates the host and port. + Assigns a random port if it is empty or 0. Supports IPv4/IPv6. + + Example: > + :call serverstart('::1:12345') +< If no address is given, it is equivalent to: > :call serverstart(tempname()) @@ -7291,6 +7351,9 @@ submatch({nr}[, {list}]) *submatch()* *E935* |substitute()| this list will always contain one or zero items, since there are no real line breaks. + When substitute() is used recursively only the submatches in + the current (deepest) call can be obtained. + Example: > :s/\d\+/\=submatch(0) + 1/ < This finds the first number in the line and adds one to it. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 88d04aa76b..b9cc94ce5f 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -249,8 +249,7 @@ Vi "the original". Without further remarks this is the version of Vi that appeared in Sun OS 4.x. ":version" returns "Version 3.7, 6/7/85". Sometimes other versions are referred to. Only runs under Unix. Source code only available with a - license. More information on Vi can be found through: - http://vi-editor.org [doesn't currently work...] + license. *Nvi* Nvi The "New" Vi. The version of Vi that comes with BSD 4.4 and FreeBSD. Very good compatibility with the original Vi, with a few extensions. diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index bfcf621cb8..944f7474be 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1202,6 +1202,7 @@ completion can be enabled: -complete=locale locale names (as output of locale -a) -complete=mapping mapping name -complete=menu menus + -complete=messages |:messages| suboptions -complete=option options -complete=packadd optional package |pack-add| names -complete=shellcmd Shell command diff --git a/runtime/doc/nvim.txt b/runtime/doc/nvim.txt index 29059f83d9..f3f4305ad5 100644 --- a/runtime/doc/nvim.txt +++ b/runtime/doc/nvim.txt @@ -6,6 +6,8 @@ Nvim *nvim* *nvim-intro* +Nvim is based on Vim by Bram Moolenaar. + If you are new to Vim see |help.txt|, or type ":Tutor". If you already use Vim see |nvim-from-vim| for a quickstart. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index dc968cd666..bc9705d116 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2736,7 +2736,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'guicursor' 'gcr' string (default "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20") global Configures the cursor style for each mode. Works in the GUI and many - terminals. See |cursor-shape| for details. + terminals. See |tui-cursor-shape|. To disable cursor-styling, reset the option: > :set guicursor= diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index d869516bff..0b72ec9960 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -349,6 +349,9 @@ argument. *--api-info* --api-info Print msgpack-encoded |api-metadata| and exit. + *--headless* +--headless Do not start the built-in UI. + ============================================================================== 2. Initialization *initialization* *startup* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index bce944eab5..73c8956085 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,76 +1,62 @@ *term.txt* Nvim - VIM REFERENCE MANUAL by Bram Moolenaar + NVIM REFERENCE MANUAL Terminal information -Vim uses information about the terminal you are using to fill the screen and -recognize what keys you hit. If this information is not correct, the screen -may be messed up or keys may not be recognized. The actions which have to be -performed on the screen are accomplished by outputting a string of -characters. +Nvim (except in |--headless| mode) uses information about the terminal you are +using to present a built-in UI. If that information is not correct, the +screen may be messed up or keys may not be recognized. Type <M-]> to see the table of contents. ============================================================================== Startup *startup-terminal* -When Vim is started a default terminal type is assumed. for MS-DOS this is -the pc terminal, for Unix an ansi terminal. +Nvim (except in |--headless| mode) guesses a terminal type when it starts. +|$TERM| is the primary hint that determines the terminal type. *terminfo* *E557* *E558* *E559* -On Unix the terminfo database is used. There is no access to the terminfo -settings with |:set|. +The terminfo database is used if available. The Unibilium library (used by Nvim to read terminfo) allows you to override -an out-of-date system terminfo database with one in your $HOME/.terminfo/ -directory, in part or in whole. +the system terminfo with one in $HOME/.terminfo/ directory, in part or in +whole. -Building your own up-to-date terminfo database is usually as simple as running -this as a non-superuser: +Building your own terminfo is usually as simple as running this as +a non-superuser: > - wget http://invisible-island.net/datafiles/current/terminfo.src.gz + curl -LO http://invisible-island.net/datafiles/current/terminfo.src.gz gunzip terminfo.src.gz tic terminfo.src < - *TERM* -If you experience terminal difficulties, first ensure that you have set the -correct terminal type in your $TERM environment variable so that Nvim is -pulling the correct entry from the terminfo database in the first place. + *$TERM* +The $TERM environment variable must match the terminal you are using! +Otherwise Nvim cannot know what sequences your terminal expects, and weird +or sub-optimal behavior will result (scrolling quirks, wrong colors, etc.). -Per the terminfo source file from ncurses: +$TERM is also important because it is mirrored by SSH to the remote session, +unlike other common client-end environment variables ($COLORTERM, +$XTERM_VERSION, $VTE_VERSION, $KONSOLE_PROFILE_NAME, $TERM_PROGRAM, ...). - For these terminals Set $TERM to |builtin-terms|? + For this terminal Set $TERM to |builtin-terms|? iTerm.app "iterm" or "iTerm.app" Y anything libvte based "vte" or "vte-256color" Y - (e.g. GNOME Terminal) ("gnome" and "gnome-256color" are - available as aliases for these) + (e.g. GNOME Terminal) (aliases: "gnome", "gnome-256color") tmux "tmux" or "tmux-256color" Y screen "screen" or "screen-256color" Y PuTTY "putty" or "putty-256color" Y Terminal.app "nsterm" N Linux virtual terminal "linux" or "linux-256color" Y -Describing any of these as "xterm" or "xterm-256colour" will not describe the -terminal correctly to Nvim, and will cause various kinds of problematic -behaviours. - -Setting your $TERM environment variable to the correct value also avoids the -problem that SSH does not mirror arbitrary client-end environment variables -such as $COLORTERM, $XTERM_VERSION, $VTE_VERSION, $KONSOLE_PROFILE_NAME, and -$TERM_PROGRAM to the server end, whereas it does send the $TERM environment -variable. - -See |terminfo| for dealing with out of date terminfo databases. - *builtin-terms* *builtin_terms* If a |terminfo| database is not available, or no entry for the terminal type is -found in that database, Nvim will look up the terminal type in a compiled-in -mini-database of terminfo entries for "xterm", "putty", "screen", "tmux", -"rxvt", "iterm", "interix", "linux", "st", "vte", "gnome", and "ansi". +found in that database, Nvim will use a compiled-in mini-database of terminfo +entries for "xterm", "putty", "screen", "tmux", "rxvt", "iterm", "interix", +"linux", "st", "vte", "gnome", and "ansi". The lookup matches the initial portion of the terminal type, so (for example) "putty-256color" and "putty" will both be mapped to the built-in "putty" @@ -87,8 +73,8 @@ supplying an external one with entries for the terminal type. Settings depending on terminal *term-dependent-settings* -If you want to set options or mappings, depending on the terminal name, you -can do this best in your init.vim. Example: > +If you want to set terminal-dependent options or mappings, you can do this in +your init.vim. Example: > if $TERM =~ '^\(rxvt\|screen\|interix\|putty\)\(-.*\)\?$' set notermguicolors @@ -127,62 +113,49 @@ variable, set by genuine Xterm, that it looks for is not automatically replicated over an SSH login session. *256-color* *terminfo-colors* *termcap-colors* -Nvim can make use of 256-colour terminals and tries to do so whereever it can. +Nvim uses 256 colours by default, ignoring |terminfo| for most terminal types, +including "linux" (whose virtual terminals have had 256-colour support since +4.8) and anything claiming to be "xterm". Also when $COLORTERM or $TERM +contain the string "256". -If the |terminfo| description of the terminal says that it supports fewer -colours, Nvim will override this for many terminal types, including "linux" -(whose virtual terminals have had 256-colour support since version 4.8) and -anything (even if falsely) claiming to be "xterm". It will also set 256 -colours when the COLORTERM or TERM environment variables contain the string -"256" somewhere. - -Nvim similarly assumes that any terminal emulator that sets the COLORTERM -environment variable at all, to anything, is capable of at least 16-colour -operation; and it will override |terminfo| saying that it has fewer colours -available. +Nvim similarly assumes that any terminal emulator that sets $COLORTERM to any +value, is capable of at least 16-colour operation. *true-color* *xterm-true-color* -Nvim supports using true (24-bit) colours in the terminal, on terminals that -support it. It uses the same |terminfo| extensions that were proposed by -Rüdiger Sonderfeld in 2013 for this: "setrgbf" and "setrgbb". If your -terminfo definition specifies these, then nothing more is required. - -If your terminfo definition is missing them, then Nvim will decide whether to -add them to your terminfo definition, using the ISO 8613-6:1994/ITU T.416:1993 -control sequences for setting RGB colours, but modified to use semicolons -instead of colons unless the terminal is known to follow the standard. -(Semicolons cause ambiguities that the standard avoided by specifying colons -as a sub-parameter delimiter. A historical misunderstanding meant that many -terminal emulators ended up using semicolons for many years, though.) - -A new convention, pioneered in 2016 by tmux, is the "Tc" terminfo extension. -If your terminal's terminfo definition has this flag, Nvim will add -constructed "setrgbf" and "setrgbb" capabilities as if they had been in the -terminfo definition. - -If your terminal's terminfo definition does not (yet) have this flag, Nvim -will fall back to looking at the TERM and other environment variables. It -will add constructed "setrgbf" and "setrgbb" capabilities in the case of the -the "rxvt", "linux", "st", "tmux", and "iterm" terminal types, or when -Konsole, genuine Xterm, a libvte terminal emulator version 0.36 or later, or a -terminal emulator that sets the COLORTERM environment variable to "truecolor" -is detected. +Nvim emits true (24-bit) colours in the terminal, if 'termguicolors' is set. + +It uses the "setrgbf" and "setrgbb" |terminfo| extensions (proposed by Rüdiger +Sonderfeld in 2013). If your terminfo definition is missing them, then Nvim +will decide whether to add them to your terminfo definition, using the ISO +8613-6:1994/ITU T.416:1993 control sequences for setting RGB colours (but +modified to use semicolons instead of colons unless the terminal is known to +follow the standard). + +Another convention, pioneered in 2016 by tmux, is the "Tc" terminfo extension. +If terminfo has this flag, Nvim will add constructed "setrgbf" and "setrgbb" +capabilities as if they had been in the terminfo definition. + +If terminfo does not (yet) have this flag, Nvim will fall back to $TERM and +other environment variables. It will add constructed "setrgbf" and "setrgbb" +capabilities in the case of the the "rxvt", "linux", "st", "tmux", and "iterm" +terminal types, or when Konsole, genuine Xterm, a libvte terminal emulator +version 0.36 or later, or a terminal emulator that sets the COLORTERM +environment variable to "truecolor" is detected. *xterm-resize* Nvim can resize the terminal display on some terminals that implement an -extension pioneered by the dtterm program. |terminfo| does not have a flag -for this extension. So Nvim simply assumes that (all) "dtterm", "xterm", -"teraterm", "rxvt" terminal types, and Konsole, are capable of this. +extension pioneered by dtterm. |terminfo| does not have a flag for this +extension. So Nvim simply assumes that (all) "dtterm", "xterm", "teraterm", +"rxvt" terminal types, and Konsole, are capable of this. - *cursor-shape* *terminfo-cursor-shape* *termcap-cursor-shape* + *tui-cursor-shape* Nvim will adjust the shape of the cursor from a block to a line when in insert mode (or as specified by the 'guicursor' option), on terminals that support it. It uses the same |terminfo| extensions that were pioneered by tmux for -this: "Ss" and "Se". If your terminfo definition specifies these, as some -(such as those based upon "xterm+tmux") do, then nothing more is required. +this: "Ss" and "Se". If your terminfo definition is missing them, then Nvim will decide whether to -add them to your terminfo definition, by looking at the TERM and other +add them to your terminfo definition, by looking at $TERM and other environment variables. For the "rxvt", "putty", "linux", "screen", "teraterm", and "iterm" terminal types, or when Konsole, a libvte-based terminal emulator, or genuine Xterm are detected, it will add constructed @@ -195,19 +168,14 @@ receives from Nvim into whatever control sequence is appropriate for the terminal that it is outputting to. It shares a common mechanism with Nvim, of using the "Ss" and "Se" capabilities from terminfo (for the output terminal) if they are present. Unlike Nvim, if they are not present in terminfo you -will have to add them by setting the tmux "terminal-overrides" setting in -$HOME/.tmux.conf . +must add them by setting "terminal-overrides" in ~/.tmux.conf . See the tmux(1) manual page for the details of how and what to do in the tmux configuration file. It will look something like: > - - set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' + set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' <or (alas!) for Konsole specifically, something more complex like: > - set -ga terminal-overrides \ - 'xterm*:\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%{1}%;%d\007' -<but these are only rough examples that do not include all of the other stuff -that occurs in that setting. - + set -ga terminal-overrides 'xterm*:\E]50;CursorShape=%?%p1%{3}%<%t%{0}%e%{1}%;%d\007' +< *cs7-problem* Note: If the terminal settings are changed after running Vim, you might have an illegal combination of settings. This has been reported on Solaris 2.5 diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 42f273588a..9e063b1c04 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -79,8 +79,8 @@ Working intuitively and consistently is a major goal of Nvim. Examples: avoids features that cannot be provided on all platforms--instead that is delegated to external plugins/extensions. -- Test-only globals and functions such as test_autochdir(), test_settime(), - etc., are not exposed (because they don't exist). +- Vim's internal test functions (test_autochdir(), test_settime(), etc.) are + not exposed (nor implemented); instead Nvim has a robust API. ARCHITECTURE ~ @@ -89,6 +89,9 @@ stability and allows those plugins to work without blocking the editor. Even "legacy" Python and Ruby plugins which use the old Vim interfaces (|if_py| and |if_ruby|) run out-of-process. +Platform and I/O facilities are built upon libuv. Nvim benefits from libuv +features and bug fixes, and other projects benefit from improvements to libuv +by Nvim developers. FEATURES ~ @@ -126,6 +129,7 @@ Commands: Functions: |dictwatcheradd()| notifies a callback whenever a |Dict| is modified |dictwatcherdel()| + |menu_get()| |msgpackdump()|, |msgpackparse()| provide msgpack de/serialization Events: |