From b4e2860c69a4e96fa305b535ce0dbdde37632fe1 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 29 Jan 2017 05:09:54 +0300 Subject: doc,functests: Add documentation Missing: updates to various lists. --- runtime/doc/if_lua.txt | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 runtime/doc/if_lua.txt (limited to 'runtime') diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt new file mode 100644 index 0000000000..0660ffc73b --- /dev/null +++ b/runtime/doc/if_lua.txt @@ -0,0 +1,173 @@ +*if_lua.txt* For Neovim + + + VIM REFERENCE MANUAL by Luis Carvalho + + +The Lua Interface to Vim *lua* *Lua* + +1. Commands |lua-commands| +2. The vim module |lua-vim| +3. The luaeval function |lua-luaeval| + +============================================================================== +1. Commands *lua-commands* + + *:lua* +:[range]lua {chunk} + Execute Lua chunk {chunk}. {not in Vi} + +Examples: +> + :lua vim.api.nvim_command('echo "Hello, Neovim!"') +< + +:[range]lua << {endmarker} +{script} +{endmarker} + Execute Lua script {script}. {not in Vi} + Note: This command doesn't work when the Lua + feature wasn't compiled in. To avoid errors, see + |script-here|. + +{endmarker} must NOT be preceded by any white space. If {endmarker} is +omitted from after the "<<", a dot '.' must be used after {script}, like +for the |:append| and |:insert| commands. +This form of the |:lua| command is mainly useful for including Lua code +in Vim scripts. + +Example: +> + function! CurrentLineInfo() + lua << EOF + local linenr = vim.api.nvim_win_get_cursor(0)[1] + local curline = vim.api.nvim_buf_get_lines( + 0, linenr, linenr + 1, false)[1] + print(string.format("Current line [%d] has %d bytes", + linenr, #curline)) + EOF + endfunction + +Note that in example variables are prefixed with local: they will disappear +when block finishes. This is not the case for globals. + +To see what version of Lua you have: > + :lua print(_VERSION) + +If you use LuaJIT you can also use this: > + :lua print(jit.version) +< + + *:luado* +:[range]luado {body} Execute Lua function "function (line, linenr) {body} + end" for each line in the [range], with the function + argument being set to the text of each line in turn, + without a trailing , and the current line number. + If the value returned by the function is a string it + becomes the text of the line in the current turn. The + default for [range] is the whole file: "1,$". + {not in Vi} + +Examples: +> + :luado return string.format("%s\t%d", line:reverse(), #line) + + :lua require"lpeg" + :lua -- balanced parenthesis grammar: + :lua bp = lpeg.P{ "(" * ((1 - lpeg.S"()") + lpeg.V(1))^0 * ")" } + :luado if bp:match(line) then return "-->\t" .. line end +< + + *:luafile* +:[range]luafile {file} + Execute Lua script in {file}. {not in Vi} + The whole argument is used as a single file name. + +Examples: +> + :luafile script.lua + :luafile % +< + +All these commands execute a Lua chunk from either the command line (:lua and +:luado) or a file (:luafile) with the given line [range]. Similarly to the Lua +interpreter, each chunk has its own scope and so only global variables are +shared between command calls. All Lua default libraries are available. In +addition, Lua "print" function has its output redirected to the Vim message +area, with arguments separated by a white space instead of a tab. + +Lua uses the "vim" module (see |lua-vim|) to issue commands to Neovim +and manage buffers (|lua-buffer|) and windows (|lua-window|). However, +procedures that alter buffer content, open new buffers, and change cursor +position are restricted when the command is executed in the |sandbox|. + + +============================================================================== +2. The vim module *lua-vim* + +Lua interfaces Vim through the "vim" module. Currently it only has `api` +submodule which is a table with all API functions. Descriptions of these +functions may be found in |api-funcs.txt|. + +============================================================================== +3. The luaeval function *lua-luaeval* *lua-eval* + *luaeval()* + +The (dual) equivalent of "vim.eval" for passing Lua values to Vim is +"luaeval". "luaeval" takes an expression string and an optional argument and +returns the result of the expression. It is semantically equivalent in Lua to: +> + local chunkheader = "local _A = select(1, ...) return " + function luaeval (expstr, arg) + local chunk = assert(loadstring(chunkheader .. expstr, "luaeval")) + return chunk(arg) -- return typval + end + +Note that "_A" receives the argument to "luaeval". Lua nils, numbers, strings, +tables and booleans are converted to their Vim respective types. An error is +thrown if conversion of any of the remaining Lua types is attempted. + +Note 2: lua tables are used as both dictionaries and lists, thus making it +impossible to determine whether empty table is meant to be empty list or empty +dictionary. To distinguish between these cases there is the following +agreement: + +0. Empty table is empty list. +1. Table with N incrementally growing integral numbers, starting from 1 and + ending with N is considered to be a list. +2. Table with string keys, none of which contains NUL byte, is considered to + be a dictionary. +3. Table with string keys, at least one of which contains NUL byte, is also + considered to be a dictionary, but this time it is converted to + a |msgpack-special-map|. +4. Table with `vim.type_idx` key may be a dictionary, a list or floating-point + value: + - `{[vim.type_idx]=vim.types.float, [vim.val_idx]=1}` is converted to + a floating-point 1.0. Note that by default integral lua numbers are + converted to |Number|s, non-integral are converted to |Float|s. This + variant allows integral |Float|s. + - `{[vim.type_idx]=vim.types.dictionary}` is converted to an empty + dictionary, `{[vim.type_idx]=vim.types.dictionary, [42]=1, a=2}` is + converted to a dictionary `{'a': 42}`: non-string keys are ignored. + Without `vim.type_idx` key tables with keys not fitting in 1., 2. or 3. + are errors. + - `{[vim.type_idx]=vim.types.list}` is converted to an empty list. As well + as `{[vim.type_idx]=vim.types.list, [42]=1}`: integral keys that do not + form a 1-step sequence from 1 to N are ignored, as well as all + non-integral keys. + +Examples: > + + :echo luaeval('math.pi') + :function Rand(x,y) " random uniform between x and y + : return luaeval('(_A.y-_A.x)*math.random()+_A.x', {'x':a:x,'y':a:y}) + : endfunction + :echo Rand(1,10) + +Note that currently second argument to `luaeval` undergoes VimL to lua +conversion, so changing resulting containers in lua do not affect values in +VimL. Return value is also always converted. When converting, +|msgpack-special-dict|s are treated specially. + +============================================================================== + vim:tw=78:ts=8:noet:ft=help:norl: -- cgit From 09fe6185b7b2c1f1379ff4add9f3f4da79a7b043 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 29 Jan 2017 20:02:46 +0300 Subject: doc: Enhance documentation --- runtime/doc/eval.txt | 4 ++++ runtime/doc/if_lua.txt | 15 ++++++++------- runtime/doc/index.txt | 3 +++ runtime/doc/usr_41.txt | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 341e65d381..0b5a29080e 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2140,6 +2140,7 @@ lispindent({lnum}) Number Lisp indent for line {lnum} localtime() Number current time log({expr}) Float natural logarithm (base e) of {expr} log10({expr}) Float logarithm of Float {expr} to base 10 +luaeval({expr}[, {expr}]) any evaluate Lua expression map({expr}, {string}) List/Dict change each item in {expr} to {expr} maparg({name}[, {mode} [, {abbr} [, {dict}]]]) String or Dict @@ -5095,6 +5096,9 @@ log10({expr}) *log10()* :echo log10(0.01) < -2.0 +luaeval({expr}[, {expr}]) + Evaluate Lua expression {expr} and return its result converted + to Vim data structures. See |lua-luaeval| for more details. map({expr1}, {expr2}) *map()* {expr1} must be a |List| or a |Dictionary|. diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index 0660ffc73b..932564170d 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -114,8 +114,9 @@ functions may be found in |api-funcs.txt|. *luaeval()* The (dual) equivalent of "vim.eval" for passing Lua values to Vim is -"luaeval". "luaeval" takes an expression string and an optional argument and -returns the result of the expression. It is semantically equivalent in Lua to: +"luaeval". "luaeval" takes an expression string and an optional argument used +for _A inside expression and returns the result of the expression. It is +semantically equivalent in Lua to: > local chunkheader = "local _A = select(1, ...) return " function luaeval (expstr, arg) @@ -129,8 +130,8 @@ thrown if conversion of any of the remaining Lua types is attempted. Note 2: lua tables are used as both dictionaries and lists, thus making it impossible to determine whether empty table is meant to be empty list or empty -dictionary. To distinguish between these cases there is the following -agreement: +dictionary. Additionally lua does not have integer numbers. To distinguish +between these cases there is the following agreement: 0. Empty table is empty list. 1. Table with N incrementally growing integral numbers, starting from 1 and @@ -165,9 +166,9 @@ Examples: > :echo Rand(1,10) Note that currently second argument to `luaeval` undergoes VimL to lua -conversion, so changing resulting containers in lua do not affect values in -VimL. Return value is also always converted. When converting, -|msgpack-special-dict|s are treated specially. +conversion, so changing containers in lua do not affect values in VimL. Return +value is also always converted. When converting, |msgpack-special-dict|s are +treated specially. ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index bab15bcbb6..a1df0a265d 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1339,6 +1339,9 @@ tag command action ~ |:ltag| :lt[ag] jump to tag and add matching tags to the location list |:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode +|:lua| :lua execute Lua command +|:luado| :luad[o] execute Lua command for each line +|:luafile| :luaf[ile] execute Lua script file |:lvimgrep| :lv[imgrep] search for pattern in files |:lvimgrepadd| :lvimgrepa[dd] like :vimgrep, but append to current list |:lwindow| :lw[indow] open or close location window diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 77c238ae97..10d2a8cddd 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -950,6 +950,7 @@ Various: *various-functions* taglist() get list of matching tags tagfiles() get a list of tags files + luaeval() evaluate Lua expression py3eval() evaluate Python expression (|+python3|) pyeval() evaluate Python expression (|+python|) -- cgit From 279e3410cf503a89d58d63b12032205c877707bc Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 29 Jan 2017 22:07:24 +0300 Subject: doc: Update vim_diff.txt --- runtime/doc/vim_diff.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 11dde27868..6d4bd984a9 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -245,6 +245,17 @@ 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 print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim + that prints `a` and `b` on separate lines, exactly like + `:lua print("a\nb")` . +- `:lua error('TEST')` will print “TEST” as the error in Vim and “E5105: Error + while calling lua chunk: [string ""]:1: TEST” in + Neovim. +- Lua has direct access to Neovim api via `vim.api`. +- Currently most of features are missing. + ============================================================================== 5. Missing legacy features *nvim-features-missing* *if_lua* *if_perl* *if_mzscheme* *if_tcl* -- cgit From ebad04622056b0cb88e2b25211746b57fb4ef3c2 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 29 Jan 2017 22:11:31 +0300 Subject: doc: Update vim_diff data regarding ShaDa --- runtime/doc/vim_diff.txt | 7 ------- 1 file changed, 7 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 6d4bd984a9..31bf098ba5 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -219,22 +219,15 @@ Additional differences: - |shada-c| has no effect. - |shada-s| now limits size of every item and not just registers. -- When reading ShaDa files items are merged according to the timestamp. - |shada-merging| - 'viminfo' option got renamed to 'shada'. Old option is kept as an alias for compatibility reasons. - |:wviminfo| was renamed to |:wshada|, |:rviminfo| to |:rshada|. Old commands are still kept. -- When writing (|:wshada| without bang or at exit) it merges much more data, - and does this according to the timestamp. Vim merges only marks. - |shada-merging| - ShaDa file format was designed with forward and backward compatibility in mind. |shada-compatibility| - Some errors make ShaDa code keep temporary file in-place for user to decide what to do with it. Vim deletes temporary file in these cases. |shada-error-handling| -- Vim keeps no timestamps at all, neither in viminfo file nor in the instance - itself. - ShaDa file keeps search direction (|v:searchforward|), viminfo does not. |printf()| returns something meaningful when used with `%p` argument: in Vim -- cgit From a0acb2e19521298b3d80aa1cfaaef5f476218e01 Mon Sep 17 00:00:00 2001 From: Drew Neil Date: Tue, 25 Apr 2017 10:04:32 +0100 Subject: doc: Revise nvim-from-vim advice (#6505) --- runtime/doc/nvim.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/nvim.txt b/runtime/doc/nvim.txt index bd483e9949..8dd329cee6 100644 --- a/runtime/doc/nvim.txt +++ b/runtime/doc/nvim.txt @@ -16,11 +16,11 @@ differences from Vim. ============================================================================== Transitioning from Vim *nvim-from-vim* -To start the transition, link your previous configuration so Nvim can use it: +To start the transition, create `~/.config/nvim/init.vim` with these contents: > - mkdir ~/.config - ln -s ~/.vim ~/.config/nvim - ln -s ~/.vimrc ~/.config/nvim/init.vim + set runtimepath+=~/.vim,~/.vim/after + set packpath+=~/.vim + source ~/.vimrc < Note: If your system sets `$XDG_CONFIG_HOME`, use that instead of `~/.config` in the code above. Nvim follows the XDG |base-directories| convention. -- cgit From 88023d51238698dd625c26300142d3dbe5770b73 Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Fri, 24 Feb 2017 09:35:27 +0000 Subject: api/ui: externalize tabline --- runtime/doc/msgpack_rpc.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index 77cbc2f3d8..c550631a32 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -266,7 +266,11 @@ a dictionary with these (optional) keys: most 256 different colors). `popupmenu_external` Instead of drawing the completion popupmenu on the grid, Nvim will send higher-level events to - the ui and let it draw the popupmenu. + the UI and let it draw the popupmenu. + Defaults to false. + `tabline_external` Instead of drawing the tabline on the grid, + Nvim will send higher-level events to + the UI and let it draw the tabline. Defaults to false. Nvim will then send msgpack-rpc notifications, with the method name "redraw" @@ -436,5 +440,10 @@ states might be represented as separate modes. ["popupmenu_hide"] The popupmenu is hidden. +["tabline_update", curtab, tabs] + Nvim will send this event when drawing tabline. curtab is the tab id + of the current tab. tabs is an arrays of the form: + [tabid, { "name": name }] + ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: -- cgit From 00843902d3472ac4e74106fc06fa60e599914496 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 25 Apr 2017 02:17:15 +0200 Subject: api/ui: externalize tabline - Work with a bool[] array parallel to the UIWidget enum. - Rename some functions. - Documentation. --- runtime/doc/msgpack_rpc.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index c550631a32..7adc4ca2e9 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -251,9 +251,9 @@ connect to another with different type codes. 6. Remote UIs *rpc-remote-ui* GUIs can be implemented as external processes communicating with Nvim over the -RPC API. Currently the UI model consists of a terminal-like grid with one -single, monospace font size. Some elements (UI "widgets") can be drawn -separately from the grid. +RPC API. The UI model consists of a terminal-like grid with a single, +monospace font size. Some elements (UI "widgets") can be drawn separately from +the grid ("externalized"). After connecting to Nvim (usually a spawned, embedded instance) use the |nvim_ui_attach| API method to tell Nvim that your program wants to draw the @@ -264,14 +264,13 @@ a dictionary with these (optional) keys: colors. Set to false to use terminal color codes (at most 256 different colors). - `popupmenu_external` Instead of drawing the completion popupmenu on - the grid, Nvim will send higher-level events to - the UI and let it draw the popupmenu. - Defaults to false. - `tabline_external` Instead of drawing the tabline on the grid, - Nvim will send higher-level events to - the UI and let it draw the tabline. - Defaults to false. + `ui_ext` String array of "externalized" widgets. + Widgets in this list will not be drawn by + Nvim; only high-level data will be published + in new UI event kinds. Valid names: + popupmenu |ui-ext-popupmenu| + tabline |ui-ext-tabline| + Defaults to empty. Nvim will then send msgpack-rpc notifications, with the method name "redraw" and a single argument, an array of screen updates (described below). These @@ -421,6 +420,7 @@ properties specified in the corresponding item. The set of modes reported will change in new versions of Nvim, for instance more submodes and temporary states might be represented as separate modes. + *ui-ext-popupmenu* ["popupmenu_show", items, selected, row, col] When `popupmenu_external` is set to true, nvim will not draw the popupmenu on the grid, instead when the popupmenu is to be displayed @@ -440,9 +440,10 @@ states might be represented as separate modes. ["popupmenu_hide"] The popupmenu is hidden. + *ui-ext-tabline* ["tabline_update", curtab, tabs] Nvim will send this event when drawing tabline. curtab is the tab id - of the current tab. tabs is an arrays of the form: + of the current tab. tabs is an array of the form: [tabid, { "name": name }] ============================================================================== -- cgit From c8e1af93de90b2e23579f726fd4aa6a65f9387b6 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 25 Apr 2017 10:14:29 +0200 Subject: api: nvim_ui_attach(): Flatten ext_* options. --- runtime/doc/msgpack_rpc.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index 7adc4ca2e9..da9b2360e3 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -264,13 +264,11 @@ a dictionary with these (optional) keys: colors. Set to false to use terminal color codes (at most 256 different colors). - `ui_ext` String array of "externalized" widgets. - Widgets in this list will not be drawn by + `ext_popupmenu` Externalize the popupmenu. |ui-ext-popupmenu| + `ext_tabline` Externalize the tabline. |ui-ext-tabline| + Externalized widgets will not be drawn by Nvim; only high-level data will be published - in new UI event kinds. Valid names: - popupmenu |ui-ext-popupmenu| - tabline |ui-ext-tabline| - Defaults to empty. + in new UI event kinds. Nvim will then send msgpack-rpc notifications, with the method name "redraw" and a single argument, an array of screen updates (described below). These -- cgit From 6944abad2f3f443027af1966a2a310034d2179b2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 25 Apr 2017 11:13:29 +0200 Subject: api/ext_tabline: List of Dicts. --- runtime/doc/msgpack_rpc.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index da9b2360e3..261e68cfb1 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -440,9 +440,10 @@ states might be represented as separate modes. *ui-ext-tabline* ["tabline_update", curtab, tabs] - Nvim will send this event when drawing tabline. curtab is the tab id - of the current tab. tabs is an array of the form: - [tabid, { "name": name }] + Tabline was updated. UIs should present this data in a custom tabline + widget. + curtab: Current Tabpage + tabs: List of Dicts [{ "tab": Tabpage, "name": String }, ...] ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: -- cgit From 3ea10077534cb1dcb1597ffcf85e601fa0c0e27b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 13 Mar 2017 15:02:37 +0100 Subject: api: nvim_get_mode() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Asynchronous API functions are served immediately, which means pending input could change the state of Nvim shortly after an async API function result is returned. nvim_get_mode() is different: - If RPCs are known to be blocked, it responds immediately (without flushing the input/event queue) - else it is handled just-in-time before waiting for input, after pending input was processed. This makes the result more reliable (but not perfect). Internally this is handled as a special case, but _semantically_ nothing has changed: API users never know when input flushes, so this internal special-case doesn't violate that. As far as API users are concerned, nvim_get_mode() is just another asynchronous API function. In all cases nvim_get_mode() never blocks for more than the time it takes to flush the input/event queue (~µs). Note: This doesn't address #6166; nvim_get_mode() will provoke #6166 if e.g. `d` is operator-pending. Closes #6159 --- runtime/doc/help.txt | 5 ----- runtime/doc/intro.txt | 5 ----- runtime/doc/message.txt | 4 ---- 3 files changed, 14 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index f71f46bad3..3837cf3e26 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -154,22 +154,17 @@ Interfaces ~ |if_cscop.txt| using Cscope with Vim |if_pyth.txt| Python interface |if_ruby.txt| Ruby interface -|debugger.txt| Interface with a debugger |sign.txt| debugging signs Versions ~ |vim_diff.txt| Main differences between Nvim and Vim |vi_diff.txt| Main differences between Vim and Vi - *sys-file-list* -Remarks about specific systems ~ -|os_win32.txt| MS-Windows *standard-plugin-list* Standard plugins ~ |pi_gzip.txt| Reading and writing compressed files |pi_netrw.txt| Reading and writing files over a network |pi_paren.txt| Highlight matching parens |pi_tar.txt| Tar file explorer -|pi_vimball.txt| Create a self-installing Vim script |pi_zip.txt| Zip archive explorer LOCAL ADDITIONS: *local-additions* diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index a5f9106bb0..bc34b69508 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -34,11 +34,6 @@ It can be accessed from within Vim with the or key and with the is not located in the default place. You can jump to subjects like with tags: Use CTRL-] to jump to a subject under the cursor, use CTRL-T to jump back. -This manual refers to Vim on various machines. There may be small differences -between different computers and terminals. Besides the remarks given in this -document, there is a separate document for each supported system, see -|sys-file-list|. - *pronounce* Vim is pronounced as one word, like Jim, not vi-ai-em. It's written with a capital, since it's a name, again like Jim. diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index d0bdba41ab..5c2dddc8b3 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -40,10 +40,6 @@ Note: If the output has been stopped with "q" at the more prompt, it will only be displayed up to this point. The previous command output is cleared when another command produces output. -If you are using translated messages, the first printed line tells who -maintains the messages or the translations. You can use this to contact the -maintainer when you spot a mistake. - If you want to find help on a specific (error) message, use the ID at the start of the message. For example, to get help on the message: > -- cgit From 409e56b1392c431a36c0a48cac58d6df3cf424d7 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 20:42:06 +0200 Subject: vim-patch:818078ddfbb8 Updated runtime files and translations. https://github.com/vim/vim/commit/818078ddfbb8cc2546f697c5675a251d095722ec --- runtime/doc/index.txt | 4 ++-- runtime/doc/map.txt | 7 +++++++ runtime/doc/starting.txt | 3 +++ runtime/doc/various.txt | 25 +++++++++++++++++++++++++ runtime/syntax/sh.vim | 6 +++--- 5 files changed, 40 insertions(+), 5 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 0dc8fff975..7267a45d41 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -982,7 +982,7 @@ tag command action in Command-line editing mode ~ |c_CTRL-E| CTRL-E cursor to end of command-line |'cedit'| CTRL-F default value for 'cedit': opens the command-line window; otherwise not used - CTRL-G not used +|c_CTRL-G| CTRL-G next match when 'incsearch' is active |c_| delete the character in front of the cursor |c_digraph| {char1} {char2} enter digraph when 'digraph' is on @@ -1015,7 +1015,7 @@ tag command action in Command-line editing mode ~ insert the contents of a register or object under the cursor literally CTRL-S (used for terminal control flow) - CTRL-T not used +|c_CTRL-T| CTRL-T previous match when 'incsearch' is active |c_CTRL-U| CTRL-U remove all characters |c_CTRL-V| CTRL-V insert next non-digit literally, insert three digit decimal number as a single byte. diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 3ba1ce1f17..25bd2d18ee 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -437,6 +437,9 @@ with a space. Note: When using mappings for Visual mode, you can use the "'<" mark, which is the start of the last selected Visual area in the current buffer |'<|. +The |:filter| command can be used to select what mappings to list. The +pattern is matched against the {lhs} and {rhs} in the raw form. + *:map-verbose* When 'verbose' is non-zero, listing a key map will also display where it was last defined. Example: > @@ -1136,6 +1139,10 @@ scripts. " Command has the -register attribute b Command is local to current buffer (see below for details on attributes) + The list can be filtered on command name with + |:filter|, e.g., to list all commands with "Pyth" in + the name: > + filter Pyth command :com[mand] {cmd} List the user-defined commands that start with {cmd} diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 14e8c5d76f..c93c3d0741 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1184,6 +1184,9 @@ running) you have additional options: file. This list is read on startup and only changes afterwards with ":rshada!". Also see |v:oldfiles|. The number can be used with |c_#<|. + The output can be filtered with |:filter|, e.g.: > + filter /\.vim/ oldfiles +< The filtering happens on the file name. :bro[wse] o[ldfiles][!] List file names as with |:oldfiles|, and then prompt diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index fd81064d5b..cee13c9ee8 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -85,6 +85,8 @@ g8 Print the hex values of the bytes used in the on paper see |:hardcopy|. In the GUI you can use the File.Print menu entry. See |ex-flags| for [flags]. + The |:filter| command can be used to only show lines + matching a pattern. :[range]p[rint] {count} [flags] Print {count} lines, starting with [range] (default @@ -461,6 +463,29 @@ m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support| :redi[r] END End redirecting messages. + *:filt* *:filter* +:filt[er][!] {pat} {command} +:filt[er][!] /{pat}/ {command} + Restrict the output of {command} to lines matching + with {pat}. For example, to list only xml files: > + :filter /\.xml$/ oldfiles +< If the [!] is given, restrict the output of {command} + to lines that do NOT match {pat}. + + {pat} is a Vim search pattern. Instead of enclosing + it in / any non-ID character (see |'isident'|) can be + used, so long as it does not appear in {pat}. Without + the enclosing character the pattern cannot include the + bar character. + + The pattern is matched against the relevant part of + the output, not necessarily the whole line. Only some + commands support filtering, try it out to check if it + works. + + Only normal messages are filtered, error messages are + not. + *:sil* *:silent* *:silent!* :sil[ent][!] {command} Execute {command} silently. Normal messages will not be given or added to the message history. diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 2fe13fbde6..ef90ebea22 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell " Previous Maintainer: Lennart Schultz -" Last Change: Aug 23, 2016 -" Version: 161 +" Last Change: Aug 26, 2016 +" Version: 162 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) @@ -500,7 +500,7 @@ syn match shDerefString contained "\\["']" nextgroup=shDerefPattern if exists("b:is_bash") " bash : ${parameter:offset} " bash : ${parameter:offset:length} - syn region shDerefOff contained start=':' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple + syn region shDerefOff contained start=':\ze[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple -- cgit From f09651ea78b833d6d05db89c41df603b741ab000 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 21:01:49 +0200 Subject: vim-patch:36f44c21da2e Updated runtime files. https://github.com/vim/vim/commit/36f44c21da2e912c008683a0c4447fca2a071e9a --- runtime/doc/eval.txt | 4 +++- runtime/doc/options.txt | 13 ++++++++---- runtime/doc/starting.txt | 2 +- runtime/synmenu.vim | 52 +++++++++++++++++++++++------------------------- 4 files changed, 38 insertions(+), 33 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 107dd28ecd..90575e3438 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -3044,6 +3044,8 @@ delete({fname} [, {flags}]) *delete()* When {flags} is "rf": Deletes the directory by the name {fname} and everything in it, recursively. BE CAREFUL! + Note: on MS-Windows it is not possible to delete a directory + that is being used. The result is a Number, which is 0 if the delete operation was successful and -1 when the deletion failed or partly failed. @@ -6167,7 +6169,7 @@ rpcstop({channel}) {Nvim} *rpcstop()* connecting to |v:servername|. screenattr(row, col) *screenattr()* - Like screenchar(), but return the attribute. This is a rather + Like |screenchar()|, but return the attribute. This is a rather arbitrary number that can only be used to compare to the attribute at other positions. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 6b96271c4a..cef01eb27b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2219,10 +2219,15 @@ A jump table for the options with a short description can be found at |Q_op|. *'exrc'* *'ex'* *'noexrc'* *'noex'* 'exrc' 'ex' boolean (default off) global - Enables the reading of .nvimrc and .exrc in the current directory. - If you switch this option on you should also consider setting the - 'secure' option (see |initialization|). Using this option comes - with a potential security risk, use with care! + Enables the reading of .vimrc and .exrc in the current directory. + Setting this option is a potential security leak. E.g., consider + unpacking a package or fetching files from github, a .vimrc in there + might be a trojan horse. BETTER NOT SET THIS OPTION! + Instead, define an autocommand in your .vimrc to set options for a + matching directory. + + If you do switch this option on you should also consider setting the + 'secure' option (see |initialization|). This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. Also see |init.vim| and |gui-init|. diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index c93c3d0741..f7c47125f1 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -425,7 +425,7 @@ accordingly. Vim proceeds in this order: - The environment variable EXINIT. The value of $EXINIT is used as an Ex command line. - c. If the 'exrc' option is on (which is not the default), the current + c. If the 'exrc' option is on (which is NOT the default), the current directory is searched for three files. The first that exists is used, the others are ignored. - The file ".nvimrc" (for Unix) diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim index 01dad3c7f2..81e3667298 100644 --- a/runtime/synmenu.vim +++ b/runtime/synmenu.vim @@ -61,7 +61,6 @@ an 50.10.320 &Syntax.AB.Ascii\ Doc :cal SetSyn("asciidoc") an 50.10.330 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs") an 50.10.340 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl") an 50.10.350 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k") -an 50.10.355 &Syntax.AB.Assembly.AVR :cal SetSyn("avra") an 50.10.360 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm") an 50.10.370 &Syntax.AB.Assembly.GNU :cal SetSyn("asm") an 50.10.380 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300") @@ -162,31 +161,31 @@ an 50.30.290 &Syntax.DE.Doxygen.C\ with\ doxygen :cal SetSyn("c.doxygen") an 50.30.300 &Syntax.DE.Doxygen.C++\ with\ doxygen :cal SetSyn("cpp.doxygen") an 50.30.310 &Syntax.DE.Doxygen.IDL\ with\ doxygen :cal SetSyn("idl.doxygen") an 50.30.320 &Syntax.DE.Doxygen.Java\ with\ doxygen :cal SetSyn("java.doxygen") -an 50.30.320 &Syntax.DE.Doxygen.DataScript\ with\ doxygen :cal SetSyn("datascript.doxygen") -an 50.30.330 &Syntax.DE.Dracula :cal SetSyn("dracula") -an 50.30.340 &Syntax.DE.DSSSL :cal SetSyn("dsl") -an 50.30.350 &Syntax.DE.DTD :cal SetSyn("dtd") -an 50.30.360 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml") -an 50.30.370 &Syntax.DE.DTrace :cal SetSyn("dtrace") -an 50.30.380 &Syntax.DE.Dts/dtsi :cal SetSyn("dts") -an 50.30.390 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan") -an 50.30.400 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr") -an 50.30.410 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid") -an 50.30.430 &Syntax.DE.EDIF :cal SetSyn("edif") -an 50.30.440 &Syntax.DE.Eiffel :cal SetSyn("eiffel") -an 50.30.450 &Syntax.DE.Elinks\ config :cal SetSyn("elinks") -an 50.30.460 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt") -an 50.30.470 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd") -an 50.30.480 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang") -an 50.30.490 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc") -an 50.30.500 &Syntax.DE.ESQL-C :cal SetSyn("esqlc") -an 50.30.510 &Syntax.DE.Essbase\ script :cal SetSyn("csc") -an 50.30.520 &Syntax.DE.Esterel :cal SetSyn("esterel") -an 50.30.530 &Syntax.DE.Eterm\ config :cal SetSyn("eterm") -an 50.30.540 &Syntax.DE.Eviews :cal SetSyn("eviews") -an 50.30.550 &Syntax.DE.Exim\ conf :cal SetSyn("exim") -an 50.30.560 &Syntax.DE.Expect :cal SetSyn("expect") -an 50.30.570 &Syntax.DE.Exports :cal SetSyn("exports") +an 50.30.330 &Syntax.DE.Doxygen.DataScript\ with\ doxygen :cal SetSyn("datascript.doxygen") +an 50.30.340 &Syntax.DE.Dracula :cal SetSyn("dracula") +an 50.30.350 &Syntax.DE.DSSSL :cal SetSyn("dsl") +an 50.30.360 &Syntax.DE.DTD :cal SetSyn("dtd") +an 50.30.370 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml") +an 50.30.380 &Syntax.DE.DTrace :cal SetSyn("dtrace") +an 50.30.390 &Syntax.DE.Dts/dtsi :cal SetSyn("dts") +an 50.30.400 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan") +an 50.30.410 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr") +an 50.30.420 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid") +an 50.30.440 &Syntax.DE.EDIF :cal SetSyn("edif") +an 50.30.450 &Syntax.DE.Eiffel :cal SetSyn("eiffel") +an 50.30.460 &Syntax.DE.Elinks\ config :cal SetSyn("elinks") +an 50.30.470 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt") +an 50.30.480 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd") +an 50.30.490 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang") +an 50.30.500 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc") +an 50.30.510 &Syntax.DE.ESQL-C :cal SetSyn("esqlc") +an 50.30.520 &Syntax.DE.Essbase\ script :cal SetSyn("csc") +an 50.30.530 &Syntax.DE.Esterel :cal SetSyn("esterel") +an 50.30.540 &Syntax.DE.Eterm\ config :cal SetSyn("eterm") +an 50.30.550 &Syntax.DE.Eviews :cal SetSyn("eviews") +an 50.30.560 &Syntax.DE.Exim\ conf :cal SetSyn("exim") +an 50.30.570 &Syntax.DE.Expect :cal SetSyn("expect") +an 50.30.580 &Syntax.DE.Exports :cal SetSyn("exports") an 50.40.100 &Syntax.FG.Falcon :cal SetSyn("falcon") an 50.40.110 &Syntax.FG.Fantom :cal SetSyn("fan") an 50.40.120 &Syntax.FG.Fetchmail :cal SetSyn("fetchmail") @@ -328,7 +327,6 @@ an 50.70.270 &Syntax.M.Messages\ (/var/log) :cal SetSyn("messages") an 50.70.280 &Syntax.M.Metafont :cal SetSyn("mf") an 50.70.290 &Syntax.M.MetaPost :cal SetSyn("mp") an 50.70.300 &Syntax.M.MGL :cal SetSyn("mgl") -an 50.70.305 &Syntax.M.MIX :cal SetSyn("mix") an 50.70.310 &Syntax.M.MMIX :cal SetSyn("mmix") an 50.70.320 &Syntax.M.Modconf :cal SetSyn("modconf") an 50.70.330 &Syntax.M.Model :cal SetSyn("model") -- cgit From a53409b564458f7a94c8fcd0725d1953dee58dce Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 21:06:44 +0200 Subject: vim-patch:89bcfda6834a Updated runtime files. Remove version checks for Vim older than 6.0. https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 --- runtime/autoload/rubycomplete.vim | 36 +++- runtime/compiler/cucumber.vim | 4 +- runtime/compiler/haml.vim | 4 +- runtime/compiler/rake.vim | 6 +- runtime/compiler/rspec.vim | 3 +- runtime/compiler/rubyunit.vim | 2 + runtime/compiler/sass.vim | 4 +- runtime/doc/eval.txt | 26 ++- runtime/ftplugin/cucumber.vim | 28 ++- runtime/ftplugin/eruby.vim | 2 +- runtime/ftplugin/git.vim | 4 +- runtime/ftplugin/gitcommit.vim | 17 +- runtime/ftplugin/gitrebase.vim | 5 +- runtime/ftplugin/haml.vim | 2 +- runtime/ftplugin/markdown.vim | 32 ++- runtime/ftplugin/ruby.vim | 153 +++++++------ runtime/ftplugin/sass.vim | 5 +- runtime/ftplugin/scss.vim | 3 +- runtime/indent/cucumber.vim | 21 +- runtime/indent/eruby.vim | 43 +++- runtime/indent/fortran.vim | 5 +- runtime/indent/gitconfig.vim | 9 +- runtime/indent/haml.vim | 7 +- runtime/indent/liquid.vim | 11 +- runtime/indent/ruby.vim | 229 +++++++++++++++++--- runtime/indent/sass.vim | 6 +- runtime/syntax/a65.vim | 47 ++-- runtime/syntax/abap.vim | 69 +++--- runtime/syntax/abaqus.vim | 37 ++-- runtime/syntax/abc.vim | 43 ++-- runtime/syntax/abel.vim | 83 ++++--- runtime/syntax/acedb.vim | 53 ++--- runtime/syntax/aflex.vim | 56 ++--- runtime/syntax/ahdl.vim | 45 ++-- runtime/syntax/amiga.vim | 45 ++-- runtime/syntax/aml.vim | 59 +++-- runtime/syntax/ampl.vim | 48 ++--- runtime/syntax/antlr.vim | 30 +-- runtime/syntax/apache.vim | 63 +++--- runtime/syntax/apachestyle.vim | 33 +-- runtime/syntax/aptconf.vim | 7 +- runtime/syntax/arduino.vim | 13 +- runtime/syntax/asm.vim | 61 +++--- runtime/syntax/asm68k.vim | 113 +++++----- runtime/syntax/asmh8300.vim | 37 +--- runtime/syntax/asn.vim | 55 ++--- runtime/syntax/aspperl.vim | 18 +- runtime/syntax/aspvbs.vim | 54 ++--- runtime/syntax/asterisk.vim | 70 +++--- runtime/syntax/asteriskvm.vim | 43 ++-- runtime/syntax/atlas.vim | 61 +++--- runtime/syntax/automake.vim | 54 ++--- runtime/syntax/ave.vim | 43 ++-- runtime/syntax/ayacc.vim | 60 ++---- runtime/syntax/b.vim | 101 ++++----- runtime/syntax/baan.vim | 67 +++--- runtime/syntax/basic.vim | 51 ++--- runtime/syntax/bc.vim | 41 ++-- runtime/syntax/bib.vim | 44 ++-- runtime/syntax/bindzone.vim | 67 +++--- runtime/syntax/blank.vim | 31 +-- runtime/syntax/bst.vim | 47 ++-- runtime/syntax/btm.vim | 77 +++---- runtime/syntax/bzr.vim | 37 ++-- runtime/syntax/cabal.vim | 39 ++-- runtime/syntax/cfg.vim | 40 ++-- runtime/syntax/ch.vim | 37 ++-- runtime/syntax/change.vim | 29 +-- runtime/syntax/changelog.vim | 66 +++--- runtime/syntax/chaskell.vim | 6 +- runtime/syntax/cheetah.vim | 37 ++-- runtime/syntax/chill.vim | 121 +++++------ runtime/syntax/cl.vim | 73 +++---- runtime/syntax/clean.vim | 81 +++---- runtime/syntax/clipper.vim | 51 ++--- runtime/syntax/cmake.vim | 47 ++-- runtime/syntax/cobol.vim | 95 ++++----- runtime/syntax/coco.vim | 5 +- runtime/syntax/config.vim | 43 ++-- runtime/syntax/cpp.vim | 54 ++--- runtime/syntax/crontab.vim | 61 +++--- runtime/syntax/csc.vim | 77 +++---- runtime/syntax/csh.vim | 98 ++++----- runtime/syntax/csp.vim | 79 +++---- runtime/syntax/css.vim | 265 +++++++++++------------ runtime/syntax/cterm.vim | 83 ++++--- runtime/syntax/cuda.vim | 13 +- runtime/syntax/cupl.vim | 65 +++--- runtime/syntax/cuplsim.vim | 47 ++-- runtime/syntax/cvs.vim | 33 +-- runtime/syntax/cweb.vim | 35 +-- runtime/syntax/cynlib.vim | 37 +--- runtime/syntax/cynpp.vim | 32 +-- runtime/syntax/datascript.vim | 5 +- runtime/syntax/dcd.vim | 35 ++- runtime/syntax/dcl.vim | 87 ++++---- runtime/syntax/debchangelog.vim | 41 ++-- runtime/syntax/debcontrol.vim | 59 +++-- runtime/syntax/debsources.vim | 4 +- runtime/syntax/def.vim | 37 ++-- runtime/syntax/desc.vim | 68 +++--- runtime/syntax/desktop.vim | 69 +++--- runtime/syntax/diva.vim | 40 ++-- runtime/syntax/django.vim | 43 ++-- runtime/syntax/dnsmasq.vim | 6 +- runtime/syntax/docbk.vim | 34 +-- runtime/syntax/dosbatch.vim | 85 ++++---- runtime/syntax/dosini.vim | 33 +-- runtime/syntax/dot.vim | 59 +++-- runtime/syntax/dracula.vim | 31 +-- runtime/syntax/dtd.vim | 62 +++--- runtime/syntax/dtml.vim | 43 ++-- runtime/syntax/dtrace.vim | 13 +- runtime/syntax/dylan.vim | 73 +++---- runtime/syntax/dylanintr.vim | 39 ++-- runtime/syntax/dylanlid.vim | 29 +-- runtime/syntax/ecd.vim | 38 ++-- runtime/syntax/edif.vim | 43 ++-- runtime/syntax/eiffel.vim | 97 ++++----- runtime/syntax/elf.vim | 51 ++--- runtime/syntax/elmfilt.vim | 53 ++--- runtime/syntax/erlang.vim | 219 +++++++++---------- runtime/syntax/eruby.vim | 2 +- runtime/syntax/esmtprc.vim | 7 +- runtime/syntax/esqlc.vim | 37 +--- runtime/syntax/esterel.vim | 38 ++-- runtime/syntax/euphoria3.vim | 6 +- runtime/syntax/euphoria4.vim | 6 +- runtime/syntax/eviews.vim | 63 +++--- runtime/syntax/exim.vim | 42 ++-- runtime/syntax/expect.vim | 57 ++--- runtime/syntax/exports.vim | 43 ++-- runtime/syntax/fasm.vim | 5 +- runtime/syntax/fdcc.vim | 99 ++++----- runtime/syntax/fgl.vim | 39 ++-- runtime/syntax/flexwiki.vim | 6 +- runtime/syntax/focexec.vim | 47 ++-- runtime/syntax/form.vim | 83 ++++--- runtime/syntax/forth.vim | 105 ++++----- runtime/syntax/fortran.vim | 6 +- runtime/syntax/foxpro.vim | 57 +++-- runtime/syntax/fstab.vim | 114 +++++----- runtime/syntax/fvwm2m4.vim | 21 +- runtime/syntax/gdb.vim | 41 ++-- runtime/syntax/gdmo.vim | 47 ++-- runtime/syntax/gedcom.vim | 41 ++-- runtime/syntax/gitcommit.vim | 9 +- runtime/syntax/gitrebase.vim | 4 +- runtime/syntax/gitsendemail.vim | 8 +- runtime/syntax/gkrellmrc.vim | 60 ++---- runtime/syntax/gnash.vim | 7 +- runtime/syntax/gnuplot.vim | 93 ++++---- runtime/syntax/gp.vim | 50 ++--- runtime/syntax/grads.vim | 43 ++-- runtime/syntax/gretl.vim | 61 ++---- runtime/syntax/groovy.vim | 145 ++++++------- runtime/syntax/gsp.vim | 19 +- runtime/syntax/gtkrc.vim | 112 +++++----- runtime/syntax/haml.vim | 4 +- runtime/syntax/hamster.vim | 30 +-- runtime/syntax/haskell.vim | 118 +++++----- runtime/syntax/haste.vim | 7 +- runtime/syntax/hastepreproc.vim | 19 +- runtime/syntax/hb.vim | 49 ++--- runtime/syntax/hercules.vim | 50 ++--- runtime/syntax/hex.vim | 51 ++--- runtime/syntax/hog.vim | 5 +- runtime/syntax/hostsaccess.vim | 8 +- runtime/syntax/html.vim | 134 ++++++------ runtime/syntax/htmlcheetah.vim | 18 +- runtime/syntax/htmldjango.vim | 18 +- runtime/syntax/htmlm4.vim | 20 +- runtime/syntax/htmlos.vim | 79 +++---- runtime/syntax/ia64.vim | 73 +++---- runtime/syntax/icemenu.vim | 6 +- runtime/syntax/icon.vim | 99 ++++----- runtime/syntax/idlang.vim | 57 ++--- runtime/syntax/inform.vim | 116 +++++----- runtime/syntax/inittab.vim | 46 ++-- runtime/syntax/ipfilter.vim | 7 +- runtime/syntax/ishd.vim | 53 ++--- runtime/syntax/iss.vim | 75 +++---- runtime/syntax/ist.vim | 49 ++--- runtime/syntax/jal.vim | 141 ++++++------ runtime/syntax/jam.vim | 169 +++++++-------- runtime/syntax/jargon.vim | 29 +-- runtime/syntax/java.vim | 145 ++++++------- runtime/syntax/javacc.vim | 37 +--- runtime/syntax/javascript.vim | 94 ++++---- runtime/syntax/jess.vim | 65 +++--- runtime/syntax/jgraph.vim | 33 +-- runtime/syntax/jproperties.vim | 43 ++-- runtime/syntax/json.vim | 61 +++--- runtime/syntax/jsp.vim | 51 ++--- runtime/syntax/kix.vim | 90 ++++---- runtime/syntax/kscript.vim | 53 ++--- runtime/syntax/kwt.vim | 49 ++--- runtime/syntax/lace.vim | 87 ++++---- runtime/syntax/latte.vim | 43 ++-- runtime/syntax/ldif.vim | 34 ++- runtime/syntax/lex.vim | 7 +- runtime/syntax/lhaskell.vim | 52 ++--- runtime/syntax/lifelines.vim | 77 +++---- runtime/syntax/lilo.vim | 130 +++++------ runtime/syntax/lisp.vim | 97 ++++----- runtime/syntax/lite.vim | 65 +++--- runtime/syntax/logtalk.vim | 73 +++---- runtime/syntax/lotos.vim | 35 ++- runtime/syntax/lout.vim | 81 +++---- runtime/syntax/lpc.vim | 171 +++++++-------- runtime/syntax/lprolog.vim | 69 +++--- runtime/syntax/lscript.vim | 55 ++--- runtime/syntax/lss.vim | 112 +++++----- runtime/syntax/lua.vim | 63 +++--- runtime/syntax/m4.vim | 53 ++--- runtime/syntax/make.vim | 65 +++--- runtime/syntax/maple.vim | 151 ++++++------- runtime/syntax/markdown.vim | 31 ++- runtime/syntax/mason.vim | 36 +--- runtime/syntax/master.vim | 31 +-- runtime/syntax/matlab.vim | 79 +++---- runtime/syntax/maxima.vim | 65 +++--- runtime/syntax/mel.vim | 79 +++---- runtime/syntax/mf.vim | 67 +++--- runtime/syntax/mgl.vim | 71 +++--- runtime/syntax/mgp.vim | 46 ++-- runtime/syntax/mma.vim | 78 +++---- runtime/syntax/mmix.vim | 73 +++---- runtime/syntax/mmp.vim | 10 +- runtime/syntax/modsim3.vim | 48 ++--- runtime/syntax/modula2.vim | 47 ++-- runtime/syntax/modula3.vim | 31 +-- runtime/syntax/monk.vim | 57 ++--- runtime/syntax/moo.vim | 4 +- runtime/syntax/mp.vim | 37 +--- runtime/syntax/msidl.vim | 65 +++--- runtime/syntax/msmessages.vim | 7 +- runtime/syntax/msql.vim | 73 +++---- runtime/syntax/mupad.vim | 42 ++-- runtime/syntax/mush.vim | 60 +++--- runtime/syntax/muttrc.vim | 313 +++++++++++++-------------- runtime/syntax/mysql.vim | 41 ++-- runtime/syntax/named.vim | 93 ++++---- runtime/syntax/nasm.vim | 194 ++++++++--------- runtime/syntax/nastran.vim | 62 +++--- runtime/syntax/natural.vim | 11 +- runtime/syntax/ncf.vim | 71 +++--- runtime/syntax/netrw.vim | 5 +- runtime/syntax/nqc.vim | 91 ++++---- runtime/syntax/nroff.vim | 115 +++++----- runtime/syntax/nsis.vim | 81 +++---- runtime/syntax/obj.vim | 47 ++-- runtime/syntax/objcpp.vim | 18 +- runtime/syntax/ocaml.vim | 143 ++++++------- runtime/syntax/occam.vim | 68 +++--- runtime/syntax/omnimark.vim | 39 ++-- runtime/syntax/openroad.vim | 52 ++--- runtime/syntax/opl.vim | 31 +-- runtime/syntax/ora.vim | 54 ++--- runtime/syntax/papp.vim | 29 +-- runtime/syntax/pascal.vim | 91 ++++---- runtime/syntax/pcap.vim | 33 +-- runtime/syntax/pccts.vim | 61 ++---- runtime/syntax/perl6.vim | 339 ++++++++++++++--------------- runtime/syntax/pfmain.vim | 50 ++--- runtime/syntax/php.vim | 202 ++++++++---------- runtime/syntax/pic.vim | 59 +++-- runtime/syntax/pike.vim | 89 ++++---- runtime/syntax/pilrc.vim | 48 ++--- runtime/syntax/pine.vim | 33 +-- runtime/syntax/pli.vim | 96 ++++----- runtime/syntax/plm.vim | 67 +++--- runtime/syntax/plp.vim | 18 +- runtime/syntax/plsql.vim | 91 ++++---- runtime/syntax/po.vim | 109 +++++----- runtime/syntax/pod.vim | 43 ++-- runtime/syntax/postscr.vim | 125 +++++------ runtime/syntax/pov.vim | 10 +- runtime/syntax/povini.vim | 10 +- runtime/syntax/ppd.vim | 41 ++-- runtime/syntax/ppwiz.vim | 49 ++--- runtime/syntax/prescribe.vim | 33 +-- runtime/syntax/procmail.vim | 45 ++-- runtime/syntax/progress.vim | 77 +++---- runtime/syntax/prolog.vim | 74 +++---- runtime/syntax/promela.vim | 7 +- runtime/syntax/proto.vim | 5 +- runtime/syntax/psf.vim | 40 ++-- runtime/syntax/ptcap.vim | 56 ++--- runtime/syntax/purifylog.vim | 99 ++++----- runtime/syntax/pyrex.vim | 44 ++-- runtime/syntax/python.vim | 86 ++++---- runtime/syntax/radiance.vim | 51 ++--- runtime/syntax/ratpoison.vim | 49 ++--- runtime/syntax/rc.vim | 97 ++++----- runtime/syntax/rcs.vim | 35 ++- runtime/syntax/rcslog.vim | 27 +-- runtime/syntax/rebol.vim | 123 +++++------ runtime/syntax/redif.vim | 6 +- runtime/syntax/registry.vim | 42 ++-- runtime/syntax/remind.vim | 52 ++--- runtime/syntax/resolv.vim | 62 +++--- runtime/syntax/reva.vim | 9 +- runtime/syntax/rexx.vim | 137 ++++++------ runtime/syntax/rib.vim | 31 +-- runtime/syntax/robots.vim | 40 ++-- runtime/syntax/rpcgen.vim | 48 ++--- runtime/syntax/rpl.vim | 141 ++++++------ runtime/syntax/rtf.vim | 57 ++--- runtime/syntax/ruby.vim | 439 +++++++++++++++++++++++++++----------- runtime/syntax/samba.vim | 35 ++- runtime/syntax/sas.vim | 113 +++++----- runtime/syntax/sass.vim | 12 +- runtime/syntax/sather.vim | 73 +++---- runtime/syntax/scala.vim | 5 +- runtime/syntax/scheme.vim | 55 ++--- runtime/syntax/scilab.vim | 85 ++++---- runtime/syntax/sd.vim | 40 ++-- runtime/syntax/sdl.vim | 62 +++--- runtime/syntax/sed.vim | 80 ++++--- runtime/syntax/sendpr.vim | 7 +- runtime/syntax/sgml.vim | 7 +- runtime/syntax/sgmldecl.vim | 47 ++-- runtime/syntax/sgmllnx.vim | 49 ++--- runtime/syntax/sh.vim | 7 +- runtime/syntax/sicad.vim | 77 +++---- runtime/syntax/simula.vim | 68 +++--- runtime/syntax/sinda.vim | 71 +++--- runtime/syntax/sindacmp.vim | 33 +-- runtime/syntax/sindaout.vim | 59 ++--- runtime/syntax/sisu.vim | 6 +- runtime/syntax/skill.vim | 57 ++--- runtime/syntax/sl.vim | 73 +++---- runtime/syntax/slang.vim | 77 +++---- runtime/syntax/slice.vim | 49 ++--- runtime/syntax/slrnrc.vim | 75 +++---- runtime/syntax/slrnsc.vim | 57 ++--- runtime/syntax/sm.vim | 52 ++--- runtime/syntax/smarty.vim | 38 ++-- runtime/syntax/smcl.vim | 5 +- runtime/syntax/smil.vim | 63 +++--- runtime/syntax/smith.vim | 35 ++- runtime/syntax/sml.vim | 111 +++++----- runtime/syntax/snnsnet.vim | 28 +-- runtime/syntax/snnspat.vim | 34 ++- runtime/syntax/snnsres.vim | 32 ++- runtime/syntax/snobol4.vim | 77 +++---- runtime/syntax/spec.vim | 139 ++++++------ runtime/syntax/specman.vim | 81 +++---- runtime/syntax/spice.vim | 43 ++-- runtime/syntax/splint.vim | 115 +++++----- runtime/syntax/spup.vim | 127 +++++------ runtime/syntax/spyce.vim | 17 +- runtime/syntax/sql.vim | 7 +- runtime/syntax/sqlanywhere.vim | 7 +- runtime/syntax/sqlforms.vim | 54 ++--- runtime/syntax/sqlhana.vim | 7 +- runtime/syntax/sqlinformix.vim | 75 +++---- runtime/syntax/sqlj.vim | 41 ++-- runtime/syntax/sqr.vim | 121 ++++------- runtime/syntax/squid.vim | 43 ++-- runtime/syntax/srec.vim | 49 ++--- runtime/syntax/sshconfig.vim | 74 +++---- runtime/syntax/sshdconfig.vim | 82 +++---- runtime/syntax/st.vim | 47 ++-- runtime/syntax/stata.vim | 5 +- runtime/syntax/stp.vim | 59 +++-- runtime/syntax/strace.vim | 50 ++--- runtime/syntax/svn.vim | 39 ++-- runtime/syntax/systemverilog.vim | 42 ++-- runtime/syntax/tads.vim | 97 ++++----- runtime/syntax/tags.vim | 33 +-- runtime/syntax/tak.vim | 73 +++---- runtime/syntax/takcmp.vim | 37 ++-- runtime/syntax/takout.vim | 55 ++--- runtime/syntax/taskdata.vim | 7 +- runtime/syntax/taskedit.vim | 7 +- runtime/syntax/tasm.vim | 47 ++-- runtime/syntax/tcl.vim | 81 +++---- runtime/syntax/tex.vim | 39 +--- runtime/syntax/texinfo.vim | 81 +++---- runtime/syntax/texmf.vim | 58 +++-- runtime/syntax/tf.vim | 75 +++---- runtime/syntax/tli.vim | 41 ++-- runtime/syntax/tpp.vim | 59 ++--- runtime/syntax/trasys.vim | 73 +++---- runtime/syntax/trustees.vim | 5 +- runtime/syntax/tsalt.vim | 79 +++---- runtime/syntax/tsscl.vim | 61 +++--- runtime/syntax/tssgm.vim | 57 ++--- runtime/syntax/tssop.vim | 47 ++-- runtime/syntax/uc.vim | 115 +++++----- runtime/syntax/uil.vim | 56 ++--- runtime/syntax/upstart.vim | 5 +- runtime/syntax/vb.vim | 63 +++--- runtime/syntax/vera.vim | 135 ++++++------ runtime/syntax/verilog.vim | 61 ++---- runtime/syntax/verilogams.vim | 61 ++---- runtime/syntax/vhdl.vim | 55 ++--- runtime/syntax/virata.vim | 112 +++++----- runtime/syntax/vmasm.vim | 81 +++---- runtime/syntax/vrml.vim | 77 +++---- runtime/syntax/vroom.vim | 7 +- runtime/syntax/vsejcl.vim | 35 ++- runtime/syntax/wdiff.vim | 30 +-- runtime/syntax/web.vim | 15 +- runtime/syntax/webmacro.vim | 53 ++--- runtime/syntax/winbatch.vim | 41 ++-- runtime/syntax/wml.vim | 62 ++---- runtime/syntax/wsml.vim | 76 +++---- runtime/syntax/xdefaults.vim | 59 +++-- runtime/syntax/xf86conf.vim | 8 +- runtime/syntax/xkb.vim | 76 +++---- runtime/syntax/xmath.vim | 71 +++--- runtime/syntax/xpm.vim | 35 ++- runtime/syntax/xpm2.vim | 38 ++-- runtime/syntax/xs.vim | 47 ++-- runtime/syntax/xxd.vim | 27 +-- runtime/syntax/yacc.vim | 3 - runtime/syntax/z8a.vim | 47 ++-- 420 files changed, 9923 insertions(+), 13558 deletions(-) (limited to 'runtime') diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index e1064c8a58..440dfd42e9 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -93,7 +93,7 @@ function! s:GetBufferRubyEntity( name, type, ... ) let stopline = 1 - let crex = '^\s*\<' . a:type . '\>\s*\<' . a:name . '\>\s*\(<\s*.*\s*\)\?' + let crex = '^\s*\<' . a:type . '\>\s*\<' . escape(a:name, '*') . '\>\s*\(<\s*.*\s*\)\?' let [lnum,lcol] = searchpos( crex, 'w' ) "let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' ) @@ -149,7 +149,7 @@ function! s:GetRubyVarType(v) let ctors = ctors.'\)' let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)' - let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr + let sstr = ''.escape(a:v, '*').'\>\s*[+\-*/]*'.fstr let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 let str = matchstr(getline(lnum),fstr,lcol) @@ -266,6 +266,28 @@ class VimRubyCompletion end end + def load_gems + fpath = VIM::evaluate("get(g:, 'rubycomplete_gemfile_path', 'Gemfile')") + return unless File.file?(fpath) && File.readable?(fpath) + want_bundler = VIM::evaluate("get(g:, 'rubycomplete_use_bundler')") + parse_file = !want_bundler + begin + require 'bundler' + Bundler.setup + Bundler.require + rescue Exception + parse_file = true + end + if parse_file + File.new(fpath).each_line do |line| + begin + require $1 if /\s*gem\s*['"]([^'"]+)/.match(line) + rescue Exception + end + end + end + end + def load_buffer_class(name) dprint "load_buffer_class(%s) START" % name classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') @@ -588,6 +610,10 @@ class VimRubyCompletion load_rails end + want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')") + load_gems unless want_gems.to_i.zero? + + input = VIM::Buffer.current.line cpos = VIM::Window.current.cursor[1] - 1 input = input[0..cpos] @@ -678,7 +704,9 @@ class VimRubyCompletion cv = eval("self.class.constants") vartype = get_var_type( receiver ) dprint "vartype: %s" % vartype - if vartype != '' + + invalid_vartype = ['', "gets"] + if !invalid_vartype.include?(vartype) load_buffer_class( vartype ) begin @@ -706,7 +734,7 @@ class VimRubyCompletion methods.concat m.instance_methods(false) } end - variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0 + variables += add_rails_columns( "#{vartype}" ) if vartype && !invalid_vartype.include?(vartype) when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ message = $1 diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim index c020be6e3b..17ce3627c1 100644 --- a/runtime/compiler/cucumber.vim +++ b/runtime/compiler/cucumber.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Cucumber " Maintainer: Tim Pope -" Last Change: 2010 Aug 09 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber CompilerSet errorformat= \%W%m\ (Cucumber::Undefined), - \%E%m\ (%.%#), + \%E%m\ (%\\S%#), \%Z%f:%l, \%Z%f:%l:%.%# diff --git a/runtime/compiler/haml.vim b/runtime/compiler/haml.vim index b06a672df7..9464c3dc85 100644 --- a/runtime/compiler/haml.vim +++ b/runtime/compiler/haml.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Haml " Maintainer: Tim Pope -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=haml\ -c +CompilerSet makeprg=haml CompilerSet errorformat= \Haml\ %trror\ on\ line\ %l:\ %m, diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim index 3bd9da0daf..8490f2a9e9 100644 --- a/runtime/compiler/rake.vim +++ b/runtime/compiler/rake.vim @@ -27,7 +27,11 @@ CompilerSet errorformat= \%\\s%#[%f:%l:\ %#%m, \%\\s%#%f:%l:\ %#%m, \%\\s%#%f:%l:, - \%m\ [%f:%l]: + \%m\ [%f:%l]:, + \%+Erake\ aborted!, + \%+EDon't\ know\ how\ to\ build\ task\ %.%#, + \%+Einvalid\ option:%.%#, + \%+Irake\ %\\S%\\+%\\s%\\+#\ %.%# let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim index 7c340bab15..c77bd70da7 100644 --- a/runtime/compiler/rspec.vim +++ b/runtime/compiler/rspec.vim @@ -22,9 +22,10 @@ CompilerSet errorformat= \%f:%l:\ %tarning:\ %m, \%E%.%#:in\ `load':\ %f:%l:%m, \%E%f:%l:in\ `%*[^']':\ %m, - \%-Z\ \ \ \ \ \#\ %f:%l:%.%#, + \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#, \%E\ \ %\\d%\\+)%.%#, \%C\ \ \ \ \ %m, + \%C%\\s%#, \%-G%.%# let &cpo = s:cpo_save diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim index 93a0c8e653..ed0639b581 100644 --- a/runtime/compiler/rubyunit.vim +++ b/runtime/compiler/rubyunit.vim @@ -17,6 +17,8 @@ let s:cpo_save = &cpo set cpo-=C CompilerSet makeprg=testrb +" CompilerSet makeprg=ruby\ -Itest +" CompilerSet makeprg=m CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:, \%C%m\ [%f:%l]:, diff --git a/runtime/compiler/sass.vim b/runtime/compiler/sass.vim index 376a52b303..9c540ac443 100644 --- a/runtime/compiler/sass.vim +++ b/runtime/compiler/sass.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Sass " Maintainer: Tim Pope -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=sass\ -c +CompilerSet makeprg=sass CompilerSet errorformat= \%f:%l:%m\ (Sass::Syntax%trror), diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 90575e3438..b40f91ff35 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -631,13 +631,17 @@ It's possible to form a variable name with curly braces, see Expression syntax summary, from least to most significant: -|expr1| expr2 ? expr1 : expr1 if-then-else +|expr1| expr2 + expr2 ? expr1 : expr1 if-then-else -|expr2| expr3 || expr3 .. logical OR +|expr2| expr3 + expr3 || expr3 .. logical OR -|expr3| expr4 && expr4 .. logical AND +|expr3| expr4 + expr4 && expr4 .. logical AND -|expr4| expr5 == expr5 equal +|expr4| expr5 + expr5 == expr5 equal expr5 != expr5 not equal expr5 > expr5 greater than expr5 >= expr5 greater than or equal @@ -654,24 +658,28 @@ Expression syntax summary, from least to most significant: expr5 is expr5 same |List| instance expr5 isnot expr5 different |List| instance -|expr5| expr6 + expr6 .. number addition or list concatenation +|expr5| expr6 + expr6 + expr6 .. number addition or list concatenation expr6 - expr6 .. number subtraction expr6 . expr6 .. string concatenation -|expr6| expr7 * expr7 .. number multiplication +|expr6| expr7 + expr7 * expr7 .. number multiplication expr7 / expr7 .. number division expr7 % expr7 .. number modulo -|expr7| ! expr7 logical NOT +|expr7| expr8 + ! expr7 logical NOT - expr7 unary minus + expr7 unary plus -|expr8| expr8[expr1] byte of a String or item of a |List| +|expr8| expr9 + expr8[expr1] byte of a String or item of a |List| expr8[expr1 : expr1] substring of a String or sublist of a |List| expr8.name entry in a |Dictionary| expr8(expr1, ...) function call with |Funcref| variable -|expr9| number number constant +|expr9| number number constant "string" string constant, backslash is special 'string' string constant, ' is doubled [expr1, ...] |List| diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim index 2ec1a5976f..f4848d1c60 100644 --- a/runtime/ftplugin/cucumber.vim +++ b/runtime/ftplugin/cucumber.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Cucumber " Maintainer: Tim Pope -" Last Change: 2013 Jun 01 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -19,27 +19,23 @@ setlocal omnifunc=CucumberComplete let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') +if !exists("b:cucumber_steps_glob") + let b:cucumber_steps_glob = b:cucumber_root.'/**/*.rb' +endif if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") - nnoremap :exe jump('edit',v:count) - nnoremap [ :exe jump('edit',v:count) - nnoremap ] :exe jump('edit',v:count) - nnoremap ] :exe jump('split',v:count) - nnoremap :exe jump('split',v:count) - nnoremap d :exe jump('split',v:count) - nnoremap :exe jump('split',v:count) - nnoremap } :exe jump('pedit',v:count) - nnoremap [d :exe jump('pedit',v:count) - nnoremap ]d :exe jump('pedit',v:count) + cnoremap foldopen if &foldopen =~# 'tag'exe 'norm! zv'endif + nnoremap