From af53a0c0123338575dd59934449d7fe836835d1c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 17 Nov 2019 19:06:59 -0800 Subject: doc: Lua [ci skip] #11378 - Rework :help lua-commands - Rename if_lua.txt => lua.txt --- runtime/doc/vim_diff.txt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 45a94bb961..4267aefbbf 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -296,7 +296,7 @@ coerced to strings. See |id()| for more details, currently it uses |c_CTRL-R| pasting a non-special register into |cmdline| omits the last . -Lua interface (|if_lua.txt|): +Lua interface (|lua.txt|): - `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim that prints `a` and `b` on separate lines, exactly like @@ -307,15 +307,15 @@ Lua interface (|if_lua.txt|): - Lua package.path and package.cpath are automatically updated according to 'runtimepath': |lua-require|. -|input()| and |inputdialog()| support for each other’s features (return on -cancel and completion respectively) via dictionary argument (replaces all -other arguments if used). - -|input()| and |inputdialog()| support user-defined cmdline highlighting. - Commands: |:doautocmd| does not warn about "No matching autocommands". +Functions: + |input()| and |inputdialog()| support for each other’s features (return on + cancel and completion respectively) via dictionary argument (replaces all + other arguments if used). + |input()| and |inputdialog()| support user-defined cmdline highlighting. + Highlight groups: |hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other groups @@ -399,10 +399,10 @@ VimL (Vim script) compatibility: Some legacy Vim features are not implemented: -- |if_py|: *python-bindeval* *python-Function* are not supported -- |if_lua|: the `vim` object is missing some legacy methods -- *if_perl* +- |if_lua|: Nvim Lua API is not compatible with Vim's "if_lua" - *if_mzscheme* +- *if_perl* +- |if_py|: *python-bindeval* *python-Function* are not supported - *if_tcl* ============================================================================== @@ -524,4 +524,4 @@ TUI: always uses 7-bit control sequences. ============================================================================== - vim:tw=78:ts=8:sw=2:noet:ft=help:norl: + vim:tw=78:ts=8:sw=2:et:ft=help:norl: -- cgit From 3beef8ee1ca9699d75b8877ec9b77493b58b0ed4 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 1 Oct 2019 23:14:00 +0900 Subject: defaults: set nostartofline Having the cursor change column can be surprising. Force startofline in functional and old tests. Remove the functional breakindent test, as it's a subset of the oldtest one. --- runtime/doc/vim_diff.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 4267aefbbf..3646034dba 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -55,6 +55,7 @@ the differences. - 'showcmd' is enabled - 'sidescroll' defaults to 1 - 'smarttab' is enabled +- 'startofline' is disabled - 'tabpagemax' defaults to 50 - 'tags' defaults to "./tags;,tags" - 'ttimeoutlen' defaults to 50 -- cgit From 7111fe94597339e165307220ea62d478b8aaea32 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 10 Dec 2019 00:29:39 -0800 Subject: doc: LSP [ci skip] #11524 --- runtime/doc/vim_diff.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 3646034dba..9c106077ab 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -169,6 +169,7 @@ Functions: |system()|, |systemlist()| can run {cmd} directly (without 'shell') Highlight groups: + |highlight-blend| controls blend level for a highlight group |expr-highlight| highlight groups (prefixed with "Nvim") |hl-NormalFloat| highlights floating window |hl-NormalNC| highlights non-current windows @@ -207,6 +208,7 @@ Options: 'statusline' supports unlimited alignment sections 'tabline' %@Func@foo%X can call any function on mouse-click 'wildoptions' `pum` flag to use popupmenu for wildmode completion + 'winblend' pseudo-transparency in floating windows |api-floatwin| 'winhighlight' window-local highlights Signs: -- cgit From 39094b3faedde9601160806901941e4808925410 Mon Sep 17 00:00:00 2001 From: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com> Date: Tue, 10 Dec 2019 00:56:56 -0800 Subject: jumplist: browser-style (or 'tagstack') navigation #11530 Traditionally, when navigating to a specific location from the middle of the jumplist results in shifting the current location to the bottom of the list and adding the new location after it. This behavior is not desireable to all users--see, for example https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior. Here, another jumplist behavior is introduced. When jumpoptions (a new option set added here) includes stack, the jumplist behaves like the tagstack or like history in a web browser. That is, when navigating to a location from the middle of the jumplist 2 first 1 second 0 third <-- current location 1 fourth 2 fifth to a new location the locations after the current location in the jump list are discarded 2 first 1 second 0 third <-- current location The result is that when moving forward from that location, the new location will be appended to the jumplist: 3 first 2 second 1 third 0 new If the new location is the same new == second as some previous (but not immediately prior) entry in the jumplist, 2 first 1 second 0 third <-- current location 1 fourth 2 fifth both occurrences preserved 3 first 2 second 1 third 0 second (new) when moving forward from that location. It would be desireable to go farther and, when the new location is the same as the location that is currently next in the jumplist, new == fourth make the result of navigating to the new location by jumping (e.g. 50gg) be the same as moving forward in the jumplist 2 first 1 second 0 third 1 new <-- current location 2 fifth and simply increment the jumplist index. That change is NOT part of this patch because it would require passing the new cursor location to the function (setpcmark) from all of its callees. That in turn would require those callees to know *before* calling what the new cursor location is, which do they do not currently. --- runtime/doc/vim_diff.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 9c106077ab..64b5830575 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -336,6 +336,11 @@ Macro/|recording| behavior Motion: The |jumplist| avoids useless/phantom jumps. + When the new option |jumpoptions| includes 'stack', the jumplist behaves + like the tagstack or history in a web browser--jumping from the middle of + the jumplist discards the locations after the jumped-from position + (|jumplist-stack|). + Normal commands: |Q| is the same as |gQ| -- cgit From 93e7c7e3bd30ae141b613e71a6a3a863e6064d91 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 10 Dec 2019 01:24:20 -0800 Subject: doc [ci skip] --- runtime/doc/vim_diff.txt | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 64b5830575..e19659a4c4 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -195,20 +195,20 @@ Normal commands: "Outline": Type |gO| in |:Man| and |:help| pages to see a document outline. Options: - 'cpoptions' flags: |cpo-_| - 'display' flag `msgsep` to minimize scrolling when showing messages - 'guicursor' works in the terminal - 'fillchars' local to window. flags: `msgsep` (see 'display' above) and `eob` - for |hl-EndOfBuffer| marker - 'inccommand' shows interactive results for |:substitute|-like commands - 'listchars' local to window - 'pumblend' pseudo-transparent popupmenu + 'cpoptions' flags: |cpo-_| + 'display' flags: "msgsep" minimizes scrolling when showing messages + 'guicursor' works in the terminal + 'fillchars' flags: "msgsep" (see 'display'), "eob" for |hl-EndOfBuffer| + marker, "foldopen", "foldsep", "foldclose" + 'inccommand' shows interactive results for |:substitute|-like commands + 'listchars' local to window + 'pumblend' pseudo-transparent popupmenu 'scrollback' - 'signcolumn' supports up to 9 dynamic/fixed columns - 'statusline' supports unlimited alignment sections - 'tabline' %@Func@foo%X can call any function on mouse-click - 'wildoptions' `pum` flag to use popupmenu for wildmode completion - 'winblend' pseudo-transparency in floating windows |api-floatwin| + 'signcolumn' supports up to 9 dynamic/fixed columns + 'statusline' supports unlimited alignment sections + 'tabline' %@Func@foo%X can call any function on mouse-click + 'wildoptions' "pum" flag to use popupmenu for wildmode completion + 'winblend' pseudo-transparency in floating windows |api-floatwin| 'winhighlight' window-local highlights Signs: @@ -336,16 +336,12 @@ Macro/|recording| behavior Motion: The |jumplist| avoids useless/phantom jumps. - When the new option |jumpoptions| includes 'stack', the jumplist behaves - like the tagstack or history in a web browser--jumping from the middle of - the jumplist discards the locations after the jumped-from position - (|jumplist-stack|). - Normal commands: |Q| is the same as |gQ| Options: 'ttimeout', 'ttimeoutlen' behavior was simplified + |jumpoptions| "stack" behavior Shell: Shell output (|:!|, |:make|, …) is always routed through the UI, so it -- cgit From 05ea3c1997a5f8c1c28192cb67a1306485c11b9a Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 12 Jan 2020 01:36:11 +0100 Subject: defaults: set fillchars "foldsep" to box line #11702 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "│" U+2502 BOX DRAWINGS LIGHT VERTICAL Fallback to old default | if 'ambiwidth' is set. --- runtime/doc/vim_diff.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index e19659a4c4..c988756154 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -38,7 +38,7 @@ the differences. - 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created - 'display' defaults to "lastline,msgsep" - 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding) -- 'fillchars' defaults (in effect) to "vert:│,fold:·" +- 'fillchars' defaults (in effect) to "vert:│,fold:·,sep:│" - 'formatoptions' defaults to "tcqj" - 'fsync' is disabled - 'history' defaults to 10000 (the maximum) -- cgit From 92316849863bb2661ee5b4bb284f56163fed27ad Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 12 Jan 2020 23:41:55 -0800 Subject: doc [ci skip] #11656 --- runtime/doc/vim_diff.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index c988756154..2bb798a6e6 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -270,11 +270,6 @@ are always available and may be used simultaneously. See |provider-python|. |json_encode()| behaviour slightly changed: now |msgpack-special-dict| values are accepted, but |v:none| is not. -*v:none* variable is absent. In Vim it represents “no value” in “js” strings -like "[,]" parsed as "[v:none]" by |js_decode()|. - -*js_encode()* and *js_decode()* functions are also absent. - Viminfo text files were replaced with binary (messagepack) ShaDa files. Additional differences: @@ -443,6 +438,11 @@ Compile-time features: Emacs tags support X11 integration (see |x11-selection|) +Eval: + *js_encode()* + *js_decode()* + *v:none* (used by Vim to represent JavaScript "undefined"); use |v:null| instead. + Highlight groups: *hl-StatusLineTerm* *hl-StatusLineTermNC* are unnecessary because Nvim supports 'winhighlight' window-local highlights. -- cgit From 757aad92e84709a08320a06870b6acb086bc6876 Mon Sep 17 00:00:00 2001 From: Marcos ALMEIDA Date: Sat, 29 Sep 2018 20:40:53 +0200 Subject: autocmd: add WinClosed event - only fire once, just before freeing mem - trigger when on a different buffer - avoid recursive calls in another tab --- runtime/doc/vim_diff.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 2bb798a6e6..5835c7f314 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -159,6 +159,7 @@ Events: |UILeave| |VimResume| |VimSuspend| + |WinClosed| Functions: |dictwatcheradd()| notifies a callback whenever a |Dict| is modified -- cgit From 6f261d23942feb22e5aa2881bc645bce5c5ce946 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 1 Mar 2020 16:43:18 +0100 Subject: updating doc --- runtime/doc/vim_diff.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 5835c7f314..376375e4ef 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -201,6 +201,7 @@ Options: 'guicursor' works in the terminal 'fillchars' flags: "msgsep" (see 'display'), "eob" for |hl-EndOfBuffer| marker, "foldopen", "foldsep", "foldclose" + 'foldcolumn' supports up to 9 dynamic/fixed columns 'inccommand' shows interactive results for |:substitute|-like commands 'listchars' local to window 'pumblend' pseudo-transparent popupmenu -- cgit From f2894bffb024b712e69158d7914e9d9d3d495f72 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 18 May 2020 15:49:50 +0200 Subject: lua: Add highlight.on_yank (#12279) * add lua function to highlight yanked region * extract namespace, better naming, default values * add default for event argument * free timer * factor out mark to position calculation * d'oh * make sure timer stops before callback (cf. luv example) * factor out timer, more documentation * fixup * validate function argument for schedule * fix block selection past eol * correct handling of multibyte characters * move arguments around, some cleanup * move utility functions to vim.lua * use anonymous namespaces, avoid local api * rename function * add test for schedule_fn * fix indent * turn hl-yank into proper (hightlight) module * factor out position-to-region function mark extraction now part of highlight.on_yank * rename schedule_fn to defer_fn * add test for vim.region * todo: handle double-width characters * remove debug printout * do not shadow arguments * defer also callable table * whitespace change * move highlight to vim/highlight.lua * add documentation * add @return documentation * test: add check before vim.defer fires * doc: fixup --- runtime/doc/vim_diff.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/doc/vim_diff.txt') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 376375e4ef..24b562543e 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -116,6 +116,10 @@ backwards-compatibility cost. Some examples: - Directories for 'directory' and 'undodir' are auto-created. - Terminal features such as 'guicursor' are enabled where possible. +Some features are built in that otherwise required external plugins: + +- Highlighting the yanked region, see |lua-highlight|. + ARCHITECTURE ~ External plugins run in separate processes. |remote-plugin| This improves -- cgit