Merge branch 'master' into expression-parser

This commit is contained in:
ZyX
2017-11-06 20:23:35 +03:00
229 changed files with 2783 additions and 1244 deletions

View File

@ -34,6 +34,11 @@ Install from source
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
To install to a non-default location, specify `CMAKE_INSTALL_PREFIX`:
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/"
make install
See [the wiki](https://github.com/neovim/neovim/wiki/Building-Neovim) for details.
Install from package

View File

@ -1,7 +1,7 @@
" Vim completion script
" Language: Java Script
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Apr 30
" Last Change: 2017 Mar 04
function! javascriptcomplete#CompleteJS(findstart, base)
if a:findstart
@ -563,7 +563,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
for i in arguments
let g:ia = i
let f_elements = matchlist(i, 'function\s\+\(\k\+\)\s*(\(.\{-}\))')
if len(f_elements) == 3
if len(f_elements) >= 3
let b:js_menuinfo[f_elements[1].'('] = f_elements[2]
endif
endfor

View File

@ -88,8 +88,8 @@ function! spellfile#LoadFile(lang)
endif
endif
if newbufnr == winbufnr(0)
" We are back the old buffer, remove any (half-finished) download.
g/^/d_
" We are back to the old buffer, remove any (half-finished) download.
keeppatterns g/^/d_
else
let newbufnr = winbufnr(0)
endif
@ -127,7 +127,7 @@ function! spellfile#LoadFile(lang)
exe "write " . dirname . '/' . fname
" Also download the .sug file.
g/^/d_
keeppatterns g/^/d_
let fname = substitute(fname, '\.spl$', '.sug', '')
echo 'Downloading ' . fname . '...'
call spellfile#Nread(fname)

View File

@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: BDF to PCF Conversion
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Compiler: BDF to PCF Conversion
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("current_compiler")
finish

View File

@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: GNU C Compiler
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-10-14
" Compiler: GNU C Compiler
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-10-14
" added line suggested by Anton Lindqvist 2016 Mar 31
if exists("current_compiler")

View File

@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: reStructuredText Documentation Format
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Compiler: reStructuredText Documentation Format
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("current_compiler")
finish

View File

@ -7,7 +7,7 @@
Nvim API *API* *api*
Nvim exposes a powerful API that can be used by plugins and external processes
via |msgpack-rpc|, Lua and VimL (|eval-api|).
via |RPC|, |Lua| and VimL (|eval-api|).
Applications can also embed libnvim to work with the C API directly.
@ -135,6 +135,26 @@ nvim_command({command}) *nvim_command()*
Parameters:~
{command} Ex-command string
nvim_get_hl_by_name({name}, {rgb}) *nvim_get_hl_by_name()*
Gets a highlight definition by name.
Parameters:~
{name} Highlight group name
{rgb} Export RGB colors
Return:~
Highlight definition map
nvim_get_hl_by_id({hl_id}, {rgb}) *nvim_get_hl_by_id()*
Gets a highlight definition by id. |hlID()|
Parameters:~
{hl_id} Highlight id as returned by |hlID()|
{rgb} Export RGB colors
Return:~
Highlight definition map
nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
Passes input keys to Nvim. On VimL error: Does not fail, but
updates v:errmsg.
@ -151,7 +171,11 @@ nvim_input({keys}) *nvim_input()*
Unlike `nvim_feedkeys`, this uses a lower-level input buffer
and the call is not deferred. This is the most reliable way to
emulate real user input.
send real user input.
Note:
|keycodes| like <CR> are translated, so "<" is special. To
input a literal "<", send <LT>.
Attributes:~
{async}
@ -204,14 +228,11 @@ nvim_call_function({fname}, {args}) *nvim_call_function()*
Result of the function call
nvim_execute_lua({code}, {args}) *nvim_execute_lua()*
Execute lua code. Parameters might be passed, they are
available inside the chunk as `...`. The chunk can return a
value.
Execute lua code. Parameters (if any) are available as `...`
inside the chunk. The chunk can return a value.
To evaluate an expression, it must be prefixed with "return ".
For instance, to call a lua function with arguments sent in
and get its return value back, use the code "return
my_function(...)".
Only statements are executed. To evaluate an expression,
prefix it with `return`: return my_function(...)
Parameters:~
{code} lua code to execute
@ -220,7 +241,7 @@ nvim_execute_lua({code}, {args}) *nvim_execute_lua()*
Return:~
Return value of lua code if present or NIL.
nvim_strwidth({str}) *nvim_strwidth()*
nvim_strwidth({text}) *nvim_strwidth()*
Calculates the number of display cells occupied by `text`.
<Tab> counts as one cell.
@ -347,7 +368,7 @@ nvim_set_current_buf({buffer}) *nvim_set_current_buf()*
Sets the current buffer
Parameters:~
{id} Buffer handle
{buffer} Buffer handle
nvim_list_wins() *nvim_list_wins()*
Gets the current list of window handles
@ -365,7 +386,7 @@ nvim_set_current_win({window}) *nvim_set_current_win()*
Sets the current window
Parameters:~
{handle} Window handle
{window} Window handle
nvim_list_tabpages() *nvim_list_tabpages()*
Gets the current list of tabpage handles
@ -383,7 +404,7 @@ nvim_set_current_tabpage({tabpage}) *nvim_set_current_tabpage()*
Sets the current tabpage
Parameters:~
{handle} Tabpage handle
{tabpage} Tabpage handle
nvim_subscribe({event}) *nvim_subscribe()*
Subscribes to event broadcasts
@ -404,26 +425,25 @@ nvim_get_color_map() *nvim_get_color_map()*
TODO: Documentation
nvim_get_mode() *nvim_get_mode()*
Gets the current mode.
mode: Mode string. |mode()|
blocking: true if Nvim is waiting for input.
Attributes:~
{async}
Gets the current mode. |mode()| "blocking" is true if Nvim is
waiting for input.
Return:~
Dictionary { "mode": String, "blocking": Boolean }
Attributes:~
{async}
nvim_get_keymap({mode}) *nvim_get_keymap()*
Get a list of dictionaries describing global (i.e. non-buffer)
mappings Note that the "buffer" key will be 0 to represent
false.
Gets a list of dictionaries describing global (non-buffer)
mappings. The "buffer" key in the returned dictionary is
always zero.
Parameters:~
{mode} The abbreviation for the mode
{mode} Mode short-name ("n", "i", "v", ...)
Return:~
An array of maparg() like dictionaries describing mappings
Array of maparg()-like dictionaries describing mappings
nvim_get_api_info() *nvim_get_api_info()*
TODO: Documentation
@ -584,16 +604,16 @@ nvim_buf_get_changedtick({buffer}) *nvim_buf_get_changedtick()*
b:changedtickvalue.
nvim_buf_get_keymap({buffer}, {mode}) *nvim_buf_get_keymap()*
Get a list of dictionaries describing buffer-local mappings
Note that the buffer key in the dictionary will represent the
buffer handle where the mapping is present
Gets a list of dictionaries describing buffer-local mappings.
The "buffer" key in the returned dictionary reflects the
buffer handle where the mapping is present.
Parameters:~
{mode} The abbreviation for the mode
{buffer_id} Buffer handle
{mode} Mode short-name ("n", "i", "v", ...)
{buffer} Buffer handle
Return:~
An array of maparg() like dictionaries describing mappings
Array of maparg()-like dictionaries describing mappings
nvim_buf_set_var({buffer}, {name}, {value}) *nvim_buf_set_var()*
Sets a buffer-scoped (b:) variable
@ -670,24 +690,24 @@ nvim_buf_add_highlight({buffer}, {src_id}, {hl_group}, {line},
{col_start}, {col_end})
Adds a highlight to buffer.
This can be used for plugins which dynamically generate
highlights to a buffer (like a semantic highlighter or
linter). The function adds a single highlight to a buffer.
Unlike matchaddpos() highlights follow changes to line
numbering (as lines are inserted/removed above the highlighted
line), like signs and marks do.
Useful for plugins that dynamically generate highlights to a
buffer (like a semantic highlighter or linter). The function
adds a single highlight to a buffer. Unlike matchaddpos()
highlights follow changes to line numbering (as lines are
inserted/removed above the highlighted line), like signs and
marks do.
"src_id" is useful for batch deletion/updating of a set of
highlights. When called with src_id = 0, an unique source id
is generated and returned. Succesive calls can pass in it as
"src_id" to add new highlights to the same source group. All
highlights in the same group can then be cleared with
nvim_buf_clear_highlight. If the highlight never will be
manually deleted pass in -1 for "src_id".
`src_id` is useful for batch deletion/updating of a set of
highlights. When called with `src_id = 0`, an unique source id
is generated and returned. Successive calls can pass that
`src_id` to associate new highlights with the same source
group. All highlights in the same group can be cleared with
`nvim_buf_clear_highlight`. If the highlight never will be
manually deleted, pass `src_id = -1`.
If "hl_group" is the empty string no highlight is added, but a
new src_id is still returned. This is useful for an external
plugin to synchrounously request an unique src_id at
If `hl_group` is the empty string no highlight is added, but a
new `src_id` is still returned. This is useful for an external
plugin to synchrounously request an unique `src_id` at
initialization, and later asynchronously add and clear
highlights in response to buffer changes.
@ -696,7 +716,7 @@ nvim_buf_add_highlight({buffer}, {src_id}, {hl_group}, {line},
{src_id} Source group to use or 0 to use a new group,
or -1 for ungrouped highlight
{hl_group} Name of the highlight group to use
{line} Line to highlight
{line} Line to highlight (zero-indexed)
{col_start} Start of range of columns to highlight
{col_end} End of range of columns to highlight, or -1
to highlight to end of line
@ -948,4 +968,4 @@ nvim_ui_try_resize({width}, {height}) *nvim_ui_try_resize()*
nvim_ui_set_option({name}, {value}) *nvim_ui_set_option()*
TODO: Documentation
vim:tw=78:ts=8:ft=help:norl:
vim:tw=78:ts=8:ft=help:norl:

View File

@ -142,6 +142,8 @@ shell The Vim application. This can cover the whole screen (e.g.,
window View on a buffer. There can be several windows in Vim,
together with the command line, menubar, toolbar, etc. they
fit in the shell.
frame Windows are kept in a tree of frames. Each frame contains
a column, row, or window ("leaf" frame).
PROVIDERS *dev-provider*
@ -230,23 +232,47 @@ _not_ a Buffer). The common {action} "list" indicates that it lists all
bufs (plural) in the global context.
API-CLIENT *dev-api-client*
Package Naming ~
API client packages should NOT be named something ambiguous like "neovim" or
"python-client". Use "nvim" as a prefix/suffix to some other identifier
following ecosystem conventions.
For example, Python packages tend to have "py" in the name, so "pynvim" is
a good name: it's idiomatic and unambiguous. If the package is named "neovim",
it confuses users, and complicates documentation and discussions.
Examples of API-client package names:
GOOD: nvim-racket
GOOD: pynvim
BAD: python-client
BAD: neovim
Implementation ~
Consider using libmpack instead of the msgpack.org C/C++ library. libmpack is
small, efficient, and C89-compatible. It can be easily inlined in your
C project source, too. https://github.com/libmpack/libmpack/
EXTERNAL UI *dev-ui*
Compatibility ~
External UIs should be aware of the |api-contract|. In particular, future
versions of Nvim may add optional, new items to existing events. The API is
strongly backwards-compatible, but clients must not break if new fields are
added to existing events.
versions of Nvim may add new items to existing events. The API is strongly
backwards-compatible, but clients must not break if new fields are added to
existing events.
External UIs are expected to implement some common features.
Common Features ~
External UIs are expected to implement these common features:
- Cursor style (shape, color) should respond to the 'guicursor' properties
delivered with the mode_info_set UI event.
- Send the "super" key (Windows key, Apple key) as a |<D-| chord.
- Users may want to configure UI-specific options. The UI should publish the
|GUIEnter| autocmd after attaching to Nvim: >
doautocmd GUIEnter
Implementation ~
- Options can be monitored for changes by the |OptionSet| autocmd. E.g. if the
user sets the 'guifont' option, this autocmd notifies channel 42: >
autocmd OptionSet guifont call rpcnotify(42, 'option-changed', 'guifont', &guifont)
- cursor-shape change: 'guicursor' properties are sent in the mode_info_set UI
event.
vim:tw=78:ts=8:ft=help:norl:

View File

@ -236,7 +236,7 @@ If you want to keep the changed buffer without saving it, switch on the
*:vie* *:view*
:vie[w][!] [++opt] [+cmd] file
When used in Ex mode: Leave |Ex mode|, go back to
When used in Ex mode: Leave |Ex-mode|, go back to
Normal mode. Otherwise same as |:edit|, but set
'readonly' option for this buffer.

View File

@ -1785,7 +1785,7 @@ v:scrollstart String describing the script or function that caused the
*v:servername* *servername-variable*
*$NVIM_LISTEN_ADDRESS*
v:servername Default {Nvim} server address. Equivalent to
v:servername Default Nvim server address. Equivalent to
|$NVIM_LISTEN_ADDRESS| on startup. |serverstop()|
Read-only.
@ -1870,6 +1870,8 @@ v:termresponse The escape sequence returned by the terminal for the DA
*v:testing* *testing-variable*
v:testing Must be set before using `test_garbagecollect_now()`.
Also, when set certain error messages won't be shown for 2
seconds. (e.g. "'dictionary' option is empty")
*v:this_session* *this_session-variable*
v:this_session Full filename of the last loaded or saved session file. See
@ -3197,7 +3199,7 @@ execute({command} [, {silent}]) *execute()*
"" no `:silent` used
"silent" `:silent` used
"silent!" `:silent!` used
The default is 'silent'. Note that with "silent!", unlike
The default is "silent". Note that with "silent!", unlike
`:redir`, error messages are dropped.
To get a list of lines use |split()| on the result: >
@ -3775,10 +3777,10 @@ get({dict}, {key} [, {default}])
get({func}, {what})
Get item {what} from Funcref {func}. Possible values for
{what} are:
'name' The function name
'func' The function
'dict' The dictionary
'args' The list with arguments
"name" The function name
"func" The function
"dict" The dictionary
"args" The list with arguments
*getbufinfo()*
getbufinfo([{expr}])
@ -4915,42 +4917,48 @@ items({dict}) *items()*
entry and the value of this entry. The |List| is in arbitrary
order.
jobclose({job}[, {stream}]) {Nvim} *jobclose()*
Close {job}'s {stream}, which can be one of "stdin", "stdout",
"stderr" or "rpc" (closes the rpc channel for a job started
with the "rpc" option.) If {stream} is omitted, all streams
are closed. If the job is a pty job, this will then close the
pty master, sending SIGHUP to the job process.
jobclose({job}[, {stream}]) *jobclose()*
Close {stream} of |job-id| {job}, where {stream} is one of:
"stdin", "stdout", "stderr", "rpc" (RPC channel of a job
started with `"rpc":v:true`). If {stream} is omitted, all
streams are closed. If the job is a pty job, this will close
the pty master, sending SIGHUP to the job process.
jobpid({job}) {Nvim} *jobpid()*
Return the pid (process id) of {job}.
jobpid({job}) *jobpid()*
Return the PID (process id) of |job-id| {job}.
jobresize({job}, {width}, {height}) {Nvim} *jobresize()*
Resize {job}'s pseudo terminal window to {width} and {height}.
This function will fail if used on jobs started without the
"pty" option.
jobresize({job}, {width}, {height}) *jobresize()*
Resize the pseudo terminal window of |job-id| {job} to {width}
columns and {height} rows.
Fails if the job was not started with `"pty":v:true`.
jobsend({job}, {data}) {Nvim} *jobsend()*
Send data to {job} by writing it to the stdin of the process.
jobsend({job}, {data}) *jobsend()*
Writes to stdin of the process associated with |job-id| {job}.
Returns 1 if the write succeeded, 0 otherwise.
See |job-control| for more information.
See |job-control|.
{data} may be a string, string convertible, or a list. If
{data} is a list, the items will be separated by newlines and
any newlines in an item will be sent as a NUL. A final newline
can be sent by adding a final empty string. For example: >
{data} is a list, the items will be joined by newlines; any
newlines in an item will be sent as NUL. To send a final
newline, include a final empty string. Example: >
:call jobsend(j, ["abc", "123\n456", ""])
< will send "abc<NL>123<NUL>456<NL>".
If the job was started with the rpc option this function
cannot be used, instead use |rpcnotify()| and |rpcrequest()|
to communicate with the job.
jobsend() writes raw data, not RPC messages. If the job was
created with `"rpc":v:true` then the channel expects RPC
messages, use |rpcnotify()| and |rpcrequest()| instead.
jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
Spawns {cmd} as a job. If {cmd} is a |List| it is run
directly. If {cmd} is a |String| it is processed like this: >
jobstart({cmd}[, {opts}]) *jobstart()*
Spawns {cmd} as a job.
If {cmd} is a List it runs directly (no 'shell').
If {cmd} is a String it runs in the 'shell', like this: >
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
< (Only shows the idea; see |shell-unquoting| for full details.)
< (See |shell-unquoting| for details.)
Returns |job-id| on success, 0 on invalid arguments (or job
table is full), -1 if {cmd}[0] or 'shell' is not executable.
See |job-control| and |rpc|.
NOTE: on Windows if {cmd} is a List:
- cmd[0] must be an executable (not a "built-in"). If it is
@ -4962,6 +4970,7 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
by CommandLineToArgvW https://msdn.microsoft.com/bb776391
unless cmd[0] is some form of "cmd.exe".
*jobstart-options*
{opts} is a dictionary with these keys:
|on_stdout|: stdout event handler (function name or |Funcref|)
|on_stderr|: stderr event handler (function name or |Funcref|)
@ -4972,9 +4981,9 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
with the job over stdin and stdout. "on_stdout" is
then ignored, but "on_stderr" can still be used.
pty : If set, the job will be connected to a new pseudo
terminal, and the job streams are connected to
the master file descriptor. "on_stderr" is ignored
as all output will be received on stdout.
terminal and the job streams are connected to the
master file descriptor. "on_stderr" is ignored,
"on_stdout" receives all output.
width : (pty only) Width of the terminal screen
height : (pty only) Height of the terminal screen
@ -4982,43 +4991,31 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
detach : (non-pty only) Detach the job process from the
nvim process. The process will not get killed
when nvim exits. If the process dies before
nvim exits, on_exit will still be invoked.
nvim exits, "on_exit" will still be invoked.
{opts} is passed as |self| to the callback; the caller may
pass arbitrary data by setting other keys.
Returns:
- The job ID on success, which is used by |jobsend()| (or
|rpcnotify()| and |rpcrequest()| if "rpc" option was used)
and |jobstop()|
- 0 on invalid arguments or if the job table is full
- -1 if {cmd}[0] is not executable.
See |job-control| and |msgpack-rpc| for more information.
{opts} is passed as |self| dictionary to the callback; the
caller may set other keys to pass application-specific data.
jobstop({job}) {Nvim} *jobstop()*
Stop a job created with |jobstart()| by sending a `SIGTERM`
to the corresponding process. If the process doesn't exit
cleanly soon, a `SIGKILL` will be sent. When the job is
finally closed, the exit handler provided to |jobstart()| or
|termopen()| will be run.
See |job-control| for more information.
jobstop({job}) *jobstop()*
Stop |job-id| {job} by sending SIGTERM to the job process. If
the process does not terminate after a timeout then SIGKILL
will be sent. When the job terminates its |on_exit| handler
(if any) will be invoked.
See |job-control|.
jobwait({ids}[, {timeout}]) {Nvim} *jobwait()*
jobwait({ids}[, {timeout}]) *jobwait()*
Wait for a set of jobs to finish. The {ids} argument is a list
of ids for jobs that will be waited for. If passed, {timeout}
is the maximum number of milliseconds to wait. While this
function is executing, callbacks for jobs not in the {ids}
list can be executed. Also, the screen wont be updated unless
|:redraw| is invoked by one of the callbacks.
of |job-id|s to wait for. {timeout} is the maximum number of
milliseconds to wait. During jobwait(), callbacks for jobs not
in the {ids} list may be invoked. The screen will not redraw
unless |:redraw| is invoked by a callback.
Returns a list of integers with the same length as {ids}, with
each integer representing the wait result for the
corresponding job id. The possible values for the resulting
integers are:
* the job return code if the job exited
* -1 if the wait timed out for the job
* -2 if the job was interrupted
* -3 if the job id is invalid.
Returns a list of len({ids}) integers, where each integer is
the wait-result of the corresponding job. Each wait-result is:
Job exit-code, if the job exited
-1 if the wait timed out for the job
-2 if the job was interrupted
-3 if the |job-id| is invalid.
join({list} [, {sep}]) *join()*
Join the items in {list} together into one String.
@ -5652,7 +5649,7 @@ mode([expr]) Return a string that indicates the current mode.
i Insert
R Replace |R|
Rv Virtual Replace |gR|
t Terminal {Nvim}
t Terminal
c Command-line
cv Vim Ex mode |gQ|
ce Normal Ex mode |Q|
@ -7662,7 +7659,7 @@ taglist({expr}[, {filename}]) *taglist()*
may appear, they give the name of the entity the tag is
contained in.
The ex-command 'cmd' can be either an ex search pattern, a
The ex-command "cmd" can be either an ex search pattern, a
line number or a line number followed by a byte number.
If there are no matching tags, then an empty list is returned.
@ -8201,9 +8198,9 @@ There are four types of features:
Example: >
:if has("win32")
< *has-patch*
3. {Nvim} version. The "nvim-1.2.3" feature means that the Nvim version is
1.2.3 or later. Example: >
:if has("nvim-1.2.3")
3. Nvim version. The "nvim-0.2.1" feature means that the Nvim version is
0.2.1 or later. Example: >
:if has("nvim-0.2.1")
<
4. Included patches. The "patch123" feature means that patch 123 has been
included. Note that this form does not check the version of Vim, you need

View File

@ -58,7 +58,7 @@ whichever is lower. These are empty or white lines and lines starting
with a character in 'foldignore'. White space is skipped before checking for
characters in 'foldignore'. For C use "#" to ignore preprocessor lines.
When you want to ignore lines in another way, use the 'expr' method. The
When you want to ignore lines in another way, use the "expr" method. The
|indent()| function can be used in 'foldexpr' to get the indent of a line.
@ -133,7 +133,7 @@ fold level. But note that foldlevel() may return -1 if the level is not known
yet. And it returns the level at the start of the line, while a fold might
end in that line.
It may happened that folds are not updated properly. You can use |zx| or |zX|
It may happen that folds are not updated properly. You can use |zx| or |zX|
to force updating folds.

View File

@ -305,7 +305,7 @@ the applicable Vim version. The last field specifies the last modification
date of the file. Each field is separated by a tab.
At the bottom of the help file, place a Vim modeline to set the 'textwidth'
and 'tabstop' options and the 'filetype' to 'help'. Never set a global option
and 'tabstop' options and the 'filetype' to "help". Never set a global option
in such a modeline, that can have consequences undesired by whoever reads that
help.

View File

@ -24,7 +24,7 @@ the existing `package.cpath` are used. Example:
1. Given that
- 'runtimepath' contains `/foo/bar,/xxx;yyy/baz,/abc`;
- initial (defined at compile time or derived from
- initial (defined at compile-time or derived from
`$LUA_CPATH`/`$LUA_INIT`) `package.cpath` contains
`./?.so;/def/ghi/a?d/j/g.elf;/def/?.so`.
2. It finds `?`-containing suffixes `/?.so`, `/a?d/j/g.elf` and `/?.so`, in
@ -159,14 +159,17 @@ Examples:
>
:lua vim.api.nvim_command('echo "Hello, Nvim!"')
<
To see the Lua version: >
:lua print(_VERSION)
To see the LuaJIT version: >
:lua print(jit.version)
<
:[range]lua << {endmarker}
{script}
{endmarker}
Execute Lua script {script}.
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
@ -186,15 +189,8 @@ Example:
EOF
endfunction
Note that the 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)
<
Note that the `local` variables will disappear when block finishes. This is
not the case for globals.
*:luado*
:[range]luado {body} Execute Lua function "function (line, linenr) {body}

View File

@ -63,7 +63,7 @@ To see what version of Ruby you have: >
*:rubyfile* *:rubyf*
:rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as
":ruby load 'file'", but allows file name completion.
`:ruby load 'file'`, but allows file name completion.
Executing Ruby commands is not possible in the |sandbox|.

View File

@ -993,10 +993,12 @@ tag command action in Command-line editing mode ~
|c_<CR>| <CR> execute entered command
|c_CTRL-M| CTRL-M same as <CR>
|c_CTRL-N| CTRL-N after using 'wildchar' with multiple matches:
go to next match, otherwise: same as <Down>
go to next match, otherwise: recall older
command-line from history.
CTRL-O not used
|c_CTRL-P| CTRL-P after using 'wildchar' with multiple matches:
go to previous match, otherwise: same as <Up>
go to previous match, otherwise: recall older
command-line from history.
|c_CTRL-Q| CTRL-Q same as CTRL-V, unless it's used for terminal
control flow
|c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A}

View File

@ -1077,7 +1077,7 @@ items:
empty when non-zero this match will be added even when it is
an empty string
All of these except 'icase', 'dup' and 'empty' must be a string. If an item
All of these except "icase", "dup" and "empty" must be a string. If an item
does not meet these requirements then an error message is given and further
items in the list are not used. You can mix string and Dictionary items in
the returned list.

View File

@ -373,8 +373,7 @@ CTRL-{char} {char} typed as a control character; that is, typing {char}
*key-notation* *key-codes* *keycodes*
These names for keys are used in the documentation. They can also be used
with the ":map" command (insert the key name by pressing CTRL-K and then the
key you want the name for).
with the ":map" command.
notation meaning equivalent decimal value(s) ~
-----------------------------------------------------------------------

View File

@ -4,41 +4,30 @@
NVIM REFERENCE MANUAL by Thiago de Arruda
Nvim's facilities for job control *job-control*
Nvim job control *job-control*
Job control is a way to perform multitasking in Nvim, so scripts can spawn and
control multiple processes without blocking the current Nvim instance.
Type |gO| to see the table of contents.
==============================================================================
1. Introduction *job-control-intro*
Concepts
Job control is a simple way to perform multitasking in vimscript. Wikipedia
contains a more generic/detailed description:
Job Id *job-id*
"Job control in computing refers to the control of multiple tasks or Jobs on a
computer system, ensuring that they each have access to adequate resources to
perform correctly, that competition for limited resources does not cause a
deadlock where two or more jobs are unable to complete, resolving such
situations where they do occur, and terminating jobs that, for any reason, are
not performing as expected."
In a few words: It allows a vimscript programmer to concurrently spawn and
control multiple processes without blocking the current Nvim instance.
Nvim's job control was designed to be simple and familiar to vimscript
programmers, instead of being very powerful but complex. Unlike Vim's
facilities for calling with external commands, job control does not depend on
available shells, instead relying on OS functionality for process management.
Internally, Nvim job control is powered by libuv, which has a nice
cross-platform API for managing processes. See https://github.com/libuv/libuv
for details.
When a job starts it is assigned a number, unique for the life of the current
Nvim session. Functions like |jobstart()| return job ids. Functions like
|jobsend()|, |jobstop()|, |rpcnotify()|, and |rpcrequest()| take job ids.
==============================================================================
2. Usage *job-control-usage*
Usage *job-control-usage*
To control jobs, use the "job…" family of functions: |jobstart()|,
|jobsend()|, |jobstop()|.
Example: >
Job control is achieved by calling a combination of the |jobstart()|,
|jobsend()| and |jobstop()| functions. Here's an example:
>
function! s:JobHandler(job_id, data, event) dict
if a:event == 'stdout'
let str = self.shell.' stdout: '.join(a:data)
@ -58,35 +47,41 @@ Job control is achieved by calling a combination of the |jobstart()|,
let job1 = jobstart(['bash'], extend({'shell': 'shell 1'}, s:callbacks))
let job2 = jobstart(['bash', '-c', 'for i in {1..10}; do echo hello $i!; sleep 1; done'], extend({'shell': 'shell 2'}, s:callbacks))
To test the above script, copy it to a file ~/foo.vim and run it: >
nvim -u ~/foo.vim
<
To test the above, copy it to the file ~/jobcontrol.vim and start with a clean
nvim instance:
>
nvim -u NONE -S ~/jobcontrol.vim
<
Here's what is happening:
Description of what happens:
- Two bash shells are spawned by |jobstart()| with their stdin/stdout/stderr
streams connected to nvim.
- The first shell is idle, waiting to read commands from its stdin.
- The second shell is started with -c which executes the command (a for-loop
printing 0 through 9) and then exits.
- `JobHandler()` callback is passed to |jobstart()| to handle various job
events. It displays stdout/stderr data received from the shells.
- Two bash instances are spawned by |jobstart()| with their stdin/stdout/stderr
connected to nvim.
- The first shell is idle, waiting to read commands from its stdin.
- The second shell is started with the -c argument, causing it to execute a
command then exit. In this case, the command is a for loop that will print 0
through 9 then exit.
- The `JobHandler()` function is a callback passed to |jobstart()| to handle
various job events. It takes care of displaying stdout/stderr received from
the shells.
*on_stdout* *on_stderr* *on_exit*
- The arguments passed to `JobHandler()` are:
0: The job id
1: If the event is "stdout" or "stderr", a list with lines read from the
corresponding stream. For "exit", it is the status returned by the
program.
2: The event type, which is "stdout", "stderr" or "exit".
*on_stdout*
Arguments passed to on_stdout callback:
0: |job-id|
1: List of lines read from the stream. If the last item is not "" (empty
string), then it is an incomplete line that might be continued at the
next on_stdout invocation. See Note 2 below.
2: Event type: "stdout"
*on_stderr*
Arguments passed to on_stderr callback:
0: |job-id|
1: List of lines read from the stream. If the last item is not "" (empty
string), then it is an incomplete line that might be continued at the
next on_stderr invocation. See Note 2 below.
2: Event type: "stderr"
*on_exit*
Arguments passed to on_exit callback:
0: |job-id|
1: Exit-code of the process.
2: Event type: "exit"
Note: Buffered stdout/stderr data which has not been flushed by the sender
will not trigger the "stdout" callback (but if the process ends, the
"exit" callback will be triggered).
will not trigger the on_stdout/on_stderr callback (but if the process
ends, the on_exit callback will be invoked).
For example, "ruby -e" buffers output, so small strings will be
buffered unless "auto-flushing" ($stdout.sync=true) is enabled. >
function! Receive(job_id, data, event)
@ -97,9 +92,25 @@ Here's what is happening:
\ {'on_stdout': 'Receive'})
< https://github.com/neovim/neovim/issues/1592
The options dictionary is passed as the "self" variable to the callback
function. Here's a more object-oriented version of the above:
>
Note 2:
Job event handlers may receive partial (incomplete) lines. For a given
invocation of on_stdout/on_stderr, `a:data` is not guaranteed to end
with a newline.
- `abcdefg` may arrive as `['abc']`, `['defg']`.
- `abc\nefg` may arrive as `['abc', '']`, `['efg']` or `['abc']`,
`['','efg']`, or even `['ab']`, `['c','efg']`.
Easy way to deal with this: initialize a list as `['']`, then append
to it as follows: >
let s:chunks = ['']
func! s:on_stdout(job_id, data, event) dict
let s:chunks[-1] .= a:data[0]
call extend(s:chunks, a:data[1:])
endf
<
The |jobstart-options| dictionary is passed as |self| to the callback.
The above example could be written in this "object-oriented" style: >
let Shell = {}
function Shell.on_stdout(_job_id, data, event)
@ -126,19 +137,13 @@ function. Here's a more object-oriented version of the above:
let instance = Shell.new('bomb',
\ 'for i in $(seq 9 -1 1); do echo $i 1>&$((i % 2 + 1)); sleep 1; done')
<
To send data to the job's stdin, one can use the |jobsend()| function, like
this:
>
To send data to the job's stdin, use |jobsend()|: >
:call jobsend(job1, "ls\n")
:call jobsend(job1, "invalid-command\n")
:call jobsend(job1, "exit\n")
<
A job may be killed at any time with the |jobstop()| function:
>
A job may be killed with |jobstop()|: >
:call jobstop(job1)
<
When |jobstop()| is called, `SIGTERM` will be sent to the job. If a job does
not exit after 2 seconds, `SIGKILL` will be sent.
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -556,7 +556,8 @@ Upper and lowercase differences are ignored.
*map-comments*
It is not possible to put a comment after these commands, because the '"'
character is considered to be part of the {lhs} or {rhs}.
character is considered to be part of the {lhs} or {rhs}. However, one can
use |", since this starts a new, empty command with a comment.
*map_bar* *map-bar*
Since the '|' character is used to separate a map command from the next

View File

@ -172,6 +172,7 @@ Send an e-mail to the Vim maintainer <maintainer@vim.org>.
special characters like "&" and "<Tab>" need to be
included. Spaces and dots need to be escaped with a
backslash, just like in other |:menu| commands.
Case in {english} is ignored.
See the $VIMRUNTIME/lang directory for examples.

View File

@ -184,7 +184,7 @@ l or *l*
*$* *<End>* *<kEnd>*
$ or <End> To the end of the line. When a count is given also go
[count - 1] lines downward |inclusive|.
[count - 1] lines downward. |inclusive| motion.
In Visual mode the cursor goes to just after the last
character in the line.
When 'virtualedit' is active, "$" may move the cursor

View File

@ -175,7 +175,7 @@ contains information that makes this task easier (see also |rpc-types|):
even more strongly-typed APIs.
- Functions that are considered to be methods that operate on instances of
Nvim special types (msgpack EXT) will have the `"method"` attribute set to
`true`. The reciever type is the type of the first argument. The method
`true`. The receiver type is the type of the first argument. The method
names are prefixed with `nvim_` plus a shortened type name, e.g.
`nvim_buf_get_lines` represents the `get_lines` method of a Buffer instance.
- Global functions have `"method"` set to `false` and are prefixed with just

View File

@ -959,8 +959,8 @@ A jump table for the options with a short description can be found at |Q_op|.
wildmode More matches in |cmdline-completion| available
(depends on the 'wildmode' setting).
This is most useful, to fine tune when in insert mode the bell should
be rung. For normal mode and ex commands, the bell is often rung to
This is most useful to fine tune when in Insert mode the bell should
be rung. For Normal mode and Ex commands, the bell is often rung to
indicate that an error occurred. It can be silenced by adding the
"error" keyword.
@ -3099,6 +3099,28 @@ A jump table for the options with a short description can be found at |Q_op|.
global
The builtin |highlight-groups| cannot be changed.
*'history'* *'hi'*
'history' 'hi' number (Vim default: 10000, Vi default: 0)
global
A history of ":" commands, and a history of previous search patterns
is remembered. This option decides how many entries may be stored in
each of these histories (see |cmdline-editing|).
The maximum value is 10000.
*'hkmap'* *'hk'* *'nohkmap'* *'nohk'*
'hkmap' 'hk' boolean (default off)
global
When on, the keyboard is mapped for the Hebrew character set.
Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
toggle this option. See |rileft.txt|.
*'hkmapp'* *'hkp'* *'nohkmapp'* *'nohkp'*
'hkmapp' 'hkp' boolean (default off)
global
When on, phonetic keyboard mapping is used. 'hkmap' must also be on.
This is useful if you have a non-Hebrew keyboard.
See |rileft.txt|.
*'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'*
'hlsearch' 'hls' boolean (default on)
global
@ -3122,28 +3144,6 @@ A jump table for the options with a short description can be found at |Q_op|.
You can specify whether the highlight status is restored on startup
with the 'h' flag in 'shada' |shada-h|.
*'history'* *'hi'*
'history' 'hi' number (Vim default: 10000, Vi default: 0)
global
A history of ":" commands, and a history of previous search patterns
is remembered. This option decides how many entries may be stored in
each of these histories (see |cmdline-editing|).
The maximum value is 10000.
*'hkmap'* *'hk'* *'nohkmap'* *'nohk'*
'hkmap' 'hk' boolean (default off)
global
When on, the keyboard is mapped for the Hebrew character set.
Normally you would set 'allowrevins' and use CTRL-_ in insert mode to
toggle this option. See |rileft.txt|.
*'hkmapp'* *'hkp'* *'nohkmapp'* *'nohkp'*
'hkmapp' 'hkp' boolean (default off)
global
When on, phonetic keyboard mapping is used. 'hkmap' must also be on.
This is useful if you have a non-Hebrew keyboard.
See |rileft.txt|.
*'icon'* *'noicon'*
'icon' boolean (default off, on when title can be restored)
global
@ -5668,7 +5668,7 @@ A jump table for the options with a short description can be found at |Q_op|.
word. The expression must evaluate to a List of
Lists, each with a suggestion and a score.
Example:
[['the', 33], ['that', 44]]
[['the', 33], ['that', 44]] ~
Set 'verbose' and use |z=| to see the scores that the
internal methods use. A lower score is better.
This may invoke |spellsuggest()| if you temporarily
@ -6759,7 +6759,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Highlights of vertical separators are determined by the window to the
left of the separator. The highlight of a tabpage in |tabline| is
determine by the last-focused window of the tabpage. Highlights of
determined by the last-focused window of the tabpage. Highlights of
the popupmenu are determined by the current window. Highlights in the
message area cannot be overridden.

View File

@ -853,10 +853,13 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
\%V Match inside the Visual area. When Visual mode has already been
stopped match in the area that |gv| would reselect.
This is a |/zero-width| match. To make sure the whole pattern is
inside the Visual area put it at the start and end of the pattern,
e.g.: >
inside the Visual area put it at the start and just before the end of
the pattern, e.g.: >
/\%Vfoo.*ba\%Vr
< This also works if only "foo bar" was Visually selected. This: >
/\%Vfoo.*bar\%V
< Only works for the current buffer.
< would match "foo bar" if the Visual selection continues after the "r".
Only works for the current buffer.
*/\%#* *cursor-position*
\%# Matches with the cursor position. Only works when matching in a

View File

@ -133,8 +133,8 @@ registers. Nvim looks for these clipboard tools, in order of priority:
- |g:clipboard|
- pbcopy/pbpaste (macOS)
- xclip
- xsel (newer alternative to xclip)
- xsel (if $DISPLAY is set)
- xclip (if $DISPLAY is set)
- lemonade (for SSH) https://github.com/pocke/lemonade
- doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/
- win32yank (Windows)
@ -162,13 +162,11 @@ process has not died, the cached selection is applied.
==============================================================================
X11 selection mechanism *clipboard-x11* *x11-selection*
The clipboard providers for X11 store text in what is known as "selections".
Selections are "owned" by an application, so when the application is closed,
the selection text is lost.
X11 clipboard providers store text in "selections". Selections are owned by an
application, so when the application gets closed, the selection text is lost.
The contents of selections are held by the originating application (e.g., upon
a copy), and only passed on to another application when that other application
asks for them (e.g., upon a paste).
a copy), and only passed to another application when that other application
requests them (e.g., upon a paste).
*quoteplus* *quote+*

View File

@ -32,10 +32,13 @@ The 'errorformat' option should be set to match the error messages from your
compiler (see |errorformat| below).
*location-list* *E776*
A location list is similar to a quickfix list and contains a list of positions
in files. A location list is associated with a window and each window can
have a separate location list. A location list can be associated with only
one window. The location list is independent of the quickfix list.
A location list is a window-local quickfix list. You get one after commands
like `:lvimgrep`, `:lgrep`, `:lhelpgrep`, `:lmake`, etc., which create a
location list instead of a quickfix list as the corresponding `:vimgrep`,
`:grep`, `:helpgrep`, `:make` do.
A location list is associated with a window and each window can have a
separate location list. A location list can be associated with only one
window. The location list is independent of the quickfix list.
When a window with a location list is split, the new window gets a copy of the
location list. When there are no longer any references to a location list,
@ -1362,7 +1365,7 @@ prints information about entering a directory in the form "Making all in dir".
Making all in dir2 ./dir1/dir2
This can be solved by printing absolute directories in the "enter directory"
message or by printing "leave directory" messages..
message or by printing "leave directory" messages.
To avoid this problem, ensure to print absolute directory names and "leave
directory" messages.

View File

@ -211,7 +211,7 @@ past its buffer's limits.
However, if a 'scrollbind' window that has a relative offset that is past its
buffer's limits is given the cursor focus, the other 'scrollbind' windows must
jump to a location where the current window's relative offset is valid. This
behavior can be changed by clearing the 'jump' flag from the 'scrollopt'
behavior can be changed by clearing the "jump" flag from the 'scrollopt'
option.
*syncbind* *:syncbind* *:sync*

View File

@ -2616,9 +2616,9 @@ later, and part earlier) adds.
RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
You may set what syntax definitions should be used for code blocks via
You may set what syntax definitions should be used for code blocks via >
let rst_syntax_code_list = ['vim', 'lisp', ...]
<
REXX *rexx.vim* *ft-rexx-syntax*

View File

@ -28,6 +28,7 @@ a dictionary with these (optional) keys:
`ext_popupmenu` Externalize the popupmenu. |ui-popupmenu|
`ext_tabline` Externalize the tabline. |ui-tabline|
`ext_cmdline` Externalize the cmdline. |ui-cmdline|
`ext_wildmenu` Externalize the wildmenu. |ui-ext-wildmenu|
Nvim will then send msgpack-rpc notifications, with the method name "redraw"
and a single argument, an array of screen update events.
@ -201,21 +202,21 @@ Popupmenu Events *ui-popupmenu*
Only sent if `ext_popupmenu` option is set in |ui-options|
["popupmenu_show", items, selected, row, col]
`items` is an array of the items to show, the
items are themselves arrays of the form [word, kind, menu, info]
as defined at |complete-items|, except that `word` is replaced by
`abbr` if present. `selected` is the initially selected item, either a
zero-based index into the array of items, or -1 if no item is
selected. `row` and `col` is the anchor position, where the first
character of the completed word will be.
Show |popupmenu-completion|. `items` is an array of completion items
to show; each item is an array of the form [word, kind, menu, info] as
defined at |complete-items|, except that `word` is replaced by `abbr`
if present. `selected` is the initially-selected item, a zero-based
index into the array of items (-1 if no item is selected). `row` and
`col` give the anchor position, where the first character of the
completed word will be.
["popupmenu_select", selected]
An item in the currently displayed popupmenu is selected. `selected`
is either a zero-based index into the array of items from the last
`popupmenu_show` event, or -1 if no item is selected.
Select an item in the current popupmenu. `selected` is a zero-based
index into the array of items from the last popupmenu_show event, or
-1 if no item is selected.
["popupmenu_hide"]
The popupmenu is hidden.
Hide the popupmenu.
==============================================================================
Tabline Events *ui-tabline*
@ -237,7 +238,7 @@ Only sent if `ext_cmdline` option is set in |ui-options|
content: List of [attrs, string]
[[{}, "t"], [attrs, "est"], ...]
Triggered when the user types in the cmdline.
Triggered when the cmdline is displayed or changed.
The `content` is the full content that should be displayed in the
cmdline, and the `pos` is the position of the cursor that in the
cmdline. The content is divided into chunks with different highlight
@ -265,7 +266,7 @@ Only sent if `ext_cmdline` option is set in |ui-options|
`shift` is true the text after the cursor should be shifted, otherwise
it should overwrite the char at the cursor.
Should be hidden at next cmdline_pos.
Should be hidden at next cmdline_show.
["cmdline_hide"]
Hide the cmdline.
@ -286,5 +287,22 @@ Only sent if `ext_cmdline` option is set in |ui-options|
["cmdline_block_hide"]
Hide the block.
==============================================================================
Wildmenu Events *ui-wildmenu*
Only sent if `ext_wildmenu` option is set in |ui-options|
["wildmenu_show", items]
Activate the wildmenu (command-line completion). `items` is an array
with the completion items.
["wildmenu_select", selected]
Select an item in the current wildmenu. `selected` is a zero-based
index into the array of items from the last wildmenu_show event, or -1
if no item is selected.
["wildmenu_hide"]
Hide the wildmenu.
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -543,7 +543,7 @@ Summary: *help-summary* >
8) Ex-commands always start with ":", so to go to the :s command help: >
:help :s
9) Commands specifically for debugging start with ">". To go to to the help
9) Commands specifically for debugging start with ">". To go to the help
for the "cont" debug command: >
:help >cont
@ -652,7 +652,7 @@ Summary: *help-summary* >
22) Autocommand events can be found by their name: >
:help BufWinLeave
< To see all possible events: >
:help autocommands-events
:help autocommand-events
23) Command-line switches always start with "-". So for the help of the -f
command switch of Vim use: >

View File

@ -95,7 +95,7 @@ Then there is the ":let i += 1" command. This does the same thing as
to the same variable.
The example was given to explain the commands, but would you really want to
make such a loop it can be written much more compact: >
make such a loop, it can be written much more compact: >
:for i in range(1, 4)
: echo "count is" i
@ -692,6 +692,7 @@ Other computation: *bitwise-function*
Variables: *var-functions*
type() type of a variable
islocked() check if a variable is locked
funcref() get a Funcref for a function reference
function() get a Funcref for a function name
getbufvar() get a variable value from a specific buffer
setbufvar() set a variable in a specific buffer
@ -883,6 +884,7 @@ GUI: *gui-functions*
getfontname() get name of current font being used
getwinposx() X position of the GUI Vim window
getwinposy() Y position of the GUI Vim window
balloon_show() set the balloon content
Vim server: *server-functions*
serverlist() return the list of server names
@ -1541,7 +1543,7 @@ WHITE SPACE
Blank lines are allowed and ignored.
Leading whitespace characters (blanks and TABs) are always ignored. The
whitespaces between parameters (e.g. between the 'set' and the 'cpoptions' in
whitespaces between parameters (e.g. between the "set" and the "cpoptions" in
the example below) are reduced to one blank character and plays the role of a
separator, the whitespaces after the last (visible) character may or may not
be ignored depending on the situation, see below.

View File

@ -60,14 +60,17 @@ a complete and centralized reference of those differences.
MAJOR COMPONENTS ~
Embedded terminal emulator |terminal|
RPC API |RPC|
Shared data |shada|
XDG base directories |xdg|
API |API|
Lua scripting |lua|
Job control |job-control|
Remote plugins |remote-plugin|
Python plugins |provider-python|
Clipboard integration |provider-clipboard|
Providers
Clipboard |provider-clipboard|
Python plugins |provider-python|
Ruby plugins |provider-ruby|
Shared data |shada|
Embedded terminal |terminal|
XDG base directories |xdg|
USER EXPERIENCE ~
@ -87,6 +90,16 @@ Working intuitively and consistently is a major goal of Nvim.
- Vim's internal test functions (test_autochdir(), test_settime(), etc.) are
not exposed (nor implemented); instead Nvim has a robust API.
- Behaviors, options, documentation are removed if they cost users more time
than they save.
Usability details have been improved where the benefit outweighs any
backwards-compatibility cost. Some examples:
- |K| in help documents can be used like |CTRL-]|.
- Directories for 'directory' and 'undodir' are auto-created.
- Terminal features such as 'guicursor' are enabled where possible.
ARCHITECTURE ~
External plugins run in separate processes. |remote-plugin| This improves
@ -130,6 +143,7 @@ Commands:
|:checkhealth|
|:drop| is available on all platforms
|:Man| is available by default, with many improvements such as completion
|:tchdir| tab-local |current-directory|
Functions:
|dictwatcheradd()| notifies a callback whenever a |Dict| is modified

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Jan 06
" Last Change: 2017 Mar 13
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@ -1362,6 +1362,9 @@ endfunc
" Not Quite C
au BufNewFile,BufRead *.nqc setf nqc
" NSE - Nmap Script Engine - uses Lua syntax
au BufNewFile,BufRead *.nse setf lua
" NSIS
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
@ -2276,6 +2279,9 @@ au BufNewFile,BufRead .tidyrc,tidyrc setf tidy
" TF mud client
au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
" tmux configuration
au BufNewFile,BufRead {.,}tmux*.conf setf tmux
" TPP - Text Presentation Program
au BufNewFile,BufReadPost *.tpp setf tpp

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: a2ps(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: a2ps(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: alsaconf(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: alsaconf(8) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: GNU Arch inventory file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: GNU Arch inventory file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Automake
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Automake
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: BDF font definition
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: BDF font definition
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: calendar(1) input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: calendar(1) input file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,6 +1,6 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-12-04
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: generic configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: generic configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: CRM114
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: CRM114
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: CSS
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: CSS
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: cvs(1) RC file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: cvs(1) RC file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,6 +1,6 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-12-04
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: dict(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: dict(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: dictd(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: dictd(8) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: dircolors(1) input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: dircolors(1) input file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Configuration File (ini file) for MSDOS/MS Windows
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Configuration File (ini file) for MSDOS/MS Windows
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: elinks(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: elinks(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: eterm(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: eterm(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: fetchmail(1) RC File
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: fetchmail(1) RC File
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim ftplugin file
" Language: FrameScript
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-19
" Language: FrameScript
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-19
let s:cpo_save = &cpo
set cpo&vim

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: gpg(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: gpg(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: group(5) user group file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: group(5) user group file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: grub(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: grub(8) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,8 +1,8 @@
" Vim filetype plugin
" Language: Hamster Script
" Version: 2.0.6.0
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Last Change: Wed Nov 08 2006 12:03:09 PM
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Mar 07
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -13,6 +13,7 @@ endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
set cpo-=C
let b:undo_ftplugin = "setl fo< com< tw< commentstring<"

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Haskell
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Haskell
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Vim help file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Vim help file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,6 +1,6 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-12-04
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-12-04
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: hosts_access(5) control file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: hosts_access(5) control file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: indent(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: indent(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: ld(1) script
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: ld(1) script
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: lftp(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: lftp(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: libao.conf(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: libao.conf(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: limits(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: limits(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: login.access(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: login.access(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: login.defs(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: login.defs(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: m4
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: m4
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,6 +1,6 @@
" Vim filetype plugin file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Mailcap configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Mailcap configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man.conf(5) - man configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: man.conf(5) - man configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: modules.conf(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: modules.conf(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: mplayer(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: mplayer(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: mutt RC File
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Language: mutt RC File
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: nanorc(5) - GNU nano configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: nanorc(5) - GNU nano configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: netrc(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: netrc(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim ftplugin file
" Language: NSIS script
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: NSIS script
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
let s:cpo_save = &cpo
set cpo&vim

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: pam(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: pam(8) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: passwd(5) password file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: passwd(5) password file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: pinfo(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: pinfo(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: procmail(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: procmail(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Prolog
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Prolog
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: protocols(5) - Internet protocols definition file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: protocols(5) - Internet protocols definition file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Quake[1-3] configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Quake[1-3] configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Racc input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Racc input file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: readline(3) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: readline(3) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Relax NG compact syntax
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Relax NG compact syntax
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: reStructuredText documentation format
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: reStructuredText documentation format
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: screen(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: screen(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: sensors.conf(5) - libsensors configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: sensors.conf(5) - libsensors configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: services(5) - Internet network services list
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: services(5) - Internet network services list
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: setserial(8) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: setserial(8) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Sieve filtering language input file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: Sieve filtering language input file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: RFC 2614 - An API for Service Location configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: RFC 2614 - An API for Service Location configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: RFC 2614 - An API for Service Location registration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: RFC 2614 - An API for Service Location registration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: RFC 2614 - An API for Service Location SPI file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: RFC 2614 - An API for Service Location SPI file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,8 +1,8 @@
" SQL filetype plugin file
" Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase)
" Version: 11.0
" Version: 12.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2013 May 13
" Last Change: 2017 Mar 07
" Download: http://vim.sourceforge.net/script.php?script_id=454
" For more details please use:
@ -36,6 +36,14 @@
"
" History
"
" Version 12.0 (April 2013)
"
" NF: Added support for "BEGIN TRY ... END TRY ... BEGIN CATCH ... END CATCH
" BF: This plugin is designed to be used with other plugins to enable the
" SQL completion with Perl, Python, Java, ... The loading mechanism
" was not checking if the SQL objects were created, which can lead to
" the plugin not loading the SQL support.
"
" Version 11.0 (May 2013)
"
" NF: Updated to use SyntaxComplete's new regex support for syntax groups.
@ -80,15 +88,17 @@
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
" This ftplugin can be used with other ftplugins. So ensure loading
" happens if all elements of this plugin have not yet loaded.
if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
finish
endif
let s:save_cpo = &cpo
set cpo&vim
" Disable autowrapping for code, but enable for comments
" t Auto-wrap text using textwidth
" t Auto-wrap text using textwidth
" c Auto-wrap comments using textwidth, inserting the current comment
" leader automatically.
setlocal formatoptions-=t
@ -171,6 +181,9 @@ if !exists("*SQL_SetType")
if exists("b:current_syntax")
" echomsg 'SQLSetType - clearing syntax'
syntax clear
if exists("b:current_syntax")
unlet b:current_syntax
endif
endif
if exists("b:did_indent")
" echomsg 'SQLSetType - clearing indent'
@ -187,7 +200,7 @@ if !exists("*SQL_SetType")
" Do not specify a buffer local variable if it is
" the default value
if new_sql_type == 'sql'
let new_sql_type = 'sqloracle'
let new_sql_type = 'sqloracle'
endif
let b:sql_type_override = new_sql_type
@ -234,25 +247,26 @@ if exists("b:sql_type_override")
" echo 'sourcing buffer ftplugin/'.b:sql_type_override.'.vim'
if globpath(&runtimepath, 'ftplugin/'.b:sql_type_override.'.vim') != ''
exec 'runtime ftplugin/'.b:sql_type_override.'.vim'
" else
" echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default'
" else
" echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default'
endif
elseif exists("g:sql_type_default")
" echo 'sourcing global ftplugin/'.g:sql_type_default.'.vim'
if globpath(&runtimepath, 'ftplugin/'.g:sql_type_default.'.vim') != ''
exec 'runtime ftplugin/'.g:sql_type_default.'.vim'
" else
" echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default'
" else
" echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default'
endif
endif
" If the above runtime command succeeded, do not load the default settings
if exists("b:did_ftplugin")
finish
" as they should have already been loaded from a previous run.
if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql'
finish
endif
let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" .
\ " | unlet! b:browsefilter b:match_words"
\ " | unlet! b:browsefilter b:match_words"
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
@ -261,7 +275,7 @@ let b:current_ftplugin = 'sql'
" Win32 can filter files in the browse dialog
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" .
\ "All Files (*.*)\t*.*\n"
\ "All Files (*.*)\t*.*\n"
endif
" Some standard expressions for use with the matchit strings
@ -312,14 +326,24 @@ if !exists("b:match_words")
" WHEN column_not_found THEN
" WHEN OTHERS THEN
"
" begin try
" end try
" begin catch
" end catch
"
" create[ or replace] procedure|function|event
" \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
" \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
" For ColdFusion support
setlocal matchpairs+=<:>
let b:match_words = &matchpairs .
\ ',\<begin\>:\<end\>\W*$,'.
\
\ ',\%(\<begin\)\%(\s\+\%(try\|catch\)\>\)\@!:\<end\>\W*$,'.
\
\ '\<begin\s\+try\>:'.
\ '\<end\s\+try\>:'.
\ '\<begin\s\+catch\>:'.
\ '\<end\s\+catch\>,'.
\
\ s:notend . '\<if\>:'.
\ '\<elsif\>\|\<elseif\>\|\<else\>:'.
\ '\<end\s\+if\>,'.
@ -339,14 +363,14 @@ if !exists("b:match_words")
\ '\%(\<create\s\+' . s:or_replace . '\)\?'.
\ '\%(function\|procedure\|event\):'.
\ '\<returns\?\>'
" \ '\<begin\>\|\<returns\?\>:'.
" \ '\<end\>\(;\)\?\s*$'
" \ '\<exception\>:'.s:when_no_matched_or_others.
" \ ':\<when\s\+others\>,'.
"
" \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'.
" \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'.
" \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' .
" \ '\<begin\>\|\<returns\?\>:'.
" \ '\<end\>\(;\)\?\s*$'
" \ '\<exception\>:'.s:when_no_matched_or_others.
" \ ':\<when\s\+others\>,'.
"
" \ '\%(\<exception\>\|\%('. s:notend . '\<case\>\)\):'.
" \ '\%(\<default\>\|'.s:when_no_matched_or_others.'\):'.
" \ '\%(\%(\<when\s\+others\>\)\|\<end\s\+case\>\),' .
endif
" Define how to find the macro definition of a variable using the various

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: OpenSSH client configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: OpenSSH client configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: sudoers(5) configuration files
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: sudoers(5) configuration files
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
if exists("b:did_ftplugin")
finish

Some files were not shown because too many files have changed in this diff Show More