aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-04-21 00:33:12 +0300
committerZyX <kp-pav@yandex.ru>2017-04-21 00:33:12 +0300
commitd463c9e03a79e981faaaa985b1160c292d08e172 (patch)
tree8ebfb9bc003f76a6be2d84035c52c6fdd24afbb5 /runtime
parentc289986c89dd0189ed8ab709bf2eb822c493542a (diff)
parent19646a2985e54dfc561a90a70054522afc052a45 (diff)
downloadrneovim-d463c9e03a79e981faaaa985b1160c292d08e172.tar.gz
rneovim-d463c9e03a79e981faaaa985b1160c292d08e172.tar.bz2
rneovim-d463c9e03a79e981faaaa985b1160c292d08e172.zip
Merge branch 'master' into lazier-arg_errmsg-gettext
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/health.vim4
-rw-r--r--runtime/autoload/health/nvim.vim20
-rw-r--r--runtime/autoload/health/provider.vim8
-rw-r--r--runtime/autoload/provider/clipboard.vim2
-rw-r--r--runtime/autoload/provider/python.vim2
-rw-r--r--runtime/autoload/provider/python3.vim2
-rw-r--r--runtime/autoload/provider/pythonx.vim5
-rw-r--r--runtime/doc/api.txt25
-rw-r--r--runtime/doc/develop.txt61
-rw-r--r--runtime/doc/eval.txt157
-rw-r--r--runtime/doc/index.txt3
-rw-r--r--runtime/doc/map.txt51
-rw-r--r--runtime/doc/options.txt6
-rw-r--r--runtime/doc/quickref.txt2
-rw-r--r--runtime/doc/sign.txt6
-rw-r--r--runtime/doc/starting.txt2
-rw-r--r--runtime/doc/syntax.txt7
-rw-r--r--runtime/doc/tagsrch.txt38
-rw-r--r--runtime/doc/vi_diff.txt12
-rw-r--r--runtime/doc/windows.txt6
-rw-r--r--runtime/filetype.vim16
-rw-r--r--runtime/ftplugin/rmd.vim16
-rw-r--r--runtime/ftplugin/scala.vim37
-rw-r--r--runtime/indent/fortran.vim10
-rw-r--r--runtime/indent/javascript.vim96
-rw-r--r--runtime/indent/rnoweb.vim14
-rw-r--r--runtime/indent/scala.vim609
-rw-r--r--runtime/indent/teraterm.vim10
-rw-r--r--runtime/indent/yaml.vim35
-rw-r--r--runtime/keymap/pinyin.vim2
-rw-r--r--runtime/keymap/russian-jcukenmac.vim94
-rw-r--r--runtime/optwin.vim6
-rw-r--r--runtime/plugin/matchit.vim24
-rw-r--r--runtime/syntax/fortran.vim34
-rw-r--r--runtime/syntax/muttrc.vim358
-rw-r--r--runtime/syntax/python.vim31
-rw-r--r--runtime/syntax/r.vim6
-rw-r--r--runtime/syntax/rhelp.vim3
-rw-r--r--runtime/syntax/rmd.vim4
-rw-r--r--runtime/syntax/rrst.vim4
-rw-r--r--runtime/syntax/rst.vim14
-rw-r--r--runtime/syntax/scala.vim231
-rw-r--r--runtime/syntax/sh.vim48
-rw-r--r--runtime/syntax/teraterm.vim6
-rw-r--r--runtime/syntax/vim.vim4
45 files changed, 1626 insertions, 505 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim
index b0791eb19d..8f45adcff1 100644
--- a/runtime/autoload/health.vim
+++ b/runtime/autoload/health.vim
@@ -33,7 +33,7 @@ function! health#check(plugin_names) abort
setlocal wrap breakindent
setlocal filetype=markdown
setlocal conceallevel=2 concealcursor=nc
- setlocal keywordprg=:help
+ setlocal keywordprg=:help iskeyword=@,48-57,_,192-255,-,#
call s:enhance_syntax()
if empty(healthchecks)
@@ -88,7 +88,7 @@ endfunction
" Changes ':h clipboard' to ':help |clipboard|'.
function! s:help_to_link(s) abort
- return substitute(a:s, '\v[''"]?:h%[elp] ([^''"]+)[''"]?', '":help |\1|"', 'g')
+ return substitute(a:s, '\v:h%[elp] ([^|][^"\r\n]+)', ':help |\1|', 'g')
endfunction
" Format a message for a specific report item
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim
index ca62de84d8..4c6aa0eb04 100644
--- a/runtime/autoload/health/nvim.vim
+++ b/runtime/autoload/health/nvim.vim
@@ -1,16 +1,28 @@
-let s:suggest_faq = 'See https://github.com/neovim/neovim/wiki/FAQ'
+let s:suggest_faq = 'https://github.com/neovim/neovim/wiki/FAQ'
function! s:check_config() abort
+ let ok = v:true
call health#report_start('Configuration')
- if !get(g:, 'loaded_sensible', 0)
- call health#report_ok('no issues found')
- else
+
+ if get(g:, 'loaded_sensible', 0)
+ let ok = v:false
let sensible_pi = globpath(&runtimepath, '**/sensible.vim', 1, 1)
call health#report_info("found sensible.vim plugin:\n".join(sensible_pi, "\n"))
call health#report_error("sensible.vim plugin is not needed; Nvim has the same defaults built-in."
\ ." Also, sensible.vim sets 'ttimeoutlen' to a sub-optimal value.",
\ ["Remove sensible.vim plugin, or wrap it in a `if !has('nvim')` check."])
endif
+
+ if exists('$NVIM_TUI_ENABLE_CURSOR_SHAPE')
+ let ok = v:false
+ call health#report_warn("$NVIM_TUI_ENABLE_CURSOR_SHAPE is ignored in Nvim 0.2+",
+ \ [ "Use the 'guicursor' option to configure cursor shape. :help 'guicursor'",
+ \ 'https://github.com/neovim/neovim/wiki/Following-HEAD#20170402' ])
+ endif
+
+ if ok
+ call health#report_ok('no issues found')
+ endif
endfunction
" Load the remote plugin manifest file and check for unregistered plugins
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim
index 9f3f492ef6..2506c8216b 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider.vim
@@ -111,13 +111,13 @@ endfunction
" Check for clipboard tools.
function! s:check_clipboard() abort
- call health#report_start('Clipboard')
+ call health#report_start('Clipboard (optional)')
let clipboard_tool = provider#clipboard#Executable()
if empty(clipboard_tool)
call health#report_warn(
\ "No clipboard tool found. Clipboard registers will not work.",
- \ ['See ":help clipboard".'])
+ \ [':help clipboard'])
else
call health#report_ok('Clipboard tool found: '. clipboard_tool)
endif
@@ -224,7 +224,7 @@ function! s:check_bin(bin) abort
endfunction
function! s:check_python(version) abort
- call health#report_start('Python ' . a:version . ' provider')
+ call health#report_start('Python ' . a:version . ' provider (optional)')
let pyname = 'python'.(a:version == 2 ? '' : '3')
let pyenv = resolve(exepath('pyenv'))
@@ -419,7 +419,7 @@ function! s:check_python(version) abort
endfunction
function! s:check_ruby() abort
- call health#report_start('Ruby provider')
+ call health#report_start('Ruby provider (optional)')
let loaded_var = 'g:loaded_ruby_provider'
if exists(loaded_var) && !exists('*provider#ruby#Call')
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index 1bcc1dea74..a3210046b1 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -86,7 +86,7 @@ function! provider#clipboard#Executable() abort
return 'win32yank'
endif
- let s:err = 'clipboard: No clipboard tool available. See :help clipboard'
+ let s:err = 'clipboard: No clipboard tool available. :help clipboard'
return ''
endfunction
diff --git a/runtime/autoload/provider/python.vim b/runtime/autoload/provider/python.vim
index b99a046375..81fe194cb9 100644
--- a/runtime/autoload/provider/python.vim
+++ b/runtime/autoload/provider/python.vim
@@ -1,5 +1,5 @@
" The Python provider uses a Python host to emulate an environment for running
-" python-vim plugins. See ":help provider".
+" python-vim plugins. :help provider
"
" Associating the plugin with the Python host is the first step because plugins
" will be passed as command-line arguments
diff --git a/runtime/autoload/provider/python3.vim b/runtime/autoload/provider/python3.vim
index 4f47a03a9b..0c3b75b73d 100644
--- a/runtime/autoload/provider/python3.vim
+++ b/runtime/autoload/provider/python3.vim
@@ -1,5 +1,5 @@
" The Python3 provider uses a Python3 host to emulate an environment for running
-" python3 plugins. See ":help provider".
+" python3 plugins. :help provider
"
" Associating the plugin with the Python3 host is the first step because
" plugins will be passed as command-line arguments
diff --git a/runtime/autoload/provider/pythonx.vim b/runtime/autoload/provider/pythonx.vim
index 08a0f39b01..2f64c22c71 100644
--- a/runtime/autoload/provider/pythonx.vim
+++ b/runtime/autoload/provider/pythonx.vim
@@ -112,15 +112,14 @@ function! s:check_interpreter(prog, major_ver) abort
endif
if v:shell_error == 2
- return [0, prog_path . ' does not have the neovim module installed. '
- \ . 'See ":help provider-python".']
+ return [0, prog_path.' does not have the "neovim" module. :help provider-python']
elseif v:shell_error == 127
" This can happen with pyenv's shims.
return [0, prog_path . ' does not exist: ' . prog_ver]
elseif v:shell_error
return [0, 'Checking ' . prog_path . ' caused an unknown error. '
\ . '(' . v:shell_error . ', output: ' . prog_ver . ')'
- \ . ' Please report this at github.com/neovim/neovim.']
+ \ . ' Report this at https://github.com/neovim/neovim']
endif
return [1, '']
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 2bcc996d8b..a118690876 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -9,8 +9,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|).
-Nvim can also be embedded in C applications as libnvim, so the application
-can control the embedded instance by calling the C API directly.
+Applications can also embed libnvim to work with the C API directly.
==============================================================================
API Types *api-types*
@@ -55,6 +54,28 @@ error_types Possible error types returned by API functions
External programs ("clients") can use the metadata to discover the |rpc-api|.
==============================================================================
+API contract *api-contract*
+
+The API is made of functions and events. Clients call functions like those
+described at |api-global|, and may "attach" in order to receive rich events,
+described at |rpc-remote-ui|.
+
+As Nvim develops, its API may change only according the following "contract":
+
+- New functions and events may be added.
+ - Any such extensions are OPTIONAL: old clients may ignore them.
+- Function signatures will NOT CHANGE (after release).
+ - Functions introduced in the development (unreleased) version MAY CHANGE.
+ (Clients can dynamically check `api_prerelease`, etc. |api-metadata|)
+- Event parameters will not be removed or reordered (after release).
+- Events may be EXTENDED: new parameters may be added.
+- New items may be ADDED to map/list parameters/results of functions and
+ events.
+ - Any such new items are OPTIONAL: old clients may ignore them.
+ - Existing items will not be removed (after release).
+- Deprecated functions will not be removed until Nvim version 2.0
+
+==============================================================================
Buffer highlighting *api-highlights*
Nvim allows plugins to add position-based highlights to buffers. This is
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index 76ccc42546..0e909aac65 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -6,22 +6,20 @@
Development of Nvim. *development*
-1. Design goals |design-goals|
-2. Design decisions |design-decisions|
+1. Design goals |design-goals|
+2. Developer guidelines |dev-help|
Nvim is open source software. Everybody is encouraged to contribute.
https://github.com/neovim/neovim/blob/master/CONTRIBUTING.md
-See src/nvim/README.md for a high-level overview of the source code:
- https://github.com/neovim/neovim/blob/master/src/nvim/README.md
+See src/nvim/README.md for an overview of the source code.
==============================================================================
-1. Design goals *design-goals*
+Design goals *design-goals*
Most important things come first (roughly).
-Note that quite a few items are contradicting. This is intentional. A
-balance must be found between them.
+Note that some items conflict; this is intentional. A balance must be found.
NVIM IS... IMPROVED *design-improved*
@@ -41,7 +39,7 @@ completely different editor. Extensions are done with a "Vi spirit".
- There are many first-time and inexperienced Vim users. Make it easy for
them to start using Vim and learn more over time.
- There is no limit to the features that can be added. Selecting new features
- is one based on (1) what users ask for, (2) how much effort it takes to
+ is based on (1) what users ask for, (2) how much effort it takes to
implement and (3) someone actually implementing it.
@@ -56,20 +54,14 @@ Vim tries to help as many users on as many platforms as possible.
- Support many compilers and libraries. Not everybody is able or allowed to
install another compiler or GUI library.
- People switch from one platform to another, and from GUI to terminal
- version. Features should be present in all versions, or at least in as many
- as possible with a reasonable effort. Try to avoid that users must switch
- between platforms to accomplish their work efficiently.
-- That a feature is not possible on some platforms, or only possible on one
- platform, does not mean it cannot be implemented. [This intentionally
- contradicts the previous item, these two must be balanced.]
+ version. Features should be present in all versions.
NVIM IS... WELL DOCUMENTED *design-documented*
- A feature that isn't documented is a useless feature. A patch for a new
feature must include the documentation.
-- Documentation should be comprehensive and understandable. Using examples is
- recommended.
+- Documentation should be comprehensive and understandable. Use examples.
- Don't make the text unnecessarily long. Less documentation means that an
item is easier to find.
- Do not prefix doc-tags with "nvim-". Use |vim_diff.txt| to document
@@ -77,12 +69,12 @@ NVIM IS... WELL DOCUMENTED *design-documented*
to mark a specific feature. No other distinction is necessary.
- If a feature is removed, delete its doc entry and move its tag to
|vim_diff.txt|.
+- Move deprecated features to |deprecated.txt|.
NVIM IS... HIGH SPEED AND SMALL IN SIZE *design-speed-size*
-Using Vim must not be a big attack on system resources. Keep it small and
-fast.
+Keep Nvim small and fast.
- Computers are becoming faster and bigger each year. Vim can grow too, but
no faster than computers are growing. Keep Vim usable on older systems.
- Many users start Vim from a shell very often. Startup time must be short.
@@ -118,13 +110,14 @@ NVIM IS... NOT *design-not*
Nvim is not an operating system; instead it should be composed with other
tools or hosted as a component. Marvim once said: "Unlike Emacs, Nvim does not
-include the kitchen sink... but you can use it for plumbing."
+include the kitchen sink... but it's good for plumbing."
==============================================================================
-2. Design decisions *design-decisions*
+Developer guidelines *dev-help*
-JARGON *dev-jargon*
+
+JARGON *dev-jargon*
API client ~
All external UIs and remote plugins (as opposed to regular Vim plugins) are
@@ -150,15 +143,14 @@ the xterm window, a window inside Vim to view a buffer.
To avoid confusion, other items that are sometimes called window have been
given another name. Here is an overview of the related items:
-screen The whole display. For the GUI it's something like 1024x768
- pixels. The Vim shell can use the whole screen or part of it.
+screen The whole display.
shell The Vim application. This can cover the whole screen (e.g.,
when running in a console) or part of it (xterm or GUI).
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.
-PROVIDERS *dev-provider*
+PROVIDERS *dev-provider*
A goal of Nvim is to allow extension of the editor without special knowledge
in the core. But some Vim components are too tightly coupled; in those cases
@@ -202,7 +194,7 @@ Python host isn't installed then the plugin will "think" it is running in
a Vim compiled without the |+python| feature.
-API *dev-api*
+API *dev-api*
Use this pattern to name new API functions:
nvim_{thing}_{action}_{arbitrary-qualifiers}
@@ -233,4 +225,23 @@ _not_ a Buffer). The common {action} "list" indicates that it lists all
bufs (plural) in the global context.
+EXTERNAL UI *dev-ui*
+
+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.
+
+External UIs are expected to implement some common features.
+
+- Users may want to configure UI-specific options. The UI should publish the
+ |GUIEnter| autocmd after attaching to Nvim: >
+ doautocmd GUIEnter
+- 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:
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 77db2699f8..107dd28ecd 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -38,7 +38,7 @@ done, the features in this document are not available. See |+eval| and
There are six types of variables:
Number A 32 or 64 bit signed number. |expr-number| *Number*
- Examples: -123 0x10 0177
+ Examples: -123 0x10 0177 0b1011
Float A floating point number. |floating-point-format| *Float*
Examples: 123.456 1.15e-6 -1.1e3
@@ -1022,9 +1022,10 @@ When expr8 is a |Funcref| type variable, invoke the function it refers to.
number
------
number number constant *expr-number*
- *hex-number* *octal-number*
+ *hex-number* *octal-number* *binary-number*
-Decimal, Hexadecimal (starting with 0x or 0X), or Octal (starting with 0).
+Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B)
+and Octal (starting with 0).
*floating-point-format*
Floating point numbers can be written in two forms:
@@ -1214,7 +1215,7 @@ The arguments are optional. Example: >
*closure*
Lambda expressions can access outer scope variables and arguments. This is
often called a closure. Example where "i" a and "a:arg" are used in a lambda
-while they exists in the function scope. They remain valid even after the
+while they exist in the function scope. They remain valid even after the
function returns: >
:function Foo(arg)
: let i = 3
@@ -1425,8 +1426,8 @@ v:beval_winnr The number of the window, over which the mouse pointer is. Only
window gets a number).
*v:beval_winid* *beval_winid-variable*
-v:beval_winid The window ID of the window, over which the mouse pointer is.
- Otherwise like v:beval_winnr.
+v:beval_winid The |window-ID| of the window, over which the mouse pointer
+ is. Otherwise like v:beval_winnr.
*v:char* *char-variable*
v:char Argument for evaluating 'formatexpr' and used for the typed
@@ -1686,7 +1687,7 @@ v:mouse_win Window number for a mouse click obtained with |getchar()|.
zero when there was no mouse button click.
*v:mouse_winid* *mouse_winid-variable*
-v:mouse_winid Window ID for a mouse click obtained with |getchar()|.
+v:mouse_winid |window-ID| for a mouse click obtained with |getchar()|.
The value is zero when there was no mouse button click.
*v:mouse_lnum* *mouse_lnum-variable*
@@ -1922,9 +1923,10 @@ v:vim_did_enter Zero until most of startup is done. It is set to one just
v:warningmsg Last given warning message. It's allowed to set this variable.
*v:windowid* *windowid-variable*
-v:windowid Application-specific window ID ("window handle" in MS-Windows)
- which may be set by any attached UI. Defaults to zero.
- Note: for windows inside Vim use |winnr()| or |win_getid()|.
+v:windowid Application-specific window "handle" which may be set by any
+ attached UI. Defaults to zero.
+ Note: For Nvim |windows| use |winnr()| or |win_getid()|, see
+ |window-ID|.
==============================================================================
4. Builtin Functions *functions*
@@ -1952,7 +1954,7 @@ assert_exception( {error} [, {msg}]) none assert {error} is in v:exception
assert_fails( {cmd} [, {error}]) none assert {cmd} fails
assert_false({actual} [, {msg}]) none assert {actual} is false
assert_inrange({lower}, {upper}, {actual} [, {msg}])
- none assert {actual} is inside the range
+ none assert {actual} is inside the range
assert_match( {pat}, {text} [, {msg}]) none assert {pat} matches {text}
assert_notequal( {exp}, {act} [, {msg}]) none assert {exp} is not equal {act}
assert_notmatch( {pat}, {text} [, {msg}]) none assert {pat} not matches {text}
@@ -1968,7 +1970,7 @@ buflisted({expr}) Number |TRUE| if buffer {expr} is listed
bufloaded({expr}) Number |TRUE| if buffer {expr} is loaded
bufname({expr}) String Name of the buffer {expr}
bufnr({expr} [, {create}]) Number Number of the buffer {expr}
-bufwinid({expr}) Number window ID of buffer {expr}
+bufwinid({expr}) Number |window-ID| of buffer {expr}
bufwinnr({expr}) Number window number of buffer {expr}
byte2line({byte}) Number line number at byte count {byte}
byteidx({expr}, {nr}) Number byte index of {nr}'th char in {expr}
@@ -1991,7 +1993,7 @@ cos({expr}) Float cosine of {expr}
cosh({expr}) Float hyperbolic cosine of {expr}
count({list}, {expr} [, {ic} [, {start}]])
Number count how many {expr} are in {list}
-cscope_connection([{num} , {dbpath} [, {prepend}]])
+cscope_connection([{num}, {dbpath} [, {prepend}]])
Number checks existence of cscope connection
cursor({lnum}, {col} [, {off}])
Number move cursor to {lnum}, {col}, {off}
@@ -2302,9 +2304,12 @@ tan({expr}) Float tangent of {expr}
tanh({expr}) Float hyperbolic tangent of {expr}
tempname() String name for a temporary file
test_garbagecollect_now() none free memory right now for testing
+timer_info([{id}]) List information about timers
+timer_pause({id}, {pause}) none pause or unpause a timer
timer_start({time}, {callback} [, {options}])
Number create a timer
timer_stop({timer}) none stop a timer
+timer_stopall() none stop all timers
tolower({expr}) String the String {expr} switched to lowercase
toupper({expr}) String the String {expr} switched to uppercase
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
@@ -2320,10 +2325,10 @@ virtcol({expr}) Number screen column of cursor or mark
visualmode([expr]) String last visual mode used
wildmenumode() Number whether 'wildmenu' mode is active
win_findbuf({bufnr}) List find windows containing {bufnr}
-win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab}
-win_gotoid({expr}) Number go to window with ID {expr}
-win_id2tabwin({expr}) List get tab and window nr from window ID
-win_id2win({expr}) Number get window nr from window ID
+win_getid([{win} [, {tab}]]) Number get |window-ID| for {win} in {tab}
+win_gotoid({expr}) Number go to |window-ID| {expr}
+win_id2tabwin({expr}) List get tab and window nr from |window-ID|
+win_id2win({expr}) Number get window nr from |window-ID|
winbufnr({nr}) Number buffer number of window {nr}
wincol() Number window column of the cursor
winheight({nr}) Number height of window {nr}
@@ -2414,7 +2419,7 @@ arglistid([{winnr} [, {tabnr}]])
With {winnr} only use this window in the current tab page.
With {winnr} and {tabnr} use the window in the specified tab
page.
- {winnr} can be the window number or the window ID.
+ {winnr} can be the window number or the |window-ID|.
*argv()*
argv([{nr}]) The result is the {nr}th file in the argument list of the
@@ -2649,7 +2654,7 @@ bufnr({expr} [, {create}])
them. Use bufexists() to test for the existence of a buffer.
bufwinid({expr}) *bufwinid()*
- The result is a Number, which is the window ID of the first
+ The result is a Number, which is the |window-ID| of the first
window associated with buffer {expr}. For the use of {expr},
see |bufname()| above. If buffer {expr} doesn't exist or
there is no such window, -1 is returned. Example: >
@@ -3203,8 +3208,12 @@ exepath({expr}) *exepath()*
*exists()*
exists({expr}) The result is a Number, which is |TRUE| if {expr} is
- defined, zero otherwise. The {expr} argument is a string,
- which contains one of these:
+ defined, zero otherwise.
+
+ For checking for a supported feature use |has()|.
+ For checking if a file exists use |filereadable()|.
+
+ The {expr} argument is a string, which contains one of these:
&option-name Vim option (only checks if it exists,
not if it really works)
+option-name Vim option that works.
@@ -3252,7 +3261,6 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is
event and pattern.
##event autocommand for this event is
supported.
- For checking for a supported feature use |has()|.
Examples: >
exists("&mouse")
@@ -4065,7 +4073,7 @@ getcwd([{winnr}[, {tabnr}]]) *getcwd()*
getcwd(0)
getcwd(0, 0)
< If {winnr} is -1 it is ignored, only the tab is resolved.
- {winnr} can be the window number or the window ID.
+ {winnr} can be the window number or the |window-ID|.
getfsize({fname}) *getfsize()*
@@ -4160,7 +4168,7 @@ getline({lnum} [, {end}])
getloclist({nr},[, {what}]) *getloclist()*
Returns a list with all the entries in the location list for
- window {nr}. {nr} can be the window number or the window ID.
+ window {nr}. {nr} can be the window number or the |window-ID|.
When {nr} is zero the current window is used.
For a location list window, the displayed location list is
@@ -4235,7 +4243,7 @@ getqflist([{what}]) *getqflist()*
type type of the error, 'E', '1', etc.
valid |TRUE|: recognized error message
- When there is no error list or it's empty an empty list is
+ When there is no error list or it's empty, an empty list is
returned. Quickfix list entries with non-existing buffer
number are returned with "bufnr" set to zero.
@@ -4250,8 +4258,8 @@ getqflist([{what}]) *getqflist()*
returns only the items listed in {what} as a dictionary. The
following string items are supported in {what}:
nr get information for this quickfix list
- title get list title
- winid get window id (if opened)
+ title get the list title
+ winid get the |window-ID| (if opened)
all all of the above quickfix properties
Non-string items in {what} are ignored.
If "nr" is not present then the current quickfix list is used.
@@ -4261,7 +4269,7 @@ getqflist([{what}]) *getqflist()*
The returned dictionary contains the following entries:
nr quickfix list number
title quickfix list title text
- winid quickfix window id (if opened)
+ winid quickfix |window-ID| (if opened)
Examples: >
:echo getqflist({'all': 1})
@@ -4272,7 +4280,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
The result is a String, which is the contents of register
{regname}. Example: >
:let cliptext = getreg('*')
-< When {regname} was not set the result is a empty string.
+< When {regname} was not set the result is an empty string.
getreg('=') returns the last evaluated value of the expression
register. (For use in maps.)
@@ -4308,10 +4316,10 @@ gettabinfo([{arg}]) *gettabinfo()*
empty List is returned.
Each List item is a Dictionary with the following entries:
- nr tab page number.
+ tabnr tab page number.
variables a reference to the dictionary with
tabpage-local variables
- windows List of window IDs in the tag page.
+ windows List of |window-ID|s in the tag page.
gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()*
Get the value of a tab-local variable {varname} in tab page
@@ -4335,7 +4343,7 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
Note that {varname} must be the name without "w:".
Tabs are numbered starting with one. For the current tabpage
use |getwinvar()|.
- {winnr} can be the window number or the window ID.
+ {winnr} can be the window number or the |window-ID|.
When {winnr} is zero the current window is used.
This also works for a global option, buffer-local option and
window-local option, but it doesn't work for a global variable
@@ -4363,20 +4371,20 @@ getwininfo([{winid}]) *getwininfo()*
is returned. If the window does not exist the result is an
empty list.
- Without an information about all the windows in all the tab
- pages is returned.
+ Without {winid} information about all the windows in all the
+ tab pages is returned.
Each List item is a Dictionary with the following entries:
- bufnum number of buffer in the window
+ bufnr number of buffer in the window
height window height
loclist 1 if showing a location list
- nr window number
quickfix 1 if quickfix or location list window
- tpnr tab page number
+ tabnr tab page number
variables a reference to the dictionary with
window-local variables
width window width
- winid window ID
+ winid |window-ID|
+ winnr window number
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
@@ -4480,9 +4488,8 @@ has_key({dict}, {key}) *has_key()*
an entry with key {key}. Zero otherwise.
haslocaldir([{winnr}[, {tabnr}]]) *haslocaldir()*
- The result is a Number, which is 1 when the specified tabpage
- or window has a local path set via |:lcd| or |:tcd|, and
- 0 otherwise.
+ The result is a Number, which is 1 when the tabpage or window
+ has set a local path via |:tcd| or |:lcd|, otherwise 0.
Tabs and windows are identified by their respective numbers,
0 means current tab or window. Missing argument implies 0.
@@ -4490,7 +4497,9 @@ haslocaldir([{winnr}[, {tabnr}]]) *haslocaldir()*
haslocaldir()
haslocaldir(0)
haslocaldir(0, 0)
-< {winnr} can be the window number or the window ID.
+< With {winnr} use that window in the current tabpage.
+ With {winnr} and {tabnr} use the window in that tabpage.
+ {winnr} can be the window number or the |window-ID|.
If {winnr} is -1 it is ignored, only the tab is resolved.
hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
@@ -5337,7 +5346,8 @@ matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
available from |getmatches()|. All matches can be deleted in
one operation by |clearmatches()|.
-matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]]) *matchaddpos()*
+ *matchaddpos()*
+matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]])
Same as |matchadd()|, but requires a list of positions {pos}
instead of a pattern. This command is faster than |matchadd()|
because it does not require to handle regular expressions and
@@ -5807,6 +5817,9 @@ printf({fmt}, {expr1} ...) *printf()*
s The text of the String argument is used. If a
precision is specified, no more bytes than the number
specified are used.
+ If the argument is not a String type, it is
+ automatically converted to text with the same format
+ as ":echo".
*printf-S*
S The text of the String argument is used. If a
precision is specified, no more display cells than the
@@ -6530,7 +6543,7 @@ setline({lnum}, {text}) *setline()*
setloclist({nr}, {list} [, {action}[, {what}]]) *setloclist()*
Create or replace or add to the location list for window {nr}.
- {nr} can be the window number or the window ID.
+ {nr} can be the window number or the |window-ID|.
When {nr} is zero the current window is used.
For a location list window, the displayed location list is
@@ -6722,7 +6735,7 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
{val}.
Tabs are numbered starting with one. For the current tabpage
use |setwinvar()|.
- {winnr} can be the window number or the window ID.
+ {winnr} can be the window number or the |window-ID|.
When {winnr} is zero the current window is used.
This also works for a global or local buffer option, but it
doesn't work for a global or local buffer variable.
@@ -7173,7 +7186,7 @@ strwidth({expr}) *strwidth()*
Ambiguous, this function's return value depends on 'ambiwidth'.
Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
-submatch({nr}[, {list}]) *submatch()*
+submatch({nr}[, {list}]) *submatch()* *E935*
Only for an expression in a |:substitute| command or
substitute() function.
Returns the {nr}'th submatch of the matched text. When {nr}
@@ -7397,7 +7410,7 @@ systemlist({cmd} [, {input} [, {keepempty}]]) *systemlist()*
tabpagebuflist([{arg}]) *tabpagebuflist()*
The result is a |List|, where each item is the number of the
buffer associated with each window in the current tab page.
- {arg} specifies the number of tab page to be used. When
+ {arg} specifies the number of the tab page to be used. When
omitted the current tab page is used.
When {arg} is invalid the number zero is returned.
To get a list of all buffers in all tabs use this: >
@@ -7528,7 +7541,36 @@ tanh({expr}) *tanh()*
< -0.761594
- *timer_start()*
+ *timer_info()*
+timer_info([{id}])
+ Return a list with information about timers.
+ When {id} is given only information about this timer is
+ returned. When timer {id} does not exist an empty list is
+ returned.
+ When {id} is omitted information about all timers is returned.
+
+ For each timer the information is stored in a Dictionary with
+ these items:
+ "id" the timer ID
+ "time" time the timer was started with
+ "repeat" number of times the timer will still fire;
+ -1 means forever
+ "callback" the callback
+
+timer_pause({timer}, {paused}) *timer_pause()*
+ Pause or unpause a timer. A paused timer does not invoke its
+ callback when its time expires. Unpausing a timer may cause
+ the callback to be invoked almost immediately if enough time
+ has passed.
+
+ Pausing a timer is useful to avoid the callback to be called
+ for a short time.
+
+ If {paused} evaluates to a non-zero Number or a non-empty
+ String, then the timer is paused, otherwise it is unpaused.
+ See |non-zero-arg|.
+
+ *timer_start()* *timer* *timers*
timer_start({time}, {callback} [, {options}])
Create a timer and return the timer ID.
@@ -7557,7 +7599,12 @@ timer_start({time}, {callback} [, {options}])
timer_stop({timer}) *timer_stop()*
Stop a timer. The timer callback will no longer be invoked.
{timer} is an ID returned by timer_start(), thus it must be a
- Number.
+ Number. If {timer} does not exist there is no error.
+
+timer_stopall() *timer_stopall()*
+ Stop all timers. The timer callbacks will no longer be
+ invoked. Useful if some timers is misbehaving. If there are
+ no timers there is no error.
tolower({expr}) *tolower()*
The result is a copy of the String given, with all uppercase
@@ -7759,11 +7806,11 @@ wildmenumode() *wildmenumode()*
win_findbuf({bufnr}) *win_findbuf()*
- Returns a list with window IDs for windows that contain buffer
- {bufnr}. When there is none the list is empty.
+ Returns a list with |window-ID|s for windows that contain
+ buffer {bufnr}. When there is none the list is empty.
win_getid([{win} [, {tab}]]) *win_getid()*
- Get the window ID for the specified window.
+ Get the |window-ID| for the specified window.
When {win} is missing use the current window.
With {win} this is the window number. The top window has
number 1.
@@ -7788,7 +7835,7 @@ win_id2win({expr}) *win_id2win()*
*winbufnr()*
winbufnr({nr}) The result is a Number, which is the number of the buffer
associated with window {nr}. {nr} can be the window number or
- the window ID.
+ the |window-ID|.
When {nr} is zero, the number of the buffer in the current
window is returned.
When window {nr} doesn't exist, -1 is returned.
@@ -7802,7 +7849,7 @@ wincol() The result is a Number, which is the virtual column of the
winheight({nr}) *winheight()*
The result is a Number, which is the height of window {nr}.
- {nr} can be the window number or the window ID.
+ {nr} can be the window number or the |window-ID|.
When {nr} is zero, the height of the current window is
returned. When window {nr} doesn't exist, -1 is returned.
An existing window always has a height of zero or more.
@@ -7882,7 +7929,7 @@ winsaveview() Returns a |Dictionary| that contains information to restore
winwidth({nr}) *winwidth()*
The result is a Number, which is the width of window {nr}.
- {nr} can be the window number or the window ID.
+ {nr} can be the window number or the |window-ID|.
When {nr} is zero, the width of the current window is
returned. When window {nr} doesn't exist, -1 is returned.
An existing window always has a width of zero or more.
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index bab15bcbb6..0dc8fff975 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1202,7 +1202,7 @@ tag command action ~
|:display| :di[splay] display registers
|:djump| :dj[ump] jump to #define
|:dl| :dl short for |:delete| with the 'l' flag
-|:dl| :del[ete]l short for |:delete| with the 'l' flag
+|:del| :del[ete]l short for |:delete| with the 'l' flag
|:dlist| :dli[st] list #defines
|:doautocmd| :do[autocmd] apply autocommands to current buffer
|:doautoall| :doautoa[ll] apply autocommands for all loaded buffers
@@ -1234,6 +1234,7 @@ tag command action ~
|:file| :f[ile] show or set the current file name
|:files| :files list all files in the buffer list
|:filetype| :filet[ype] switch file type detection on/off
+|:filter| :filt[er] filter output of following command
|:find| :fin[d] find file in 'path' and edit it
|:finally| :fina[lly] part of a :try command
|:finish| :fini[sh] quit sourcing a Vim script
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index db349eca71..3ba1ce1f17 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -720,9 +720,6 @@ special key: >
Don't type a real <Esc>, Vim will recognize the key code and replace it with
<F1> anyway.
-Another problem may be that when keeping ALT or Meta pressed the terminal
-prepends ESC instead of setting the 8th bit. See |:map-alt-keys|.
-
*recursive_mapping*
If you include the {lhs} in the {rhs} you have a recursive mapping. When
{lhs} is typed, it will be replaced with {rhs}. When the {lhs} which is
@@ -762,46 +759,14 @@ in the original Vi, you would get back the text before the first undo).
1.10 MAPPING ALT-KEYS *:map-alt-keys*
-In the GUI Vim handles the Alt key itself, thus mapping keys with ALT should
-always work. But in a terminal Vim gets a sequence of bytes and has to figure
-out whether ALT was pressed or not.
-
-By default Vim assumes that pressing the ALT key sets the 8th bit of a typed
-character. Most decent terminals can work that way, such as xterm, aterm and
-rxvt. If your <A-k> mappings don't work it might be that the terminal is
-prefixing the character with an ESC character. But you can just as well type
-ESC before a character, thus Vim doesn't know what happened (except for
-checking the delay between characters, which is not reliable).
-
-As of this writing, some mainstream terminals like gnome-terminal and konsole
-use the ESC prefix. There doesn't appear a way to have them use the 8th bit
-instead. Xterm should work well by default. Aterm and rxvt should work well
-when started with the "--meta8" argument. You can also tweak resources like
-"metaSendsEscape", "eightBitInput" and "eightBitOutput".
-
-On the Linux console, this behavior can be toggled with the "setmetamode"
-command. Bear in mind that not using an ESC prefix could get you in trouble
-with other programs. You should make sure that bash has the "convert-meta"
-option set to "on" in order for your Meta keybindings to still work on it
-(it's the default readline behavior, unless changed by specific system
-configuration). For that, you can add the line: >
-
- set convert-meta on
-
-to your ~/.inputrc file. If you're creating the file, you might want to use: >
-
- $include /etc/inputrc
-
-as the first line, if that file exists on your system, to keep global options.
-This may cause a problem for entering special characters, such as the umlaut.
-Then you should use CTRL-V before that character.
-
-Bear in mind that convert-meta has been reported to have troubles when used in
-UTF-8 locales. On terminals like xterm, the "metaSendsEscape" resource can be
-toggled on the fly through the "Main Options" menu, by pressing Ctrl-LeftClick
-on the terminal; that's a good last resource in case you want to send ESC when
-using other applications but not when inside VIM.
-
+In the GUI Nvim handles the |ALT| key itself, thus mapping keys with ALT
+should always work. But in a terminal Nvim gets a sequence of bytes and has
+to figure out whether ALT was pressed. Terminals may use ESC to indicate that
+ALT was pressed. If ESC is followed by a {key} within 'ttimeoutlen'
+milliseconds, the ESC is interpreted as:
+ <ALT-{key}>
+otherwise it is interpreted as two key presses:
+ <ESC> {key}
1.11 MAPPING AN OPERATOR *:map-operator*
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 9be7dae84d..6b96271c4a 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3499,7 +3499,7 @@ A jump table for the options with a short description can be found at |Q_op|.
if you want to use Vim as a modeless editor.
These Insert mode commands will be useful:
- Use the cursor keys to move around.
- - Use CTRL-O to execute one Normal mode command |i_CTRL-O|). When
+ - Use CTRL-O to execute one Normal mode command |i_CTRL-O|. When
this is a mapping, it is executed as if 'insertmode' was off.
Normal mode remains active until the mapping is finished.
- Use CTRL-L to execute a number of Normal mode commands, then use
@@ -3689,6 +3689,8 @@ A jump table for the options with a short description can be found at |Q_op|.
be able to execute Normal mode commands.
This is the opposite of the 'keymap' option, where characters are
mapped in Insert mode.
+ Also consider resetting 'langremap' to avoid 'langmap' applies to
+ characters resulting from a mapping.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -5025,6 +5027,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"inclusive" means that the last character of the selection is included
in an operation. For example, when "x" is used to delete the
selection.
+ When "old" is used and 'virtualedit' allows the cursor to move past
+ the end of line the line break still isn't included.
Note that when "exclusive" is used and selecting from the end
backwards, you cannot include the last character of a line, when
starting in Normal mode and 'virtualedit' empty.
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index a918a4d34a..420f570c99 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -751,7 +751,7 @@ Short explanation of each option: *option-list*
'keywordprg' 'kp' program to use for the "K" command
'langmap' 'lmap' alphabetic characters for other language mode
'langmenu' 'lm' language to be used for the menus
-'langnoremap' 'lnr' do not apply 'langmap' to mapped characters
+'langremap' 'lrm' do apply 'langmap' to mapped characters
'laststatus' 'ls' tells when last window has status lines
'lazyredraw' 'lz' don't redraw while executing macros
'linebreak' 'lbr' wrap long lines at a blank
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index e5a6b0be39..466a030e0c 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -188,7 +188,9 @@ JUMPING TO A SIGN *:sign-jump* *E157*
If the file isn't displayed in window and the current file can
not be |abandon|ed this fails.
-:sign jump {id} buffer={nr}
- Same, but use buffer {nr}.
+:sign jump {id} buffer={nr} *E934*
+ Same, but use buffer {nr}. This fails if buffer {nr} does not
+ have a name.
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 2d1dd22222..14e8c5d76f 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -922,7 +922,7 @@ You might want to clean up your 'viewdir' directory now and then.
To automatically save and restore views for *.c files: >
au BufWinLeave *.c mkview
- au BufWinEnter *.c silent loadview
+ au BufWinEnter *.c silent! loadview
==============================================================================
8. The ShaDa file *shada* *shada-file*
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index f7c2c0e120..3b54f9f268 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -3739,7 +3739,7 @@ Whether or not it is actually concealed depends on the value of the
'conceallevel' option. The 'concealcursor' option is used to decide whether
concealable items in the current line are displayed unconcealed to be able to
edit the line.
-Another way to conceal text with with |matchadd()|.
+Another way to conceal text is with |matchadd()|.
concealends *:syn-concealends*
@@ -4803,10 +4803,7 @@ guisp={color-name} *highlight-guisp*
Black White
Orange Purple Violet
- In the Win32 GUI version, additional system colors are available. See
- |win32-colors|.
-
- You can also specify a color by its Red, Green and Blue values.
+ You can also specify a color by its RGB (red, green, blue) values.
The format is "#rrggbb", where
"rr" is the Red value
"gg" is the Green value
diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt
index 2c090a66fa..b47053e17b 100644
--- a/runtime/doc/tagsrch.txt
+++ b/runtime/doc/tagsrch.txt
@@ -90,7 +90,7 @@ The ignore-case matches are not found for a ":tag" command when:
- 'tagcase' is "followscs" and 'smartcase' option is on and the pattern
contains an upper case character.
-The gnore-case matches are found when:
+The ignore-case matches are found when:
- a pattern is used (starting with a "/")
- for ":tselect"
- when 'tagcase' is "followic" and 'ignorecase' is off
@@ -432,9 +432,9 @@ The next file in the list is not used when:
This also depends on whether case is ignored. Case is ignored when:
- 'tagcase' is "followic" and 'ignorecase' is set
- 'tagcase' is "ignore"
-- 'tagcase' is "smart" and and the pattern only contains lower case
+- 'tagcase' is "smart" and the pattern only contains lower case
characters.
-- 'tagcase' is "followscs" and 'smartcase' is set and and the pattern only
+- 'tagcase' is "followscs" and 'smartcase' is set and the pattern only
contains lower case characters.
If case is not ignored, and the tags file only has a match without matching
case, the next tags file is searched for a match with matching case. If no
@@ -803,24 +803,24 @@ CTRL-W d Open a new window, with the cursor on the first
*:search-args*
Common arguments for the commands above:
-[!] When included, find matches in lines that are recognized as comments.
- When excluded, a match is ignored when the line is recognized as a
- comment (according to 'comments'), or the match is in a C comment (after
- "//" or inside /* */). Note that a match may be missed if a line is
- recognized as a comment, but the comment ends halfway through the line.
- And if the line is a comment, but it is not recognized (according to
- 'comments') a match may be found in it anyway. Example: >
+[!] When included, find matches in lines that are recognized as comments.
+ When excluded, a match is ignored when the line is recognized as a
+ comment (according to 'comments'), or the match is in a C comment
+ (after "//" or inside /* */). Note that a match may be missed if a
+ line is recognized as a comment, but the comment ends halfway the line.
+ And if the line is a comment, but it is not recognized (according to
+ 'comments') a match may be found in it anyway. Example: >
/* comment
foobar */
-< A match for "foobar" is found, because this line is not recognized as a
- comment (even though syntax highlighting does recognize it).
- Note: Since a macro definition mostly doesn't look like a comment, the
- [!] makes no difference for ":dlist", ":dsearch" and ":djump".
-[/] A pattern can be surrounded by '/'. Without '/' only whole words are
- matched, using the pattern "\<pattern\>". Only after the second '/' a
- next command can be appended with '|'. Example: >
+< A match for "foobar" is found, because this line is not recognized as
+ a comment (even though syntax highlighting does recognize it).
+ Note: Since a macro definition mostly doesn't look like a comment, the
+ [!] makes no difference for ":dlist", ":dsearch" and ":djump".
+[/] A pattern can be surrounded by '/'. Without '/' only whole words are
+ matched, using the pattern "\<pattern\>". Only after the second '/' a
+ next command can be appended with '|'. Example: >
:isearch /string/ | echo "the last one"
-< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
- is used as a literal string, not as a search pattern.
+< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
+ is used as a literal string, not as a search pattern.
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index 1a108caeaf..1fbd96f749 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -60,7 +60,7 @@ Support for different systems.
- Windows (XP SP 2 or greater)
- OS X
-Multi level undo. |undo|
+Multi level persistent undo. |undo|
'u' goes backward in time, 'CTRL-R' goes forward again. Set option
'undolevels' to the number of changes to be remembered (default 1000).
Set 'undolevels' to 0 for a Vi-compatible one level undo. Set it to
@@ -71,6 +71,9 @@ Multi level undo. |undo|
create a branch in the undo tree. This means you can go back to any
state of the text, there is no risk of a change causing text to be
lost forever. |undo-tree|
+ The undo information is stored in a file when the 'undofile' option is
+ set. This means you can exit Vim, start Vim on a previously edited
+ file and undo changes that were made before exiting Vim.
Graphical User Interface (GUI). |gui|
Included support for GUI: menu's, mouse, scrollbars, etc. You can
@@ -124,6 +127,13 @@ Plugins. |add-plugin|
right directory. That's an easy way to start using Vim scripts
written by others. Plugins can be for all kind of files, or
specifically for a filetype.
+ Packages make this even easier. |packages|
+
+Asynchronous communication and timers. |job-control| |timer|
+ Vim can exchange messages with other processes in the background.
+ Vim can start a job, communicate with it and stop it. |job-control|
+ Timers can fire once or repeatedly and invoke a function to do any
+ work. |timer|
Repeat a series of commands. |q|
"q{c}" starts recording typed characters into named register {c}.
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 4ed7b68194..fa7a7f2a81 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -69,7 +69,7 @@ places where a Normal mode command can't be used or is inconvenient.
The main Vim window can hold several split windows. There are also tab pages
|tab-page|, each of which can hold multiple windows.
-
+ *window-ID* *winid* *windowid*
Each window has a unique identifier called the window ID. This identifier
will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
functions can be used to convert between the window/tab number and the
@@ -1026,6 +1026,10 @@ list of buffers. |unlisted-buffer|
h+ hidden buffers which are modified
a+ active buffers which are modified
+ When using |:filter| the pattern is matched against the
+ displayed buffer name, e.g.: >
+ filter /\.vim/ ls
+<
*:bad* *:badd*
:bad[d] [+lnum] {fname}
Add file name {fname} to the buffer list, without loading it.
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index f9d7f86a97..43155aa27e 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Jul 21
+" Last Change: 2016 Aug 26
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -688,8 +688,8 @@ func! s:FTe()
let n = 1
while n < 100 && n < line("$")
if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
- setf specman
- return
+ setf specman
+ return
endif
let n = n + 1
endwhile
@@ -775,8 +775,7 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
" Git
-au BufNewFile,BufRead COMMIT_EDITMSG setf gitcommit
-au BufNewFile,BufRead MERGE_MSG setf gitcommit
+au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
@@ -1777,6 +1776,9 @@ au BufNewFile,BufRead *.sass setf sass
" Sather
au BufNewFile,BufRead *.sa setf sather
+" Scala
+au BufNewFile,BufRead *.scala setf scala
+
" Scilab
au BufNewFile,BufRead *.sci,*.sce setf scilab
@@ -2049,7 +2051,7 @@ func! s:FTRules()
if line =~ s:ft_rules_udev_rules_pattern
let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "")
if dir == udev_rules
- setf udevrules
+ setf udevrules
endif
break
endif
@@ -2301,7 +2303,7 @@ au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart
-au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
+au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
au BufNewFile,BufRead */.config/upstart/*.override setf upstart
diff --git a/runtime/ftplugin/rmd.vim b/runtime/ftplugin/rmd.vim
index ec64a07675..8c092ac13f 100644
--- a/runtime/ftplugin/rmd.vim
+++ b/runtime/ftplugin/rmd.vim
@@ -1,9 +1,9 @@
" Vim filetype plugin file
-" Language: R help file
+" Language: R Markdown file
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Tue Apr 07, 2015 04:37PM
-" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann)
+" Last Change: Mon Jun 06, 2016 09:41PM
+" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
@@ -12,6 +12,16 @@ endif
runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
+" Nvim-R plugin needs this
+if exists("*CompleteR")
+ if &omnifunc == "CompleteR"
+ let b:rplugin_nonr_omnifunc = ""
+ else
+ let b:rplugin_nonr_omnifunc = &omnifunc
+ endif
+ set omnifunc=CompleteR
+endif
+
setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
diff --git a/runtime/ftplugin/scala.vim b/runtime/ftplugin/scala.vim
new file mode 100644
index 0000000000..e409950107
--- /dev/null
+++ b/runtime/ftplugin/scala.vim
@@ -0,0 +1,37 @@
+" Vim filetype plugin file
+" Language: Scala
+" Maintainer: Derek Wyatt
+" URL: https://github.com/derekwyatt/vim-scala
+" License: Same as Vim
+" Last Change: 02 August 2016
+" ----------------------------------------------------------------------------
+
+if exists('b:did_ftplugin') || &cp
+ finish
+endif
+let b:did_ftplugin = 1
+
+" j is fairly new in Vim, so don't complain if it's not there
+setlocal formatoptions-=t formatoptions+=croqnl
+silent! setlocal formatoptions+=j
+
+" Just like c.vim, but additionally doesn't wrap text onto /** line when
+" formatting. Doesn't bungle bulleted lists when formatting.
+if get(g:, 'scala_scaladoc_indent', 0)
+ setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
+else
+ setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
+endif
+setlocal commentstring=//\ %s
+
+setlocal shiftwidth=2 softtabstop=2 expandtab
+
+setlocal include='^\s*import'
+setlocal includeexpr='substitute(v:fname,"\\.","/","g")'
+
+setlocal path+=src/main/scala,src/test/scala
+setlocal suffixesadd=.scala
+
+compiler sbt
+
+" vim:set sw=2 sts=2 ts=8 et:
diff --git a/runtime/indent/fortran.vim b/runtime/indent/fortran.vim
index e19a19fb1f..be2f0866d5 100644
--- a/runtime/indent/fortran.vim
+++ b/runtime/indent/fortran.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
-" Version: 0.44
-" Last Change: 2016 Jan. 26
+" Version: 0.45
+" Last Change: 2016 Aug. 18
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-indent from Vim
" Credits:
@@ -121,7 +121,7 @@ function FortranGetIndent(lnum)
let prefix='\(\(pure\|impure\|elemental\|recursive\)\s\+\)\{,2}'
let type='\(\(integer\|real\|double\s\+precision\|complex\|logical'
\.'\|character\|type\|class\)\s*\S*\s\+\)\='
- if prevstat =~? '^\s*\(module\|contains\|program\)\>'
+ if prevstat =~? '^\s*\(module\|contains\/submodule\|program\)\>'
\ ||prevstat =~? '^\s*'.prefix.'subroutine\>'
\ ||prevstat =~? '^\s*'.prefix.type.'function\>'
\ ||prevstat =~? '^\s*'.type.prefix.'function\>'
@@ -129,14 +129,14 @@ function FortranGetIndent(lnum)
endif
if getline(v:lnum) =~? '^\s*contains\>'
\ ||getline(v:lnum)=~? '^\s*end\s*'
- \ .'\(function\|subroutine\|module\|program\)\>'
+ \ .'\(function\|subroutine\|module\/submodule\|program\)\>'
let ind = ind - shiftwidth()
endif
endif
"Subtract a shiftwidth from else, else if, elsewhere, case, end if,
" end where, end select, end forall, end interface, end associate,
- " end enum, and end type statements
+ " end enum, end type, end block and end type statements
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
\. '\(else\|else\s*if\|else\s*where\|case\|'
\. 'end\s*\(if\|where\|select\|interface\|'
diff --git a/runtime/indent/javascript.vim b/runtime/indent/javascript.vim
index 3507e305ed..0d6c11d151 100644
--- a/runtime/indent/javascript.vim
+++ b/runtime/indent/javascript.vim
@@ -1,8 +1,8 @@
" Vim indent file
" Language: Javascript
-" Maintainer: vim-javascript community
+" Maintainer: Chris Paul ( https://github.com/bounceme )
" URL: https://github.com/pangloss/vim-javascript
-" Last Change: August 12, 2016
+" Last Change: August 25, 2016
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -12,11 +12,11 @@ let b:did_indent = 1
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJavascriptIndent()
-setlocal nolisp
+setlocal nolisp noautoindent nosmartindent
setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e
setlocal cinoptions+=j1,J1
-let b:undo_indent = 'setlocal indentexpr< indentkeys< cinoptions<'
+let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys< cinoptions<'
" Only define the function once.
if exists('*GetJavascriptIndent')
@@ -37,7 +37,7 @@ else
endfunction
endif
-let s:line_pre = '^\s*\%(\/\*.\{-}\*\/\s*\)*'
+let s:line_pre = '^\s*\%(\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)\=\)\@>'
let s:expr_case = s:line_pre . '\%(\%(case\>.\+\)\|default\)\s*:'
" Regex of syntax group names that are or delimit string or are comments.
let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)'
@@ -46,63 +46,63 @@ let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)'
let s:syng_comment = '\%(comment\|doc\)'
" Expression used to check whether we should skip a match with searchpair().
-let s:skip_expr = "line('.') < (prevnonblank(v:lnum) - 2000) ? dummy : synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
+let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
-function s:lookForParens(start,end,flags,time)
- if has('reltime')
- return searchpair(a:start,'',a:end,a:flags,s:skip_expr,0,a:time)
- else
- return searchpair(a:start,'',a:end,a:flags,0,0)
- endif
-endfunction
+if has('reltime')
+ function s:GetPair(start,end,flags,time)
+ return searchpair(a:start,'',a:end,a:flags,s:skip_expr,max([prevnonblank(v:lnum) - 2000,0]),a:time)
+ endfunction
+else
+ function s:GetPair(start,end,flags,n)
+ return searchpair(a:start,'',a:end,a:flags,0,max([prevnonblank(v:lnum) - 2000,0]))
+ endfunction
+endif
-let s:line_term = '\%(\s*\%(\/\*.\{-}\*\/\s*\)\=\)\@>$'
+let s:line_term = '\s*\%(\%(\/\%(\%(\*.\{-}\*\/\)\|\%(\*\+\)\)\)\s*\)\=$'
" configurable regexes that define continuation lines, not including (, {, or [.
if !exists('g:javascript_opfirst')
- let g:javascript_opfirst = '\%([<>,:?^%]\|\([-/.+]\)\%(\1\|\*\|\/\)\@!\|\*\/\@!\|=>\@!\||\|&\|in\%(stanceof\)\=\>\)'
+ let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\/[^/*]\|\([-.+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)'
endif
-let g:javascript_opfirst = s:line_pre . g:javascript_opfirst
-
if !exists('g:javascript_continuation')
- let g:javascript_continuation = '\%([<*,.?:^%]\|+\@<!+\|-\@<!-\|=\@<!>\|\*\@<!\/\|=\||\|&\|\<in\%(stanceof\)\=\)'
+ let g:javascript_continuation = '\%([<=,.?/*:^%|&]\|+\@<!+\|-\@<!-\|=\@<!>\|\<in\%(stanceof\)\=\)'
endif
+
+let g:javascript_opfirst = s:line_pre . g:javascript_opfirst
let g:javascript_continuation .= s:line_term
-function s:Onescope(lnum,text,add)
- return a:text =~# '\%(\<else\|\<do\|=>' . (a:add ? '\|\<try\|\<finally' : '' ) . '\)' . s:line_term ||
+function s:OneScope(lnum,text,add)
+ return a:text =~# '\%(\<else\|\<do\|=>\)' . s:line_term ? 'no b' :
\ ((a:add && a:text =~ s:line_pre . '$' && search('\%' . s:PrevCodeLine(a:lnum - 1) . 'l.)' . s:line_term)) ||
\ cursor(a:lnum, match(a:text, ')' . s:line_term)) > -1) &&
- \ s:lookForParens('(', ')', 'cbW', 100) > 0 && search((a:add ?
- \ '\%(function\*\|[[:lower:][:upper:]_$][[:digit:][:lower:][:upper:]_$]*\)' :
- \ '\<\%(for\%(\s\+each\)\=\|if\|let\|w\%(hile\|ith\)\)') . '\_s*\%#\C','bW') &&
- \ (a:add || (expand('<cword>') ==# 'while' ? !s:lookForParens('\<do\>\C', '\<while\>\C','bW',100) : 1))
+ \ s:GetPair('(', ')', 'cbW', 100) > 0 && search('\C\l\+\_s*\%#','bW') &&
+ \ (a:add || ((expand('<cword>') !=# 'while' || !s:GetPair('\C\<do\>', '\C\<while\>','nbW',100)) &&
+ \ (expand('<cword>') !=# 'each' || search('\C\<for\_s\+\%#','nbW')))) ? expand('<cword>') : ''
endfunction
-" Auxiliary Functions {{{2
-
-" strip line of comment
-function s:StripLine(c)
- return a:c !~# s:expr_case ? substitute(a:c, '\%(:\@<!\/\/.*\)$', '','') : a:c
+" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
+function s:IsBlock()
+ return getline(line('.'))[col('.')-1] == '{' && !search(
+ \ '\C\%(\<return\s*\|\%([-=~!<*+,.?^%|&\[(]\|=\@<!>\|\*\@<!\/\|\<\%(var\|const\|let\|import\|export\%(\_s\+default\)\=\|yield\|delete\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\)\_s*\)\%#','bnW') &&
+ \ (!search(':\_s*\%#','bW') || (!s:GetPair('[({[]','[])}]','bW',200) || s:IsBlock()))
endfunction
+" Auxiliary Functions {{{2
+
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevCodeLine(lnum)
let l:lnum = prevnonblank(a:lnum)
- while l:lnum > 0
+ while l:lnum
if synIDattr(synID(l:lnum,matchend(getline(l:lnum), '^\s*[^''"]'),0),'name') !~? s:syng_strcom
- break
+ return l:lnum
endif
let l:lnum = prevnonblank(l:lnum - 1)
endwhile
- return l:lnum
endfunction
" Check if line 'lnum' has a balanced amount of parentheses.
function s:Balanced(lnum)
- let open_0 = 0
- let open_2 = 0
- let open_4 = 0
+ let [open_0,open_2,open_4] = [0,0,0]
let l:line = getline(a:lnum)
let pos = match(l:line, '[][(){}]', 0)
while pos != -1
@@ -129,7 +129,7 @@ function GetJavascriptIndent()
let syns = synIDattr(synID(v:lnum, 1, 0), 'name')
" start with strings,comments,etc.{{{2
- if (l:line !~ '^[''"`]' && syns =~? 'string\|template') ||
+ if (l:line !~ '^[''"`]' && syns =~? '\%(string\|template\)') ||
\ (l:line !~ '^\s*[/*]' && syns =~? s:syng_comment)
return -1
endif
@@ -153,15 +153,15 @@ function GetJavascriptIndent()
" the containing paren, bracket, curly. Memoize, last lineNr either has the
" same scope or starts a new one, unless if it closed a scope.
call cursor(v:lnum,1)
- if b:js_cache[0] >= l:lnum && b:js_cache[0] <= v:lnum && b:js_cache[0] &&
+ if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && b:js_cache[0] &&
\ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum) > 0)
let num = b:js_cache[1]
elseif syns != '' && l:line[0] =~ '\s'
let pattern = syns =~? 'block' ? ['{','}'] : syns =~? 'jsparen' ? ['(',')'] :
\ syns =~? 'jsbracket'? ['\[','\]'] : ['[({[]','[])}]']
- let num = s:lookForParens(pattern[0],pattern[1],'bW',2000)
+ let num = s:GetPair(pattern[0],pattern[1],'bW',2000)
else
- let num = s:lookForParens('[({[]','[])}]','bW',2000)
+ let num = s:GetPair('[({[]','[])}]','bW',2000)
endif
let b:js_cache = [v:lnum,num,line('.') == v:lnum ? b:js_cache[2] : col('.')]
@@ -169,17 +169,19 @@ function GetJavascriptIndent()
return indent(num)
endif
- let pline = s:StripLine(getline(l:lnum))
- let inb = num == 0 ? 1 : (s:Onescope(num, s:StripLine(strpart(getline(num),0,b:js_cache[2] - 1)),1) ||
- \ (l:line !~ s:line_pre . ',' && pline !~ ',' . s:line_term)) && num < l:lnum
- let switch_offset = (!inb || num == 0) || expand("<cword>") !=# 'switch' ? 0 : &cino !~ ':' || !has('float') ? s:sw() :
+ call cursor(b:js_cache[1],b:js_cache[2])
+
+ let swcase = getline(l:lnum) =~# s:expr_case
+ let pline = swcase ? getline(l:lnum) : substitute(getline(l:lnum), '\%(:\@<!\/\/.*\)$', '','')
+ let inb = num == 0 || num < l:lnum && ((l:line !~ s:line_pre . ',' && pline !~ ',' . s:line_term) || s:IsBlock())
+ let switch_offset = num == 0 || s:OneScope(num, strpart(getline(num),0,b:js_cache[2] - 1),1) !=# 'switch' ? 0 :
+ \ &cino !~ ':' || !has('float') ? s:sw() :
\ float2nr(str2float(matchstr(&cino,'.*:\zs[-0-9.]*')) * (&cino =~# '.*:[^,]*s' ? s:sw() : 1))
" most significant, find the indent amount
- if (inb && (l:line =~# g:javascript_opfirst ||
- \ (pline =~# g:javascript_continuation && pline !~# s:expr_case && (pline !~ ':' . s:line_term || l:line !~#
- \ s:line_pre . '\%(d\%(o\|ebugger\)\|else\|f\%(or\|inally\)\|if\|let\|switch\|t\%(hrow\|ry\)\|w\%(hile\|ith\)\)\>')))) ||
- \ (num < l:lnum && s:Onescope(l:lnum,pline,0) && l:line !~ s:line_pre . '{')
+ if inb && !swcase && ((l:line =~# g:javascript_opfirst || pline =~# g:javascript_continuation) ||
+ \ num < l:lnum && s:OneScope(l:lnum,pline,0) =~# '\<\%(for\|each\|if\|let\|no\sb\|w\%(hile\|ith\)\)\>' &&
+ \ l:line !~ s:line_pre . '{')
return (num > 0 ? indent(num) : -s:sw()) + (s:sw() * 2) + switch_offset
elseif num > 0
return indent(num) + s:sw() + switch_offset
diff --git a/runtime/indent/rnoweb.vim b/runtime/indent/rnoweb.vim
index 29fa5bc78f..8c11e85cb3 100644
--- a/runtime/indent/rnoweb.vim
+++ b/runtime/indent/rnoweb.vim
@@ -2,7 +2,7 @@
" Language: Rnoweb
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Tue Apr 07, 2015 04:38PM
+" Last Change: Fri Apr 15, 2016 10:58PM
" Only load this indent file when no other was loaded.
@@ -10,7 +10,17 @@ if exists("b:did_indent")
finish
endif
runtime indent/tex.vim
-let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
+
+function! s:NoTeXIndent()
+ return indent(line("."))
+endfunction
+
+if &indentexpr == "" || &indentexpr == "GetRnowebIndent()"
+ let s:TeXIndent = function("s:NoTeXIndent")
+else
+ let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
+endif
+
unlet b:did_indent
runtime indent/r.vim
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
diff --git a/runtime/indent/scala.vim b/runtime/indent/scala.vim
new file mode 100644
index 0000000000..f97c79bbab
--- /dev/null
+++ b/runtime/indent/scala.vim
@@ -0,0 +1,609 @@
+" Vim indent file
+" Language: Scala (http://scala-lang.org/)
+" Original Author: Stefan Matthias Aust
+" Modifications By: Derek Wyatt
+" URL: https://github.com/derekwyatt/vim-scala
+" Last Change: 2016 Aug 26
+
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal autoindent
+setlocal indentexpr=GetScalaIndent()
+setlocal indentkeys=0{,0},0),!^F,<>>,o,O,e,=case,<CR>
+
+if exists("*GetScalaIndent")
+ finish
+endif
+let s:keepcpo= &cpo
+set cpo&vim
+
+let s:defMatcher = '\%(\%(private\|protected\)\%(\[[^\]]*\]\)\?\s\+\|abstract\s\+\|override\s\+\)*\<def\>'
+let s:funcNameMatcher = '\w\+'
+let s:typeSpecMatcher = '\%(\s*\[\_[^\]]*\]\)'
+let s:defArgMatcher = '\%((\_.\{-})\)'
+let s:returnTypeMatcher = '\%(:\s*\w\+' . s:typeSpecMatcher . '\?\)'
+let g:fullDefMatcher = '^\s*' . s:defMatcher . '\s\+' . s:funcNameMatcher . '\s*' . s:typeSpecMatcher . '\?\s*' . s:defArgMatcher . '\?\s*' . s:returnTypeMatcher . '\?\s*[={]'
+
+function! scala#ConditionalConfirm(msg)
+ if 0
+ call confirm(a:msg)
+ endif
+endfunction
+
+function! scala#GetLine(lnum)
+ let line = substitute(getline(a:lnum), '//.*$', '', '')
+ let line = substitute(line, '"\(.\|\\"\)\{-}"', '""', 'g')
+ return line
+endfunction
+
+function! scala#CountBrackets(line, openBracket, closedBracket)
+ let line = substitute(a:line, '"\(.\|\\"\)\{-}"', '', 'g')
+ let open = substitute(line, '[^' . a:openBracket . ']', '', 'g')
+ let close = substitute(line, '[^' . a:closedBracket . ']', '', 'g')
+ return strlen(open) - strlen(close)
+endfunction
+
+function! scala#CountParens(line)
+ return scala#CountBrackets(a:line, '(', ')')
+endfunction
+
+function! scala#CountCurlies(line)
+ return scala#CountBrackets(a:line, '{', '}')
+endfunction
+
+function! scala#LineEndsInIncomplete(line)
+ if a:line =~ '[.,]\s*$'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! scala#LineIsAClosingXML(line)
+ if a:line =~ '^\s*</\w'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! scala#LineCompletesXML(lnum, line)
+ let savedpos = getpos('.')
+ call setpos('.', [savedpos[0], a:lnum, 0, savedpos[3]])
+ let tag = substitute(a:line, '^.*</\([^>]*\)>.*$', '\1', '')
+ let [lineNum, colnum] = searchpairpos('<' . tag . '>', '', '</' . tag . '>', 'Wbn')
+ call setpos('.', savedpos)
+ let pline = scala#GetLine(prevnonblank(lineNum - 1))
+ if pline =~ '=\s*$'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! scala#IsParentCase()
+ let savedpos = getpos('.')
+ call setpos('.', [savedpos[0], savedpos[1], 0, savedpos[3]])
+ let [l, c] = searchpos('^\s*\%(' . s:defMatcher . '\|\%(\<case\>\)\)', 'bnW')
+ let retvalue = -1
+ if l != 0 && search('\%' . l . 'l\s*\<case\>', 'bnW')
+ let retvalue = l
+ endif
+ call setpos('.', savedpos)
+ return retvalue
+endfunction
+
+function! scala#CurlyMatcher()
+ let matchline = scala#GetLineThatMatchesBracket('{', '}')
+ if scala#CountParens(scala#GetLine(matchline)) < 0
+ let savedpos = getpos('.')
+ call setpos('.', [savedpos[0], matchline, 9999, savedpos[3]])
+ call searchpos('{', 'Wbc')
+ call searchpos(')', 'Wb')
+ let [lnum, colnum] = searchpairpos('(', '', ')', 'Wbn')
+ call setpos('.', savedpos)
+ let line = scala#GetLine(lnum)
+ if line =~ '^\s*' . s:defMatcher
+ return lnum
+ else
+ return matchline
+ endif
+ else
+ return matchline
+ endif
+endfunction
+
+function! scala#GetLineAndColumnThatMatchesCurly()
+ return scala#GetLineAndColumnThatMatchesBracket('{', '}')
+endfunction
+
+function! scala#GetLineAndColumnThatMatchesParen()
+ return scala#GetLineAndColumnThatMatchesBracket('(', ')')
+endfunction
+
+function! scala#GetLineAndColumnThatMatchesBracket(openBracket, closedBracket)
+ let savedpos = getpos('.')
+ let curline = scala#GetLine(line('.'))
+ if curline =~ a:closedBracket . '.*' . a:openBracket . '.*' . a:closedBracket
+ call setpos('.', [savedpos[0], savedpos[1], 0, savedpos[3]])
+ call searchpos(a:closedBracket . '\ze[^' . a:closedBracket . a:openBracket . ']*' . a:openBracket, 'W')
+ else
+ call setpos('.', [savedpos[0], savedpos[1], 9999, savedpos[3]])
+ call searchpos(a:closedBracket, 'Wbc')
+ endif
+ let [lnum, colnum] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbn')
+ call setpos('.', savedpos)
+ return [lnum, colnum]
+endfunction
+
+function! scala#GetLineThatMatchesCurly()
+ return scala#GetLineThatMatchesBracket('{', '}')
+endfunction
+
+function! scala#GetLineThatMatchesParen()
+ return scala#GetLineThatMatchesBracket('(', ')')
+endfunction
+
+function! scala#GetLineThatMatchesBracket(openBracket, closedBracket)
+ let [lnum, colnum] = scala#GetLineAndColumnThatMatchesBracket(a:openBracket, a:closedBracket)
+ return lnum
+endfunction
+
+function! scala#NumberOfBraceGroups(line)
+ let line = substitute(a:line, '[^()]', '', 'g')
+ if strlen(line) == 0
+ return 0
+ endif
+ let line = substitute(line, '^)*', '', 'g')
+ if strlen(line) == 0
+ return 0
+ endif
+ let line = substitute(line, '^(', '', 'g')
+ if strlen(line) == 0
+ return 0
+ endif
+ let c = 1
+ let counter = 0
+ let groupCount = 0
+ while counter < strlen(line)
+ let char = strpart(line, counter, 1)
+ if char == '('
+ let c = c + 1
+ elseif char == ')'
+ let c = c - 1
+ endif
+ if c == 0
+ let groupCount = groupCount + 1
+ endif
+ let counter = counter + 1
+ endwhile
+ return groupCount
+endfunction
+
+function! scala#MatchesIncompleteDefValr(line)
+ if a:line =~ '^\s*\%(' . s:defMatcher . '\|\<va[lr]\>\).*[=({]\s*$'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! scala#LineIsCompleteIf(line)
+ if scala#CountBrackets(a:line, '{', '}') == 0 &&
+ \ scala#CountBrackets(a:line, '(', ')') == 0 &&
+ \ a:line =~ '^\s*\<if\>\s*([^)]*)\s*\S.*$'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! scala#LineCompletesIfElse(lnum, line)
+ if a:line =~ '^\s*\%(\<if\>\|\%(}\s*\)\?\<else\>\)'
+ return 0
+ endif
+ let result = search('^\%(\s*\<if\>\s*(.*).*\n\|\s*\<if\>\s*(.*)\s*\n.*\n\)\%(\s*\<else\>\s*\<if\>\s*(.*)\s*\n.*\n\)*\%(\s*\<else\>\s*\n\|\s*\<else\>[^{]*\n\)\?\%' . a:lnum . 'l', 'Wbn')
+ if result != 0 && scala#GetLine(prevnonblank(a:lnum - 1)) !~ '{\s*$'
+ return result
+ endif
+ return 0
+endfunction
+
+function! scala#GetPrevCodeLine(lnum)
+ " This needs to skip comment lines
+ return prevnonblank(a:lnum - 1)
+endfunction
+
+function! scala#InvertBracketType(openBracket, closedBracket)
+ if a:openBracket == '('
+ return [ '{', '}' ]
+ else
+ return [ '(', ')' ]
+ endif
+endfunction
+
+function! scala#Testhelper(lnum, line, openBracket, closedBracket, iteration)
+ let bracketCount = scala#CountBrackets(a:line, a:openBracket, a:closedBracket)
+ " There are more '}' braces than '{' on this line so it may be completing the function definition
+ if bracketCount < 0
+ let [matchedLNum, matchedColNum] = scala#GetLineAndColumnThatMatchesBracket(a:openBracket, a:closedBracket)
+ if matchedLNum == a:lnum
+ return -1
+ endif
+ let matchedLine = scala#GetLine(matchedLNum)
+ if ! scala#MatchesIncompleteDefValr(matchedLine)
+ let bracketLine = substitute(substitute(matchedLine, '\%' . matchedColNum . 'c.*$', '', ''), '[^{}()]', '', 'g')
+ if bracketLine =~ '}$'
+ return scala#Testhelper(matchedLNum, matchedLine, '{', '}', a:iteration + 1)
+ elseif bracketLine =~ ')$'
+ return scala#Testhelper(matchedLNum, matchedLine, '(', ')', a:iteration + 1)
+ else
+ let prevCodeLNum = scala#GetPrevCodeLine(matchedLNum)
+ if scala#MatchesIncompleteDefValr(scala#GetLine(prevCodeLNum))
+ return prevCodeLNum
+ else
+ return -1
+ endif
+ endif
+ else
+ " return indent value instead
+ return matchedLNum
+ endif
+ " There's an equal number of '{' and '}' on this line so it may be a single line function definition
+ elseif bracketCount == 0
+ if a:iteration == 0
+ let otherBracketType = scala#InvertBracketType(a:openBracket, a:closedBracket)
+ return scala#Testhelper(a:lnum, a:line, otherBracketType[0], otherBracketType[1], a:iteration + 1)
+ else
+ let prevCodeLNum = scala#GetPrevCodeLine(a:lnum)
+ let prevCodeLine = scala#GetLine(prevCodeLNum)
+ if scala#MatchesIncompleteDefValr(prevCodeLine) && prevCodeLine !~ '{\s*$'
+ return prevCodeLNum
+ else
+ let possibleIfElse = scala#LineCompletesIfElse(a:lnum, a:line)
+ if possibleIfElse != 0
+ let defValrLine = prevnonblank(possibleIfElse - 1)
+ let possibleDefValr = scala#GetLine(defValrLine)
+ if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$'
+ return possibleDefValr
+ else
+ return -1
+ endif
+ else
+ return -1
+ endif
+ endif
+ endif
+ else
+ return -1
+ endif
+endfunction
+
+function! scala#Test(lnum, line, openBracket, closedBracket)
+ return scala#Testhelper(a:lnum, a:line, a:openBracket, a:closedBracket, 0)
+endfunction
+
+function! scala#LineCompletesDefValr(lnum, line)
+ let bracketCount = scala#CountBrackets(a:line, '{', '}')
+ if bracketCount < 0
+ let matchedBracket = scala#GetLineThatMatchesBracket('{', '}')
+ if ! scala#MatchesIncompleteDefValr(scala#GetLine(matchedBracket))
+ let possibleDefValr = scala#GetLine(prevnonblank(matchedBracket - 1))
+ if matchedBracket != -1 && scala#MatchesIncompleteDefValr(possibleDefValr)
+ return 1
+ else
+ return 0
+ endif
+ else
+ return 0
+ endif
+ elseif bracketCount == 0
+ let bracketCount = scala#CountBrackets(a:line, '(', ')')
+ if bracketCount < 0
+ let matchedBracket = scala#GetLineThatMatchesBracket('(', ')')
+ if ! scala#MatchesIncompleteDefValr(scala#GetLine(matchedBracket))
+ let possibleDefValr = scala#GetLine(prevnonblank(matchedBracket - 1))
+ if matchedBracket != -1 && scala#MatchesIncompleteDefValr(possibleDefValr)
+ return 1
+ else
+ return 0
+ endif
+ else
+ return 0
+ endif
+ elseif bracketCount == 0
+ let possibleDefValr = scala#GetLine(prevnonblank(a:lnum - 1))
+ if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$'
+ return 1
+ else
+ let possibleIfElse = scala#LineCompletesIfElse(a:lnum, a:line)
+ if possibleIfElse != 0
+ let possibleDefValr = scala#GetLine(prevnonblank(possibleIfElse - 1))
+ if scala#MatchesIncompleteDefValr(possibleDefValr) && possibleDefValr =~ '^.*=\s*$'
+ return 2
+ else
+ return 0
+ endif
+ else
+ return 0
+ endif
+ endif
+ else
+ return 0
+ endif
+ endif
+endfunction
+
+function! scala#SpecificLineCompletesBrackets(lnum, openBracket, closedBracket)
+ let savedpos = getpos('.')
+ call setpos('.', [savedpos[0], a:lnum, 9999, savedpos[3]])
+ let retv = scala#LineCompletesBrackets(a:openBracket, a:closedBracket)
+ call setpos('.', savedpos)
+
+ return retv
+endfunction
+
+function! scala#LineCompletesBrackets(openBracket, closedBracket)
+ let savedpos = getpos('.')
+ let offline = 0
+ while offline == 0
+ let [lnum, colnum] = searchpos(a:closedBracket, 'Wb')
+ let [lnumA, colnumA] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbn')
+ if lnum != lnumA
+ let [lnumB, colnumB] = searchpairpos(a:openBracket, '', a:closedBracket, 'Wbnr')
+ let offline = 1
+ endif
+ endwhile
+ call setpos('.', savedpos)
+ if lnumA == lnumB && colnumA == colnumB
+ return lnumA
+ else
+ return -1
+ endif
+endfunction
+
+function! GetScalaIndent()
+ " Find a non-blank line above the current line.
+ let prevlnum = prevnonblank(v:lnum - 1)
+
+ " Hit the start of the file, use zero indent.
+ if prevlnum == 0
+ return 0
+ endif
+
+ let ind = indent(prevlnum)
+ let originalIndentValue = ind
+ let prevline = scala#GetLine(prevlnum)
+ let curlnum = v:lnum
+ let curline = scala#GetLine(curlnum)
+ if get(g:, 'scala_scaladoc_indent', 0)
+ let star_indent = 2
+ else
+ let star_indent = 1
+ end
+
+ if prevline =~ '^\s*/\*\*'
+ if prevline =~ '\*/\s*$'
+ return ind
+ else
+ return ind + star_indent
+ endif
+ endif
+
+ if curline =~ '^\s*\*'
+ return cindent(curlnum)
+ endif
+
+ " If this line starts with a { then make it indent the same as the previous line
+ if curline =~ '^\s*{'
+ call scala#ConditionalConfirm("1")
+ " Unless, of course, the previous one is a { as well
+ if prevline !~ '^\s*{'
+ call scala#ConditionalConfirm("2")
+ return indent(prevlnum)
+ endif
+ endif
+
+ " '.' continuations
+ if curline =~ '^\s*\.'
+ if prevline =~ '^\s*\.'
+ return ind
+ else
+ return ind + &shiftwidth
+ endif
+ endif
+
+ " Indent html literals
+ if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$'
+ call scala#ConditionalConfirm("3")
+ return ind + &shiftwidth
+ endif
+
+ " assumes curly braces around try-block
+ if curline =~ '^\s*}\s*\<catch\>'
+ return ind - &shiftwidth
+ elseif curline =~ '^\s*\<catch\>'
+ return ind
+ endif
+
+ " Add a 'shiftwidth' after lines that start a block
+ " If 'if', 'for' or 'while' end with ), this is a one-line block
+ " If 'val', 'var', 'def' end with =, this is a one-line block
+ if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1)
+ \ || prevline =~ '^\s*' . s:defMatcher . '.*=\s*$'
+ \ || prevline =~ '^\s*\<va[lr]\>.*[=]\s*$'
+ \ || prevline =~ '^\s*\%(}\s*\)\?\<else\>\s*$'
+ \ || prevline =~ '=\s*$'
+ call scala#ConditionalConfirm("4")
+ let ind = ind + &shiftwidth
+ elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\<else\>'
+ return ind
+ endif
+
+ let lineCompletedBrackets = 0
+ let bracketCount = scala#CountBrackets(prevline, '{', '}')
+ if bracketCount > 0 || prevline =~ '.*{\s*$'
+ call scala#ConditionalConfirm("5b")
+ let ind = ind + &shiftwidth
+ elseif bracketCount < 0
+ call scala#ConditionalConfirm("6b")
+ " if the closing brace actually completes the braces entirely, then we
+ " have to indent to line that started the whole thing
+ let completeLine = scala#LineCompletesBrackets('{', '}')
+ if completeLine != -1
+ call scala#ConditionalConfirm("8b")
+ let prevCompleteLine = scala#GetLine(prevnonblank(completeLine - 1))
+ " However, what actually started this part looks like it was a function
+ " definition, so we need to indent to that line instead. This is
+ " actually pretty weak at the moment.
+ if prevCompleteLine =~ '=\s*$'
+ call scala#ConditionalConfirm("9b")
+ let ind = indent(prevnonblank(completeLine - 1))
+ else
+ call scala#ConditionalConfirm("10b")
+ let ind = indent(completeLine)
+ endif
+ else
+ let lineCompletedBrackets = 1
+ endif
+ endif
+
+ if ind == originalIndentValue
+ let bracketCount = scala#CountBrackets(prevline, '(', ')')
+ if bracketCount > 0 || prevline =~ '.*(\s*$'
+ call scala#ConditionalConfirm("5a")
+ let ind = ind + &shiftwidth
+ elseif bracketCount < 0
+ call scala#ConditionalConfirm("6a")
+ " if the closing brace actually completes the braces entirely, then we
+ " have to indent to line that started the whole thing
+ let completeLine = scala#LineCompletesBrackets('(', ')')
+ if completeLine != -1 && prevline !~ '^.*{\s*$'
+ call scala#ConditionalConfirm("8a")
+ let prevCompleteLine = scala#GetLine(prevnonblank(completeLine - 1))
+ " However, what actually started this part looks like it was a function
+ " definition, so we need to indent to that line instead. This is
+ " actually pretty weak at the moment.
+ if prevCompleteLine =~ '=\s*$'
+ call scala#ConditionalConfirm("9a")
+ let ind = indent(prevnonblank(completeLine - 1))
+ else
+ call scala#ConditionalConfirm("10a")
+ let ind = indent(completeLine)
+ endif
+ else
+ " This is the only part that's different from from the '{', '}' one below
+ " Yup... some refactoring is necessary at some point.
+ let ind = ind + (bracketCount * &shiftwidth)
+ let lineCompletedBrackets = 1
+ endif
+ endif
+ endif
+
+ if curline =~ '^\s*}\?\s*\<else\>\%(\s\+\<if\>\s*(.*)\)\?\s*{\?\s*$' &&
+ \ ! scala#LineIsCompleteIf(prevline) &&
+ \ prevline !~ '^.*}\s*$'
+ let ind = ind - &shiftwidth
+ endif
+
+ " Subtract a 'shiftwidth' on '}' or html
+ let curCurlyCount = scala#CountCurlies(curline)
+ if curCurlyCount < 0
+ call scala#ConditionalConfirm("14a")
+ let matchline = scala#CurlyMatcher()
+ return indent(matchline)
+ elseif curline =~ '^\s*</[a-zA-Z][^>]*>'
+ call scala#ConditionalConfirm("14c")
+ return ind - &shiftwidth
+ endif
+
+ let prevParenCount = scala#CountParens(prevline)
+ if prevline =~ '^\s*\<for\>.*$' && prevParenCount > 0
+ call scala#ConditionalConfirm("15")
+ let ind = indent(prevlnum) + 5
+ endif
+
+ let prevCurlyCount = scala#CountCurlies(prevline)
+ if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\<case\>'
+ call scala#ConditionalConfirm("16")
+ let ind = ind + &shiftwidth
+ endif
+
+ if ind == originalIndentValue && curline =~ '^\s*\<case\>'
+ call scala#ConditionalConfirm("17")
+ let parentCase = scala#IsParentCase()
+ if parentCase != -1
+ call scala#ConditionalConfirm("17a")
+ return indent(parentCase)
+ endif
+ endif
+
+ if prevline =~ '^\s*\*/'
+ \ || prevline =~ '*/\s*$'
+ call scala#ConditionalConfirm("18")
+ let ind = ind - star_indent
+ endif
+
+ if scala#LineEndsInIncomplete(prevline)
+ call scala#ConditionalConfirm("19")
+ return ind
+ endif
+
+ if scala#LineIsAClosingXML(prevline)
+ if scala#LineCompletesXML(prevlnum, prevline)
+ call scala#ConditionalConfirm("20a")
+ return ind - &shiftwidth
+ else
+ call scala#ConditionalConfirm("20b")
+ return ind
+ endif
+ endif
+
+ if ind == originalIndentValue
+ "let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline)
+ "if indentMultiplier != 0
+ " call scala#ConditionalConfirm("19a")
+ " let ind = ind - (indentMultiplier * &shiftwidth)
+ let defValrLine = scala#Test(prevlnum, prevline, '{', '}')
+ if defValrLine != -1
+ call scala#ConditionalConfirm("21a")
+ let ind = indent(defValrLine)
+ elseif lineCompletedBrackets == 0
+ call scala#ConditionalConfirm("21b")
+ if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\<else\>\s*\%(//.*\)\?$'
+ call scala#ConditionalConfirm("21c")
+ let ind = ind - &shiftwidth
+ elseif scala#LineCompletesIfElse(prevlnum, prevline)
+ call scala#ConditionalConfirm("21d")
+ let ind = ind - &shiftwidth
+ elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$'
+ " Handles situations that look like this:
+ "
+ " val a = func(
+ " 10
+ " )
+ "
+ " or
+ "
+ " val a = func(
+ " 10
+ " ).somethingHere()
+ call scala#ConditionalConfirm("21e")
+ let ind = ind - &shiftwidth
+ endif
+ endif
+ endif
+
+ call scala#ConditionalConfirm("returning " . ind)
+
+ return ind
+endfunction
+
+let &cpo = s:keepcpo
+unlet s:keepcpo
+
+" vim:set sw=2 sts=2 ts=8 et:
+" vim600:fdm=marker fdl=1 fdc=0:
diff --git a/runtime/indent/teraterm.vim b/runtime/indent/teraterm.vim
index ba24257b02..8467cefcc0 100644
--- a/runtime/indent/teraterm.vim
+++ b/runtime/indent/teraterm.vim
@@ -1,9 +1,9 @@
" Vim indent file
" Language: Tera Term Language (TTL)
-" Based on Tera Term Version 4.86
+" Based on Tera Term Version 4.92
" Maintainer: Ken Takata
" URL: https://github.com/k-takata/vim-teraterm
-" Last Change: 2015 Jun 4
+" Last Change: 2016 Aug 17
" Filenames: *.ttl
" License: VIM License
@@ -25,9 +25,7 @@ endif
" The shiftwidth() function is relatively new.
" Don't require it to exist.
if exists('*shiftwidth')
- function s:sw() abort
- return shiftwidth()
- endfunction
+ let s:sw = function('shiftwidth')
else
function s:sw() abort
return &shiftwidth
@@ -48,7 +46,7 @@ function! GetTeraTermIndent(lnum)
let l:ind = l:previ
- if l:prevl =~ '^\s*if\>.*\<then\s*$'
+ if l:prevl =~ '^\s*if\>.*\<then\>'
" previous line opened a block
let l:ind += s:sw()
endif
diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim
index aa4906ce0a..3201462fbc 100644
--- a/runtime/indent/yaml.vim
+++ b/runtime/indent/yaml.vim
@@ -37,7 +37,7 @@ function s:FindPrevLessIndentedLine(lnum, ...)
let curindent = a:0 ? a:1 : indent(a:lnum)
while prevlnum
\&& indent(prevlnum) >= curindent
- \&& getline(prevlnum) !~# '^\s*#'
+ \&& getline(prevlnum) =~# '^\s*#'
let prevlnum = prevnonblank(prevlnum-1)
endwhile
return prevlnum
@@ -51,11 +51,33 @@ function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex)
return plilnum
endfunction
-let s:mapkeyregex='\v^\s*%(\''%([^'']|'''')*\'''.
- \ '|\"%([^"\\]|\\.)*\"'.
- \ '|%(%(\:\ )@!.)*)\:%(\ |$)'
+let s:mapkeyregex='\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\'''.
+ \ '|\"%([^"\\]|\\.)*\"'.
+ \ '|%(%(\:\ )@!.)*)\:%(\ |$)'
let s:liststartregex='\v^\s*%(\-%(\ |$))'
+let s:c_ns_anchor_char = '\v%([\n\r\uFEFF \t,[\]{}]@!\p)'
+let s:c_ns_anchor_name = s:c_ns_anchor_char.'+'
+let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name
+
+let s:ns_word_char = '\v[[:alnum:]_\-]'
+let s:ns_tag_char = '\v%(%\x\x|'.s:ns_word_char.'|[#/;?:@&=+$.~*''()])'
+let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!'
+let s:c_secondary_tag_handle = '\v\!\!'
+let s:c_primary_tag_handle = '\v\!'
+let s:c_tag_handle = '\v%('.s:c_named_tag_handle.
+ \ '|'.s:c_secondary_tag_handle.
+ \ '|'.s:c_primary_tag_handle.')'
+let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+'
+let s:c_non_specific_tag = '\v\!'
+let s:ns_uri_char = '\v%(%\x\x|'.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])'
+let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>'
+let s:c_ns_tag_property = '\v'.s:c_verbatim_tag.
+ \ '\v|'.s:c_ns_shorthand_tag.
+ \ '\v|'.s:c_non_specific_tag
+
+let s:block_scalar_header = '\v[|>]%([+-]?[1-9]|[1-9]?[+-])?'
+
function GetYAMLIndent(lnum)
if a:lnum == 1 || !prevnonblank(a:lnum-1)
return 0
@@ -127,7 +149,10 @@ function GetYAMLIndent(lnum)
" - List with
" multiline scalar
return previndent+2
- elseif prevline =~# s:mapkeyregex
+ elseif prevline =~# s:mapkeyregex . '\v\s*%(%('.s:c_ns_tag_property.
+ \ '\v|'.s:c_ns_anchor_property.
+ \ '\v|'.s:block_scalar_header.
+ \ '\v)%(\s+|\s*%(\#.*)?$))*'
" Mapping with: value
" that is multiline scalar
return previndent+s:shiftwidth()
diff --git a/runtime/keymap/pinyin.vim b/runtime/keymap/pinyin.vim
index 757850b83f..253814c753 100644
--- a/runtime/keymap/pinyin.vim
+++ b/runtime/keymap/pinyin.vim
@@ -1,5 +1,5 @@
" Vim Keymap file for Hanyu Pinyin tone marks through numbers.
-" Maintainer: Fredrik Roubert <roubert@df.lth.se>
+" Maintainer: Fredrik Roubert <fredrik@roubert.name>
" Last Changed: February 15, 2004
" All characters are given literally.
diff --git a/runtime/keymap/russian-jcukenmac.vim b/runtime/keymap/russian-jcukenmac.vim
new file mode 100644
index 0000000000..e2120ca1d4
--- /dev/null
+++ b/runtime/keymap/russian-jcukenmac.vim
@@ -0,0 +1,94 @@
+" Vim Keymap file for russian characters, layout 'jcuken', Mac variant
+
+" Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru>
+" Maintainer: Anton Fonarev <avfonarev@gmail.com>
+" Last Changed: 2016 August 17
+
+" All characters are given literally, conversion to another encoding (e.g.,
+" UTF-8) should work.
+
+scriptencoding utf-8
+
+let b:keymap_name = "ru"
+
+loadkeymap
+
+\| Ё CYRILLIC CAPITAL LETTER IO
+\\ ё CYRILLIC SMALL LETTER IO
+
+F А CYRILLIC CAPITAL LETTER A
+< Б CYRILLIC CAPITAL LETTER BE
+D В CYRILLIC CAPITAL LETTER VE
+U Г CYRILLIC CAPITAL LETTER GHE
+L Д CYRILLIC CAPITAL LETTER DE
+T Е CYRILLIC CAPITAL LETTER IE
+: Ж CYRILLIC CAPITAL LETTER ZHE
+P З CYRILLIC CAPITAL LETTER ZE
+B И CYRILLIC CAPITAL LETTER I
+Q Й CYRILLIC CAPITAL LETTER SHORT I
+R К CYRILLIC CAPITAL LETTER KA
+K Л CYRILLIC CAPITAL LETTER EL
+V М CYRILLIC CAPITAL LETTER EM
+Y Н CYRILLIC CAPITAL LETTER EN
+J О CYRILLIC CAPITAL LETTER O
+G П CYRILLIC CAPITAL LETTER PE
+H Р CYRILLIC CAPITAL LETTER ER
+C С CYRILLIC CAPITAL LETTER ES
+N Т CYRILLIC CAPITAL LETTER TE
+E У CYRILLIC CAPITAL LETTER U
+A Ф CYRILLIC CAPITAL LETTER EF
+{ Х CYRILLIC CAPITAL LETTER HA
+W Ц CYRILLIC CAPITAL LETTER TSE
+X Ч CYRILLIC CAPITAL LETTER CHE
+I Ш CYRILLIC CAPITAL LETTER SHA
+O Щ CYRILLIC CAPITAL LETTER SHCHA
+} Ъ CYRILLIC CAPITAL LETTER HARD SIGN
+S Ы CYRILLIC CAPITAL LETTER YERU
+M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
+\" Э CYRILLIC CAPITAL LETTER E
+> Ю CYRILLIC CAPITAL LETTER YU
+Z Я CYRILLIC CAPITAL LETTER YA
+f а CYRILLIC SMALL LETTER A
+, б CYRILLIC SMALL LETTER BE
+d в CYRILLIC SMALL LETTER VE
+u г CYRILLIC SMALL LETTER GHE
+l д CYRILLIC SMALL LETTER DE
+t е CYRILLIC SMALL LETTER IE
+; ж CYRILLIC SMALL LETTER ZHE
+p з CYRILLIC SMALL LETTER ZE
+b и CYRILLIC SMALL LETTER I
+q й CYRILLIC SMALL LETTER SHORT I
+r к CYRILLIC SMALL LETTER KA
+k л CYRILLIC SMALL LETTER EL
+v м CYRILLIC SMALL LETTER EM
+y н CYRILLIC SMALL LETTER EN
+j о CYRILLIC SMALL LETTER O
+g п CYRILLIC SMALL LETTER PE
+h р CYRILLIC SMALL LETTER ER
+c с CYRILLIC SMALL LETTER ES
+n т CYRILLIC SMALL LETTER TE
+e у CYRILLIC SMALL LETTER U
+a ф CYRILLIC SMALL LETTER EF
+[ х CYRILLIC SMALL LETTER HA
+w ц CYRILLIC SMALL LETTER TSE
+x ч CYRILLIC SMALL LETTER CHE
+i ш CYRILLIC SMALL LETTER SHA
+o щ CYRILLIC SMALL LETTER SHCHA
+] ъ CYRILLIC SMALL LETTER HARD SIGN
+s ы CYRILLIC SMALL LETTER YERU
+m ь CYRILLIC SMALL LETTER SOFT SIGN
+' э CYRILLIC SMALL LETTER E
+. ю CYRILLIC SMALL LETTER YU
+z я CYRILLIC SMALL LETTER YA
+
+§ >
+± <
+@ "
+# №
+$ %
+% :
+^ ,
+& .
+* ;
+` ]
+~ [
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 2053b2d860..36d1741362 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2016 Aug 12
+" Last Change: 2016 Aug 21
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -1146,8 +1146,8 @@ endif
if has("langmap")
call append("$", "langmap\tlist of characters that are translated in Normal mode")
call <SID>OptionG("lmap", &lmap)
- call append("$", "langnoremap\tdon't apply 'langmap' to mapped characters")
- call <SID>BinOptionG("lnr", &lnr)
+ call append("$", "langremap\tapply 'langmap' to mapped characters")
+ call <SID>BinOptionG("lrm", &lrm)
endif
if has("xim")
call append("$", "imdisable\twhen set never use IM; overrules following IM options")
diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim
index c0f1f08027..f275f7b36d 100644
--- a/runtime/plugin/matchit.vim
+++ b/runtime/plugin/matchit.vim
@@ -1,8 +1,10 @@
" matchit.vim: (global plugin) Extended "%" matching
-" Last Change: Fri Jul 29 01:20 AM 2016 EST
+" Last Change: 2016 Aug 21
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
" Version: 1.13.2, for Vim 6.3+
" Fix from Tommy Allen included.
+" Fix from Fernando Torres included.
+" Improvement from Ken Takata included.
" URL: http://www.vim.org/script.php?script_id=39
" Documentation:
@@ -44,6 +46,7 @@ endif
let loaded_matchit = 1
let s:last_mps = ""
let s:last_words = ":"
+let s:patBR = ""
let s:save_cpo = &cpo
set cpo&vim
@@ -121,8 +124,8 @@ function! s:Match_wrapper(word, forward, mode) range
execute "let match_words =" b:match_words
endif
" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
- if (match_words != s:last_words) || (&mps != s:last_mps) ||
- \ exists("b:match_debug")
+ if (match_words != s:last_words) || (&mps != s:last_mps)
+ \ || exists("b:match_debug")
let s:last_mps = &mps
" The next several lines were here before
" BF started messing with this script.
@@ -148,6 +151,10 @@ function! s:Match_wrapper(word, forward, mode) range
if exists("b:match_debug")
let b:match_pat = s:pat
endif
+ " Reconstruct the version with unresolved backrefs.
+ let s:patBR = substitute(match_words.',',
+ \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
+ let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
endif
" Second step: set the following local variables:
@@ -192,14 +199,10 @@ function! s:Match_wrapper(word, forward, mode) range
" group = colon-separated list of patterns, one of which matches
" = ini:mid:fin or ini:fin
"
- " Reconstruct the version with unresolved backrefs.
- let patBR = substitute(match_words.',',
- \ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
- let patBR = substitute(patBR, s:notslash.'\zs:\{2,}', ':', 'g')
" Now, set group and groupBR to the matching group: 'if:endif' or
" 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
" group . "," . groupBR, and we pick it apart.
- let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
+ let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, s:patBR)
let i = matchend(group, s:notslash . ",")
let groupBR = strpart(group, i)
let group = strpart(group, 0, i-1)
@@ -656,6 +659,7 @@ fun! s:MultiMatch(spflag, mode)
\ exists("b:match_debug")
let s:last_words = match_words
let s:last_mps = &mps
+ let match_words = match_words . (strlen(match_words) ? "," : "") . default
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
@@ -663,8 +667,8 @@ fun! s:MultiMatch(spflag, mode)
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
- let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default,
- \ '[,:]\+','\\|','g') . '\)'
+ let s:all = '\%(' . substitute(s:pat . (strlen(s:pat) ? "," : "") . default,
+ \ '[,:]\+', '\\|', 'g') . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim
index b470e56f60..06e5390c60 100644
--- a/runtime/syntax/fortran.vim
+++ b/runtime/syntax/fortran.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
-" Version: 0.97
-" Last Change: 2016 Feb. 26
+" Version: 0.98
+" Last Change: 2016 Aug. 26
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
@@ -10,7 +10,8 @@
" in chronological order, by:
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonn, Alexander Wagner, Roman Bertle, Charles Rendleman,
-" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, and Jan Hermann.
+" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
+" Stefano Zaghi and Vishnu Krishnan.
if exists("b:current_syntax")
finish
@@ -108,6 +109,7 @@ syn match fortranUnitHeader "\<subroutine\>"
syn keyword fortranCall call
syn match fortranUnitHeader "\<function\>"
syn match fortranUnitHeader "\<program\>"
+syn match fortranUnitHeader "\<block\>"
syn keyword fortranKeyword return stop
syn keyword fortranConditional else then
syn match fortranConditional "\<if\>"
@@ -208,6 +210,7 @@ syn match fortranStorageClass "\<kind\s*="me=s+4
syn match fortranStorageClass "\<len\s*="me=s+3
syn match fortranUnitHeader "\<module\>"
+syn match fortranUnitHeader "\<submodule\>"
syn keyword fortranUnitHeader use only contains
syn keyword fortranUnitHeader result operator assignment
syn match fortranUnitHeader "\<interface\>"
@@ -231,8 +234,10 @@ syn match fortranIntrinsic "\<kind\>\s*[(,]"me=s+4
syn match fortranUnitHeader "\<end\s*function"
syn match fortranUnitHeader "\<end\s*interface"
syn match fortranUnitHeader "\<end\s*module"
+syn match fortranUnitHeader "\<end\s*submodule"
syn match fortranUnitHeader "\<end\s*program"
syn match fortranUnitHeader "\<end\s*subroutine"
+syn match fortranUnitHeader "\<end\s*block"
syn match fortranRepeat "\<end\s*do"
syn match fortranConditional "\<end\s*where"
syn match fortranConditional "\<select\s*case"
@@ -267,6 +272,7 @@ syn match fortranRepeat "\<end\s*forall"
syn keyword fortranIntrinsic null cpu_time
syn match fortranType "\<elemental\>"
syn match fortranType "\<pure\>"
+syn match fortranType "\<impure\>"
if exists("fortran_more_precise")
syn match fortranConstructName "\(\<end\s*forall\s\+\)\@<=\a\w*\>"
endif
@@ -286,8 +292,9 @@ if b:fortran_dialect == "f08"
syn keyword fortranReadWrite flush wait
syn keyword fortranIO decimal round iomsg
- syn keyword fortranType asynchronous nopass non_overridable pass protected volatile abstract extends import
+ syn keyword fortranType asynchronous nopass non_overridable pass protected volatile extends import
syn keyword fortranType non_intrinsic value bind deferred generic final enumerator
+ syn match fortranType "\<abstract\>"
syn match fortranType "\<class\>"
syn match fortranType "\<associate\>"
syn match fortranType "\<end\s*associate"
@@ -305,6 +312,7 @@ if b:fortran_dialect == "f08"
syn keyword fortranIntrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image
syn keyword fortranIO newunit
syn keyword fortranType contiguous
+ syn keyword fortranRepeat concurrent
" CUDA fortran
syn match fortranTypeCUDA "\<attributes\>"
@@ -383,20 +391,22 @@ if exists("fortran_fold")
if (b:fortran_fixed_source == 1)
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
+ syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(submodule\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
- syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
- syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
- syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
- syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
else
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
+ syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(submodule\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
- syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
- syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
+ syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
- syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
- syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
+ syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface
endif
if exists("fortran_fold_conditionals")
diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim
index abe9bfd76b..94b27313b2 100644
--- a/runtime/syntax/muttrc.vim
+++ b/runtime/syntax/muttrc.vim
@@ -2,10 +2,9 @@
" Language: Mutt setup files
" Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org>
" Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net>
-" Last Change: 2 Feb 2012
+" Last Change: 18 August 2016
-" This file covers mutt version 1.5.21 (and most of the mercurial tip)
-" Included are also a few features from 1.4.2.1
+" This file covers mutt version 1.7.0
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -98,7 +97,7 @@ syn match muttrcSetNumAssignment contained skipwhite /=\s*'\d\+'/hs=s+1 nextgrou
" Now catch some email addresses and headers (purified version from mail.vim)
syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+"
-syn match muttrcHeader "\<\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
+syn match muttrcHeader "\<\c\%(From\|To\|C[Cc]\|B[Cc][Cc]\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\="
syn match muttrcKeySpecial contained +\%(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+
syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial,muttrcKeyName
@@ -109,143 +108,146 @@ syn match muttrcKeyName contained "\\[trne]"
syn match muttrcKeyName contained "\c<\%(BackSpace\|BackTab\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>"
syn match muttrcKeyName contained "<F[0-9]\+>"
-syn keyword muttrcVarBool skipwhite contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split auto_tag autoedit beep beep_new nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained bounce_delivered braille_friendly check_new check_mbox_size nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained collapse_unread confirmappend confirmcreate crypt_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained crypt_autopgp crypt_autosign crypt_autosmime crypt_replyencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained crypt_replysign crypt_replysignencrypted crypt_timestamp nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained edit_hdrs edit_headers encode_from envelope_from fast_reply nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained fcc_clear followup_to force_name forw_decode nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained forw_decrypt forw_quote forward_decode forward_decrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained forward_quote hdrs header help hidden_host hide_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained hide_missing hide_thread_subject hide_top_limited nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained hide_top_missing honor_disposition ignore_linear_white_space ignore_list_reply_to imap_check_subscribed nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained imap_list_subscribed imap_passive imap_peek imap_servernoise nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained implicit_autoview include_onlyfirst keep_flagged nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained mailcap_sanitize maildir_header_cache_verify maildir_trash nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained mark_old markers menu_move_off menu_scroll message_cache_clean meta_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained metoo mh_purge mime_forward_decode narrow_tree pager_stop nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained pgp_auto_decode pgp_auto_traditional pgp_autoencrypt nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained pgp_autoinline pgp_autosign pgp_check_exit nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained pgp_create_traditional pgp_ignore_subkeys pgp_long_ids nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained pgp_replyencrypt pgp_replyinline pgp_replysign nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained pop_auth_try_all pop_last print_decode print_split nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained prompt_after read_only reply_self resolve reverse_alias nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained reverse_name reverse_realname rfc2047_parameters save_address nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained save_empty save_name score sig_dashes sig_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained strict_mime strict_threads suspend text_flowed thorough_search nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained thread_received tilde uncollapse_jump use_8bitmime nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained use_domain use_envelope_from use_from use_idn use_ipv6 nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained user_agent wait_key weed wrap_search write_bcc nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-
-syn keyword muttrcVarBool skipwhite contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noaskcc noattach_split noauto_tag noautoedit nobeep nobeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nobounce_delivered nobraille_friendly nocheck_new nocollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noconfirmappend noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nocrypt_autosign nocrypt_autosmime nocrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nocrypt_use_gpgme nodelete_untag nodigest_collapse noduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noedit_hdrs noedit_headers noencode_from noenvelope_from nofast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nofcc_clear nofollowup_to noforce_name noforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noforw_decrypt noforw_quote noforward_decode noforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nohide_missing nohide_thread_subject nohide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nohide_top_missing nohonor_disposition noignore_list_reply_to noimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noimplicit_autoview noinclude_onlyfirst nokeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nomailcap_sanitize nomaildir_header_cache_verify nomaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nomark_old nomarkers nomenu_move_off nomenu_scroll nometa_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nometoo nomh_purge nomime_forward_decode nonarrow_tree nopager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nopgp_autoinline nopgp_autosign nopgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nopgp_create_traditional nopgp_ignore_subkeys nopgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nopgp_replyencrypt nopgp_replyinline nopgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nopop_auth_try_all nopop_last noprint_decode noprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noprompt_after noread_only noreply_self noresolve noreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained noreverse_name noreverse_realname norfc2047_parameters nosave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nosave_empty nosave_name noscore nosig_dashes nosig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nosmime_is_default nosort_re nossl_force_tls nossl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts nostatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nostrict_threads nosuspend notext_flowed nothorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nothread_received notilde nouncollapse_jump nouse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nouse_domain nouse_envelope_from nouse_from nouse_idn nouse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained nouser_agent nowait_key noweed nowrap_search nowrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-
-syn keyword muttrcVarBool skipwhite contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invbounce_delivered invbraille_friendly invcheck_new invcollapse_unread nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invcrypt_autosign invcrypt_autosmime invcrypt_replyencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invcrypt_use_gpgme invdelete_untag invdigest_collapse invduplicate_threads nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invfcc_clear invfollowup_to invforce_name invforw_decode nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invforw_decrypt invforw_quote invforward_decode invforward_decrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invhide_missing invhide_thread_subject invhide_top_limited nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invhide_top_missing invhonor_disposition invignore_list_reply_to invimap_check_subscribed nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invimap_list_subscribed invimap_passive invimap_peek invimap_servernoise nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invimplicit_autoview invinclude_onlyfirst invkeep_flagged nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invmailcap_sanitize invmaildir_header_cache_verify invmaildir_trash nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invmark_old invmarkers invmenu_move_off invmenu_scroll invmeta_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invmetoo invmh_purge invmime_forward_decode invnarrow_tree invpager_stop nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invpgp_autoinline invpgp_autosign invpgp_check_exit nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invpgp_replyencrypt invpgp_replyinline invpgp_replysign nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invpop_auth_try_all invpop_last invprint_decode invprint_split nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invprompt_after invread_only invreply_self invresolve invreverse_alias nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invsave_empty invsave_name invscore invsig_dashes invsig_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invsmime_is_default invsort_re invssl_force_tls invssl_use_sslv2 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts invstatus_on_top nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invstrict_threads invsuspend invtext_flowed invthorough_search nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invthread_received invtilde invuncollapse_jump invuse_8bitmime nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invuse_domain invuse_envelope_from invuse_from invuse_idn invuse_ipv6 nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarBool skipwhite contained invuser_agent invwait_key invweed invwrap_search invwrite_bcc nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-if use_mutt_sidebar == 1
- syn keyword muttrcVarBool skipwhite contained sidebar_visible sidebar_sort nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-endif
-
-syn keyword muttrcVarQuad skipwhite contained abort_nosubject abort_unmodified bounce copy nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained crypt_verify_sig delete fcc_attach forward_edit honor_followup_to nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained include mime_forward mime_forward_rest mime_fwd move nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained pgp_mime_auto pgp_verify_sig pop_delete pop_reconnect nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained postpone print quit recall reply_to ssl_starttls nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-
-syn keyword muttrcVarQuad skipwhite contained noabort_nosubject noabort_unmodified nobounce nocopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained nocrypt_verify_sig nodelete nofcc_attach noforward_edit nohonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained noinclude nomime_forward nomime_forward_rest nomime_fwd nomove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained nopostpone noprint noquit norecall noreply_to nossl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-
-syn keyword muttrcVarQuad skipwhite contained invabort_nosubject invabort_unmodified invbounce invcopy nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained invcrypt_verify_sig invdelete invfcc_attach invforward_edit invhonor_followup_to nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained invinclude invmime_forward invmime_forward_rest invmime_fwd invmove nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained invpgp_mime_auto invpgp_verify_sig invpop_delete invpop_reconnect nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarQuad skipwhite contained invpostpone invprint invquit invrecall invreply_to invssl_starttls nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-
-syn keyword muttrcVarNum skipwhite contained connect_timeout history imap_keepalive imap_pipeline_depth mail_check nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarNum skipwhite contained menu_context net_inc pager_context pager_index_lines pgp_timeout nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarNum skipwhite contained pop_checkinterval read_inc save_history score_threshold_delete nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarNum skipwhite contained score_threshold_flag score_threshold_read search_context sendmail_wait sleep_time nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarNum skipwhite contained smime_timeout ssl_min_dh_prime_bits timeout time_inc wrap wrapmargin nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarNum skipwhite contained write_inc nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-if use_mutt_sidebar == 1
- syn keyword muttrcVarNum skipwhite contained sidebar_width nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-endif
+syn keyword muttrcVarBool skipwhite contained
+ \ allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split
+ \ auto_tag autoedit beep beep_new bounce_delivered braille_friendly
+ \ check_mbox_size check_new collapse_unread confirmappend confirmcreate
+ \ crypt_autoencrypt crypt_autopgp crypt_autosign crypt_autosmime
+ \ crypt_confirmhook crypt_opportunistic_encrypt crypt_replyencrypt
+ \ crypt_replysign crypt_replysignencrypted crypt_timestamp crypt_use_gpgme
+ \ crypt_use_pka delete_untag digest_collapse duplicate_threads edit_hdrs
+ \ edit_headers encode_from envelope_from fast_reply fcc_clear followup_to
+ \ force_name forw_decode forw_decrypt forw_quote forward_decode forward_decrypt
+ \ forward_quote hdrs header help hidden_host hide_limited hide_missing
+ \ hide_thread_subject hide_top_limited hide_top_missing honor_disposition
+ \ idn_decode idn_encode ignore_linear_white_space ignore_list_reply_to
+ \ imap_check_subscribed imap_list_subscribed imap_passive imap_peek
+ \ imap_servernoise implicit_autoview include_onlyfirst keep_flagged
+ \ mail_check_recent mail_check_stats mailcap_sanitize maildir_check_cur
+ \ maildir_header_cache_verify maildir_trash mark_old markers menu_move_off
+ \ menu_scroll message_cache_clean meta_key metoo mh_purge mime_forward_decode
+ \ narrow_tree pager_stop pgp_auto_decode pgp_auto_traditional pgp_autoencrypt
+ \ pgp_autoinline pgp_autosign pgp_check_exit pgp_create_traditional
+ \ pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replyinline pgp_replysign
+ \ pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable pgp_strict_enc
+ \ pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all pop_last
+ \ postpone_encrypt postpone_encrypt_as print_decode print_split prompt_after
+ \ read_only reflow_space_quotes reflow_text reflow_wrap reply_self resolve
+ \ resume_draft_files resume_edited_draft_files reverse_alias reverse_name
+ \ reverse_realname rfc2047_parameters save_address save_empty save_name score
+ \ sidebar_folder_indent sidebar_new_mail_only sidebar_next_new_wrap
+ \ sidebar_short_path sidebar_sort sidebar_visible sig_dashes sig_on_top
+ \ smart_wrap smime_ask_cert_label smime_decrypt_use_default_key smime_is_default
+ \ sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1
+ \ ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top strict_mime
+ \ strict_threads suspend text_flowed thorough_search thread_received tilde
+ \ ts_enabled uncollapse_jump use_8bitmime use_domain use_envelope_from use_from
+ \ use_idn use_ipv6 user_agent wait_key weed wrap_search write_bcc
+ \ nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+
+syn keyword muttrcVarBool skipwhite contained
+ \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc noattach_split
+ \ noauto_tag noautoedit nobeep nobeep_new nobounce_delivered nobraille_friendly
+ \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend noconfirmcreate
+ \ nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign nocrypt_autosmime
+ \ nocrypt_confirmhook nocrypt_opportunistic_encrypt nocrypt_replyencrypt
+ \ nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nocrypt_use_gpgme
+ \ nocrypt_use_pka nodelete_untag nodigest_collapse noduplicate_threads noedit_hdrs
+ \ noedit_headers noencode_from noenvelope_from nofast_reply nofcc_clear nofollowup_to
+ \ noforce_name noforw_decode noforw_decrypt noforw_quote noforward_decode noforward_decrypt
+ \ noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nohide_missing
+ \ nohide_thread_subject nohide_top_limited nohide_top_missing nohonor_disposition
+ \ noidn_decode noidn_encode noignore_linear_white_space noignore_list_reply_to
+ \ noimap_check_subscribed noimap_list_subscribed noimap_passive noimap_peek
+ \ noimap_servernoise noimplicit_autoview noinclude_onlyfirst nokeep_flagged
+ \ nomail_check_recent nomail_check_stats nomailcap_sanitize nomaildir_check_cur
+ \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers nomenu_move_off
+ \ nomenu_scroll nomessage_cache_clean nometa_key nometoo nomh_purge nomime_forward_decode
+ \ nonarrow_tree nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt
+ \ nopgp_autoinline nopgp_autosign nopgp_check_exit nopgp_create_traditional
+ \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline nopgp_replysign
+ \ nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nopgp_strict_enc
+ \ nopgp_use_gpg_agent nopipe_decode nopipe_split nopop_auth_try_all nopop_last
+ \ nopostpone_encrypt nopostpone_encrypt_as noprint_decode noprint_split noprompt_after
+ \ noread_only noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve
+ \ noresume_draft_files noresume_edited_draft_files noreverse_alias noreverse_name
+ \ noreverse_realname norfc2047_parameters nosave_address nosave_empty nosave_name noscore
+ \ nosidebar_folder_indent nosidebar_new_mail_only nosidebar_next_new_wrap
+ \ nosidebar_short_path nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top
+ \ nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default
+ \ nosort_re nossl_force_tls nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1
+ \ nossl_usesystemcerts nossl_verify_dates nossl_verify_host nostatus_on_top nostrict_mime
+ \ nostrict_threads nosuspend notext_flowed nothorough_search nothread_received notilde
+ \ nots_enabled nouncollapse_jump nouse_8bitmime nouse_domain nouse_envelope_from nouse_from
+ \ nouse_idn nouse_ipv6 nouser_agent nowait_key noweed nowrap_search nowrite_bcc
+ \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+
+syn keyword muttrcVarBool skipwhite contained
+ \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc invaskcc invattach_split
+ \ invauto_tag invautoedit invbeep invbeep_new invbounce_delivered invbraille_friendly
+ \ invcheck_mbox_size invcheck_new invcollapse_unread invconfirmappend invconfirmcreate
+ \ invcrypt_autoencrypt invcrypt_autopgp invcrypt_autosign invcrypt_autosmime
+ \ invcrypt_confirmhook invcrypt_opportunistic_encrypt invcrypt_replyencrypt
+ \ invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme
+ \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads invedit_hdrs
+ \ invedit_headers invencode_from invenvelope_from invfast_reply invfcc_clear invfollowup_to
+ \ invforce_name invforw_decode invforw_decrypt invforw_quote invforward_decode invforward_decrypt
+ \ invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited invhide_missing
+ \ invhide_thread_subject invhide_top_limited invhide_top_missing invhonor_disposition
+ \ invidn_decode invidn_encode invignore_linear_white_space invignore_list_reply_to
+ \ invimap_check_subscribed invimap_list_subscribed invimap_passive invimap_peek
+ \ invimap_servernoise invimplicit_autoview invinclude_onlyfirst invkeep_flagged
+ \ invmail_check_recent invmail_check_stats invmailcap_sanitize invmaildir_check_cur
+ \ invmaildir_header_cache_verify invmaildir_trash invmark_old invmarkers invmenu_move_off
+ \ invmenu_scroll invmessage_cache_clean invmeta_key invmetoo invmh_purge invmime_forward_decode
+ \ invnarrow_tree invpager_stop invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt
+ \ invpgp_autoinline invpgp_autosign invpgp_check_exit invpgp_create_traditional
+ \ invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replyinline invpgp_replysign
+ \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable invpgp_strict_enc
+ \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all invpop_last
+ \ invpostpone_encrypt invpostpone_encrypt_as invprint_decode invprint_split invprompt_after
+ \ invread_only invreflow_space_quotes invreflow_text invreflow_wrap invreply_self invresolve
+ \ invresume_draft_files invresume_edited_draft_files invreverse_alias invreverse_name
+ \ invreverse_realname invrfc2047_parameters invsave_address invsave_empty invsave_name invscore
+ \ invsidebar_folder_indent invsidebar_new_mail_only invsidebar_next_new_wrap
+ \ invsidebar_short_path invsidebar_sort invsidebar_visible invsig_dashes invsig_on_top
+ \ invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default
+ \ invsort_re invssl_force_tls invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1
+ \ invssl_usesystemcerts invssl_verify_dates invssl_verify_host invstatus_on_top invstrict_mime
+ \ invstrict_threads invsuspend invtext_flowed invthorough_search invthread_received invtilde
+ \ invts_enabled invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from invuse_from
+ \ invuse_idn invuse_ipv6 invuser_agent invwait_key invweed invwrap_search invwrite_bcc
+ \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+
+syn keyword muttrcVarQuad skipwhite contained
+ \ abort_nosubject abort_unmodified bounce copy crypt_verify_sig delete
+ \ fcc_attach forward_edit honor_followup_to include mime_forward
+ \ mime_forward_rest mime_fwd move pgp_mime_auto pgp_verify_sig pop_delete
+ \ pop_reconnect postpone print quit recall reply_to ssl_starttls
+ \ nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+
+syn keyword muttrcVarQuad skipwhite contained
+ \ noabort_nosubject noabort_unmodified nobounce nocopy nocrypt_verify_sig nodelete
+ \ nofcc_attach noforward_edit nohonor_followup_to noinclude nomime_forward
+ \ nomime_forward_rest nomime_fwd nomove nopgp_mime_auto nopgp_verify_sig nopop_delete
+ \ nopop_reconnect nopostpone noprint noquit norecall noreply_to nossl_starttls
+ \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+
+syn keyword muttrcVarQuad skipwhite contained
+ \ invabort_nosubject invabort_unmodified invbounce invcopy invcrypt_verify_sig invdelete
+ \ invfcc_attach invforward_edit invhonor_followup_to invinclude invmime_forward
+ \ invmime_forward_rest invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete
+ \ invpop_reconnect invpostpone invprint invquit invrecall invreply_to invssl_starttls
+ \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
+
+syn keyword muttrcVarNum skipwhite contained
+ \ connect_timeout history imap_keepalive imap_pipeline_depth mail_check
+ \ mail_check_stats_interval menu_context net_inc pager_context pager_index_lines
+ \ pgp_timeout pop_checkinterval read_inc save_history score_threshold_delete
+ \ score_threshold_flag score_threshold_read search_context sendmail_wait
+ \ sidebar_width sleep_time smime_timeout ssl_min_dh_prime_bits time_inc timeout
+ \ wrap wrap_headers wrapmargin write_inc
+ \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syn match muttrcFormatErrors contained /%./
@@ -349,7 +351,7 @@ syn keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqu
syn match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr
syn keyword muttrcVarStr contained skipwhite pgp_decode_command pgp_verify_command pgp_decrypt_command pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command pgp_encrypt_only_command pgp_import_command pgp_export_command pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command nextgroup=muttrcVarEqualsPGPCmdFmt
syn match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr
-syn keyword muttrcVarStr contained skipwhite status_format nextgroup=muttrcVarEqualsStatusFmt
+syn keyword muttrcVarStr contained skipwhite ts_icon_format ts_status_format status_format nextgroup=muttrcVarEqualsStatusFmt
syn match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr
syn keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt
syn match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr
@@ -361,34 +363,29 @@ syn match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStr
syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite alias_file assumed_charset attach_charset attach_sep nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite certificate_file charset config_charset content_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite default_hook display_filter dotlock_program dsn_notify nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite dsn_return editor entropy_file envelope_from_address escape folder nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite forw_format forward_format from gecos_mask hdr_format nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite header_cache header_cache_compress header_cache_pagesize nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite history_file hostname imap_authenticators nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite imap_delim_chars imap_headers imap_idle imap_login imap_pass nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite imap_user indent_str indent_string ispell locale mailcap_path nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite mh_seq_unseen mixmaster msg_format pager nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite pgp_good_sign nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_filename nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite pgp_mime_signature_description pgp_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite pgp_sort_keys nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite post_indent_string postponed preconnect print_cmd print_command nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite query_command quote_regexp realname record reply_regexp send_charset nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite sendmail shell signature simple_search smileys smime_ca_location nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite smime_certificates smime_default_key nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite smime_encrypt_with nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite smime_keys smime_sign_as nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite smtp_url smtp_authenticators smtp_pass sort sort_alias sort_aux nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-syn keyword muttrcVarStr contained skipwhite status_chars tmpdir to_chars tunnel visual nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-if use_mutt_sidebar == 1
- syn keyword muttrcVarStr skipwhite contained sidebar_delim nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
-endif
+syn keyword muttrcVarStr contained skipwhite
+ \ alias_file assumed_charset attach_charset attach_sep certificate_file charset
+ \ config_charset content_type default_hook display_filter dotlock_program
+ \ dsn_notify dsn_return editor entropy_file envelope_from_address escape folder
+ \ forw_format forward_format from gecos_mask hdr_format header_cache
+ \ header_cache_compress header_cache_pagesize history_file hostname
+ \ imap_authenticators imap_delim_chars imap_headers imap_idle imap_login
+ \ imap_pass imap_user indent_str indent_string ispell locale mailcap_path mask
+ \ mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied mh_seq_unseen
+ \ mixmaster msg_format pager pgp_decryption_okay pgp_good_sign
+ \ pgp_mime_signature_description pgp_mime_signature_filename pgp_sign_as
+ \ pgp_sort_keys pipe_sep pop_authenticators pop_host pop_pass pop_user
+ \ post_indent_str post_indent_string postpone_encrypt_as postponed preconnect
+ \ print_cmd print_command query_command quote_regexp realname record
+ \ reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars
+ \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method
+ \ signature simple_search smileys smime_ca_location smime_certificates
+ \ smime_default_key smime_encrypt_with smime_keys smime_sign_as
+ \ smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url sort sort_alias
+ \ sort_aux sort_browser spam_separator spoolfile ssl_ca_certificates_file
+ \ ssl_ciphers ssl_client_cert status_chars tmpdir to_chars trash ts_icon_format
+ \ ts_status_format tunnel visual
+ \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" Present in 1.4.2.1 (pgp_create_traditional was a bool then)
syn keyword muttrcVarBool contained skipwhite imap_force_ssl noimap_force_ssl invimap_force_ssl nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
@@ -401,12 +398,11 @@ syn match muttrcMenuCommas /,/ contained
syn keyword muttrcHooks contained skipwhite account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook
-syn keyword muttrcCommand auto_view alternative_order exec unalternative_order
-syn keyword muttrcCommand hdr_order iconv-hook ignore mailboxes my_hdr unmailboxes
-syn keyword muttrcCommand pgp-hook push score source unauto_view unhdr_order
-syn keyword muttrcCommand unignore unmono unmy_hdr unscore
-syn keyword muttrcCommand mime_lookup unmime_lookup ungroup
-syn keyword muttrcCommand unalternative_order
+syn keyword muttrcCommand skipwhite
+ \ alternative_order auto_view exec hdr_order iconv-hook ignore mailboxes
+ \ mailto_allow mime_lookup my_hdr pgp-hook push score sidebar_whitelist source
+ \ unalternative_order unalternative_order unauto_view ungroup unhdr_order
+ \ unignore unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore
syn keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString
syn keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks
@@ -441,7 +437,7 @@ syn match muttrcVariableInner contained "\$[a-zA-Z_-]\+"
syn match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+"
syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail
-syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resend\|save\|send\|tag\|undelete\)-message\>"
+syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|purge\|recall\|resend\|save\|send\|tag\|undelete\)-message\>"
syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|break\|undelete\)-thread\>"
syn match muttrcFunction contained "\<link-threads\>"
syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>"
@@ -465,11 +461,13 @@ syn match muttrcFunction contained "\<show-\%(limit\|version\)\>"
syn match muttrcFunction contained "\<sort-\%(mailbox\|reverse\)\>"
syn match muttrcFunction contained "\<tag-\%(pattern\|\%(sub\)\?thread\|prefix\%(-cond\)\?\)\>"
syn match muttrcFunction contained "\<end-cond\>"
+syn match muttrcFunction contained "\<sidebar-\%(next\|next-new\|open\|page-down\|page-up\|prev\|prev-new\|toggle-visible\)\>"
syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>"
syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>"
syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>"
syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>"
syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>"
+syn keyword muttrcFunction contained imap-logout-all
if use_mutt_sidebar == 1
syn match muttrcFunction contained "\<sidebar-\%(prev\|next\|open\|scroll-up\|scroll-down\)"
endif
@@ -578,7 +576,11 @@ syn match muttrcColorMatchCount contained "[0-9]\+"
syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL
-syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline
+syn keyword muttrcColorField skipwhite contained
+ \ attachment body bold error hdrdefault header index indicator markers message
+ \ normal prompt quoted search sidebar-divider sidebar-flagged sidebar-highlight
+ \ sidebar-indicator sidebar-new sidebar-spoolfile signature status tilde tree
+ \ underline
syn match muttrcColorField contained "\<quoted\d\=\>"
if use_mutt_sidebar == 1
syn keyword muttrcColorField contained sidebar_new
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index fa42b3e2d2..f0f03a8c8d 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
-" Last Change: 2016 Jul 21
+" Last Change: 2016 Aug 14
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@@ -84,14 +84,30 @@ syn keyword pythonInclude from import
syn keyword pythonAsync async await
" Decorators (new in Python 2.4)
-syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite
-" The zero-length non-grouping match before the function name is
-" extremely important in pythonFunction. Without it, everything is
-" interpreted as a function inside the contained environment of
-" doctests.
+" Python 3.5 introduced the use of the same symbol for matrix
+" multiplication. We now have to exclude the symbol from being
+" highlighted when used in that context. Hence, the check that it's
+" preceded by empty space only (possibly in a docstring/doctest) and
+" followed by decorator name, optional parenthesized list of arguments,
+" and the next line with either def, class, or another decorator.
+syn match pythonDecorator
+ \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\%(([^)]*)\)\=\s*\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
+ \ display nextgroup=pythonDecoratorName skipwhite
+
" A dot must be allowed because of @MyClass.myfunc decorators.
+" It must be preceded by a decorator symbol and on a separate line from
+" a function/class it decorates.
+syn match pythonDecoratorName
+ \ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\%(([^)]*)\)\=\s*\n\)\@="
+ \ contained display nextgroup=pythonFunction skipnl
+
+" The zero-length non-grouping match of def or class before the function
+" name is extremely important in pythonFunction. Without it, everything
+" is interpreted as a function inside the contained environment of
+" doctests.
syn match pythonFunction
- \ "\%(\%(def\s\|class\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*" contained
+ \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\%(def\|class\)\s\+\)\@<=\h\w*"
+ \ contained
syn match pythonComment "#.*$" contains=pythonTodo,@Spell
syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
@@ -293,6 +309,7 @@ if version >= 508 || !exists("did_python_syn_inits")
HiLink pythonInclude Include
HiLink pythonAsync Statement
HiLink pythonDecorator Define
+ HiLink pythonDecoratorName Function
HiLink pythonFunction Function
HiLink pythonComment Comment
HiLink pythonTodo Todo
diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim
index d96bf96acb..30a5b23f84 100644
--- a/runtime/syntax/r.vim
+++ b/runtime/syntax/r.vim
@@ -5,7 +5,7 @@
" Tom Payne <tom@tompayne.org>
" Contributor: Johannes Ranke <jranke@uni-bremen.de>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Thu Mar 10, 2016 12:26PM
+" Last Change: Thu Aug 25, 2016 08:52PM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in
@@ -26,7 +26,7 @@ if exists("b:current_syntax")
finish
endif
-setlocal iskeyword=@,48-57,_,.
+syn iskeyword @,48-57,_,.
if exists("g:r_syntax_folding") && g:r_syntax_folding
setlocal foldmethod=syntax
@@ -174,8 +174,6 @@ endif
if g:R_hi_fun
" Nvim-R:
runtime R/functions.vim
- " Vim-R-plugin:
- runtime r-plugin/functions.vim
endif
syn match rDollar display contained "\$"
diff --git a/runtime/syntax/rhelp.vim b/runtime/syntax/rhelp.vim
index 47c764e296..8cac585bb0 100644
--- a/runtime/syntax/rhelp.vim
+++ b/runtime/syntax/rhelp.vim
@@ -3,7 +3,7 @@
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sat Feb 06, 2016 11:34AM
+" Last Change: Tue Jun 28, 2016 08:53AM
" Remarks: - Includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
@@ -17,7 +17,6 @@ if exists("b:current_syntax")
endif
scriptencoding utf-8
-setlocal iskeyword=@,48-57,_,.
syn case match
diff --git a/runtime/syntax/rmd.vim b/runtime/syntax/rmd.vim
index 4cde7441d3..48fb5e079c 100644
--- a/runtime/syntax/rmd.vim
+++ b/runtime/syntax/rmd.vim
@@ -1,7 +1,7 @@
" markdown Text with R statements
" Language: markdown with R code chunks
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sat Feb 06, 2016 06:45AM
+" Last Change: Tue Jun 28, 2016 10:09AM
"
" CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc:
@@ -72,8 +72,6 @@ if rmdIsPandoc == 0
hi def link rmdLaTeXRegDelim Special
endif
-setlocal iskeyword=@,48-57,_,.
-
syn sync match rmdSyncChunk grouphere rmdChunk "^[ \t]*``` *{r"
hi def link rmdChunkDelim Special
diff --git a/runtime/syntax/rrst.vim b/runtime/syntax/rrst.vim
index 24d3844df0..b643af3285 100644
--- a/runtime/syntax/rrst.vim
+++ b/runtime/syntax/rrst.vim
@@ -2,7 +2,7 @@
" Language: reST with R code chunks
" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sat Feb 06, 2016 06:45AM
+" Last Change: Tue Jun 28, 2016 08:53AM
"
" CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc:
@@ -19,8 +19,6 @@ unlet b:current_syntax
" load all of the r syntax highlighting rules into @R
syntax include @R syntax/r.vim
-setlocal iskeyword=@,48-57,_,.
-
" highlight R chunks
if exists("g:rrst_syn_hl_chunk")
" highlight R code inside chunk header
diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index ef07b22676..232d2a7de3 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -2,7 +2,8 @@
" Language: reStructuredText documentation format
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2016-06-17
+" Website: https://github.com/marshallward/vim-restructuredtext
+" Latest Revision: 2016-08-18
if exists("b:current_syntax")
finish
@@ -89,7 +90,7 @@ function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_righ
\ ' start=+' . a:char_left . '\zs' . a:start .
\ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
\ a:middle .
- \ ' end=+\S' . a:end . '\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+'
+ \ ' end=+\S' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+'
endfunction
function! s:DefineInlineMarkup(name, start, middle, end)
@@ -103,6 +104,8 @@ function! s:DefineInlineMarkup(name, start, middle, end)
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\[', '\]')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '{', '}')
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '<', '>')
+ call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’')
+ " TODO: Additional Unicode Pd, Po, Pi, Pf, Ps characters
call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '')
@@ -186,11 +189,8 @@ hi def link rstHyperlinkTarget String
hi def link rstExDirective String
hi def link rstSubstitutionDefinition rstDirective
hi def link rstDelimiter Delimiter
-hi def link rstEmphasis Underlined
-hi def link rstStrongEmphasis Special
-" TODO Append these atttributes somehow
-"hi def rstEmphasis term=italic cterm=italic gui=italic
-"hi def rstStrongEmphasis term=bold cterm=bold gui=bold
+hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic
+hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold
hi def link rstInterpretedTextOrHyperlinkReference Identifier
hi def link rstInlineLiteral String
hi def link rstSubstitutionReference PreProc
diff --git a/runtime/syntax/scala.vim b/runtime/syntax/scala.vim
new file mode 100644
index 0000000000..b04af3be5b
--- /dev/null
+++ b/runtime/syntax/scala.vim
@@ -0,0 +1,231 @@
+" Vim syntax file
+" Language: Scala
+" Maintainer: Derek Wyatt
+" URL: https://github.com/derekwyatt/vim-scala
+" License: Same as Vim
+" Last Change: 20 May 2016
+" ----------------------------------------------------------------------------
+
+if !exists('main_syntax')
+ if version < 600
+ syntax clear
+ elseif exists("b:current_syntax")
+ finish
+ endif
+ let main_syntax = 'scala'
+endif
+
+scriptencoding utf-8
+
+let b:current_syntax = "scala"
+
+" Allows for embedding, see #59; main_syntax convention instead? Refactor TOP
+"
+" The @Spell here is a weird hack, it means *exclude* if the first group is
+" TOP. Otherwise we get spelling errors highlighted on code elements that
+" match scalaBlock, even with `syn spell notoplevel`.
+function! s:ContainedGroup()
+ try
+ silent syn list @scala
+ return '@scala,@NoSpell'
+ catch /E392/
+ return 'TOP,@Spell'
+ endtry
+endfunction
+
+unlet! b:current_syntax
+
+syn case match
+syn sync minlines=200 maxlines=1000
+
+syn keyword scalaKeyword catch do else final finally for forSome if
+syn keyword scalaKeyword match return throw try while yield macro
+syn keyword scalaKeyword class trait object extends with nextgroup=scalaInstanceDeclaration skipwhite
+syn keyword scalaKeyword case nextgroup=scalaKeyword,scalaCaseFollowing skipwhite
+syn keyword scalaKeyword val nextgroup=scalaNameDefinition,scalaQuasiQuotes skipwhite
+syn keyword scalaKeyword def var nextgroup=scalaNameDefinition skipwhite
+hi link scalaKeyword Keyword
+
+exe 'syn region scalaBlock start=/{/ end=/}/ contains=' . s:ContainedGroup() . ' fold'
+
+syn keyword scalaAkkaSpecialWord when goto using startWith initialize onTransition stay become unbecome
+hi link scalaAkkaSpecialWord PreProc
+
+syn keyword scalatestSpecialWord shouldBe
+syn match scalatestShouldDSLA /^\s\+\zsit should/
+syn match scalatestShouldDSLB /\<should\>/
+hi link scalatestSpecialWord PreProc
+hi link scalatestShouldDSLA PreProc
+hi link scalatestShouldDSLB PreProc
+
+syn match scalaSymbol /'[_A-Za-z0-9$]\+/
+hi link scalaSymbol Number
+
+syn match scalaChar /'.'/
+syn match scalaChar /'\\[\\"'ntbrf]'/ contains=scalaEscapedChar
+syn match scalaChar /'\\u[A-Fa-f0-9]\{4}'/ contains=scalaUnicodeChar
+syn match scalaEscapedChar /\\[\\"'ntbrf]/
+syn match scalaUnicodeChar /\\u[A-Fa-f0-9]\{4}/
+hi link scalaChar Character
+hi link scalaEscapedChar Function
+hi link scalaUnicodeChar Special
+
+syn match scalaOperator "||"
+syn match scalaOperator "&&"
+hi link scalaOperator Special
+
+syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList
+syn match scalaNameDefinition /`[^`]\+`/ contained nextgroup=scalaPostNameDefinition
+syn match scalaVariableDeclarationList /\s*,\s*/ contained nextgroup=scalaNameDefinition
+syn match scalaPostNameDefinition /\_s*:\_s*/ contained nextgroup=scalaTypeDeclaration
+hi link scalaNameDefinition Function
+
+syn match scalaInstanceDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaInstanceHash
+syn match scalaInstanceDeclaration /`[^`]\+`/ contained
+syn match scalaInstanceHash /#/ contained nextgroup=scalaInstanceDeclaration
+hi link scalaInstanceDeclaration Special
+hi link scalaInstanceHash Type
+
+syn match scalaUnimplemented /???/
+hi link scalaUnimplemented ERROR
+
+syn match scalaCapitalWord /\<[A-Z][A-Za-z0-9$]*\>/
+hi link scalaCapitalWord Special
+
+" Handle type declarations specially
+syn region scalaTypeStatement matchgroup=Keyword start=/\<type\_s\+\ze/ end=/$/ contains=scalaTypeTypeDeclaration,scalaSquareBrackets,scalaTypeTypeEquals,scalaTypeStatement
+
+" Ugh... duplication of all the scalaType* stuff to handle special highlighting
+" of `type X =` declarations
+syn match scalaTypeTypeDeclaration /(/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals contains=scalaRoundBrackets skipwhite
+syn match scalaTypeTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeTypeDeclaration contains=scalaTypeTypeExtension skipwhite
+syn match scalaTypeTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals skipwhite
+syn match scalaTypeTypeEquals /=\ze[^>]/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite
+syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeTypeDeclaration skipwhite
+syn match scalaTypeTypePostDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypePostExtension skipwhite
+syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite
+hi link scalaTypeTypeDeclaration Type
+hi link scalaTypeTypeExtension Keyword
+hi link scalaTypeTypePostDeclaration Special
+hi link scalaTypeTypePostExtension Keyword
+
+syn match scalaTypeDeclaration /(/ contained nextgroup=scalaTypeExtension contains=scalaRoundBrackets skipwhite
+syn match scalaTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeDeclaration contains=scalaTypeExtension skipwhite
+syn match scalaTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeExtension skipwhite
+syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeDeclaration skipwhite
+hi link scalaTypeDeclaration Type
+hi link scalaTypeExtension Keyword
+hi link scalaTypePostExtension Keyword
+
+syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets
+syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration
+hi link scalaTypeAnnotation Normal
+
+syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained
+syn match scalaCaseFollowing /`[^`]\+`/ contained
+hi link scalaCaseFollowing Special
+
+syn keyword scalaKeywordModifier abstract override final lazy implicit implicitly private protected sealed null require super
+hi link scalaKeywordModifier Function
+
+syn keyword scalaSpecial this true false ne eq
+syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite
+syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)"
+syn match scalaSpecial /`[^`]\+`/ " Backtick literals
+hi link scalaSpecial PreProc
+
+syn keyword scalaExternal package import
+hi link scalaExternal Include
+
+syn match scalaStringEmbeddedQuote /\\"/ contained
+syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scalaEscapedChar,scalaUnicodeChar
+hi link scalaString String
+hi link scalaStringEmbeddedQuote String
+
+syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
+syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
+hi link scalaIString String
+hi link scalaTripleIString String
+
+syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained
+exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup()
+hi link scalaInterpolation Function
+hi link scalaInterpolationB Normal
+
+syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
+syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained
+exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup()
+hi link scalaFString String
+hi link scalaFInterpolation Function
+hi link scalaFInterpolationB Normal
+
+syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar
+syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
+hi link scalaTripleString String
+hi link scalaTripleFString String
+
+hi link scalaInterpolationBrackets Special
+hi link scalaInterpolationBoundary Function
+
+syn match scalaNumber /\<0[dDfFlL]\?\>/ " Just a bare 0
+syn match scalaNumber /\<[1-9]\d*[dDfFlL]\?\>/ " A multi-digit number - octal numbers with leading 0's are deprecated in Scala
+syn match scalaNumber /\<0[xX][0-9a-fA-F]\+[dDfFlL]\?\>/ " Hex number
+syn match scalaNumber /\%(\<\d\+\.\d*\|\.\d\+\)\%([eE][-+]\=\d\+\)\=[fFdD]\=/ " exponential notation 1
+syn match scalaNumber /\<\d\+[eE][-+]\=\d\+[fFdD]\=\>/ " exponential notation 2
+syn match scalaNumber /\<\d\+\%([eE][-+]\=\d\+\)\=[fFdD]\>/ " exponential notation 3
+hi link scalaNumber Number
+
+syn region scalaRoundBrackets start="(" end=")" skipwhite contained contains=scalaTypeDeclaration,scalaSquareBrackets,scalaRoundBrackets
+
+syn region scalaSquareBrackets matchgroup=scalaSquareBracketsBrackets start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter
+syn match scalaTypeOperator /[-+=:<>]\+/ contained
+syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained
+hi link scalaSquareBracketsBrackets Type
+hi link scalaTypeOperator Keyword
+hi link scalaTypeAnnotationParameter Function
+
+syn match scalaShebang "\%^#!.*" display
+syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@Spell keepend fold
+syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
+syn match scalaParameterAnnotation "\%(@tparam\|@param\|@see\)" nextgroup=scalaParamAnnotationValue skipwhite contained
+syn match scalaParamAnnotationValue /[.`_A-Za-z0-9$]\+/ contained
+syn region scalaDocLinks start="\[\[" end="\]\]" contained
+syn region scalaCommentCodeBlock matchgroup=Keyword start="{{{" end="}}}" contained
+syn match scalaTodo "\vTODO|FIXME|XXX" contained
+hi link scalaShebang Comment
+hi link scalaMultilineComment Comment
+hi link scalaDocLinks Function
+hi link scalaParameterAnnotation Function
+hi link scalaParamAnnotationValue Keyword
+hi link scalaCommentAnnotation Function
+hi link scalaCommentCodeBlockBrackets String
+hi link scalaCommentCodeBlock String
+hi link scalaTodo Todo
+
+syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/
+hi link scalaAnnotation PreProc
+
+syn match scalaTrailingComment "//.*$" contains=scalaTodo,@Spell
+hi link scalaTrailingComment Comment
+
+syn match scalaAkkaFSM /goto([^)]*)\_s\+\<using\>/ contains=scalaAkkaFSMGotoUsing
+syn match scalaAkkaFSM /stay\_s\+using/
+syn match scalaAkkaFSM /^\s*stay\s*$/
+syn match scalaAkkaFSM /when\ze([^)]*)/
+syn match scalaAkkaFSM /startWith\ze([^)]*)/
+syn match scalaAkkaFSM /initialize\ze()/
+syn match scalaAkkaFSM /onTransition/
+syn match scalaAkkaFSM /onTermination/
+syn match scalaAkkaFSM /whenUnhandled/
+syn match scalaAkkaFSMGotoUsing /\<using\>/
+syn match scalaAkkaFSMGotoUsing /\<goto\>/
+hi link scalaAkkaFSM PreProc
+hi link scalaAkkaFSMGotoUsing PreProc
+
+let b:current_syntax = 'scala'
+
+if main_syntax ==# 'scala'
+ unlet main_syntax
+endif
+
+" vim:set sw=2 sts=2 ts=8 et:
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 34b8ab79e4..2fe13fbde6 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 <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Jul 29, 2016
-" Version: 155
+" Last Change: Aug 23, 2016
+" Version: 161
" 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)
@@ -127,11 +127,11 @@ syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsa
if exists("b:is_kornshell")
syn cluster ErrorList add=shDTestError
endif
-syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor
+syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor
syn cluster shArithList contains=@shArithParenList,shParenError
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
-syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
-syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
+syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
+syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
@@ -139,7 +139,7 @@ syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDeref
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
-syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
+syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shFunctionList add=shRepeat
syn cluster shFunctionList add=shDblBrace,shDblParen
@@ -147,11 +147,11 @@ endif
syn cluster shHereBeginList contains=@shCommandSubList
syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
-syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
-syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
+syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
+syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo,shParen
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch
syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm
-syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
+syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
" Echo: {{{1
@@ -216,8 +216,8 @@ syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSin
" Subshells: {{{1
" ==========
-syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial
-syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shMoreSpecial
+syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shSpecialNxt
+syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shSpecialNxt
" Tests: {{{1
"=======
@@ -339,8 +339,8 @@ if exists("b:is_bash")
syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
endif
if exists("b:is_bash")
- syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial
- syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial
+ syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial nextgroup=shSpecialNxt
+ syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial nextgroup=shSpecialNxt
elseif !exists("g:sh_no_error")
syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial
syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial
@@ -351,7 +351,7 @@ syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
-syn match shMoreSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
+syn match shSpecialNxt contained "\\[\\"'`$()#]"
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
@@ -386,7 +386,7 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \
" =============
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
- syn match shRedir "<<<" skipwhite nextgroup=shCmdParenRegion
+ syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion
endif
" Identifiers: {{{1
@@ -431,6 +431,7 @@ syn match shDerefSimple "\$\%(\h\w*\|\d\)"
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
syn match shDerefSimple "\$[-#*@!?]"
syn match shDerefSimple "\$\$"
+syn match shDerefSimple "\${\d}"
if exists("b:is_bash") || exists("b:is_kornshell")
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList
@@ -455,6 +456,7 @@ endif
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
+syn match shDerefVar contained '\d' nextgroup=@shDerefVarList
if exists("b:is_kornshell")
syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
@@ -482,24 +484,24 @@ endif
syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList
syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList
if exists("b:is_bash") || exists("b:is_kornshell")
- syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList
- syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList
- syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern
+ syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList
+ syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList
+ syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern
syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
syn match shDerefEscape contained '\%(\\\\\)*\\.'
endif
if exists("b:is_bash")
syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList
endif
-syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
+syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
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 nextgroup=shDerefLen,shDeref,shDerefSimple
- syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple nextgroup=shDerefLen,shDeref,shDerefSimple
+ syn region shDerefOff contained start=':' 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
" bash : ${parameter//pattern/string}
@@ -602,14 +604,16 @@ hi def link shEcho shString
hi def link shEchoDelim shOperator
hi def link shEchoQuote shString
hi def link shForPP shLoop
+hi def link shFunction Function
hi def link shEmbeddedEcho shString
hi def link shEscape shCommandSub
hi def link shExDoubleQuote shDoubleQuote
hi def link shExSingleQuote shSingleQuote
hi def link shHereDoc shString
+hi def link shHereString shRedir
hi def link shHerePayload shHereDoc
hi def link shLoop shStatement
-hi def link shMoreSpecial shSpecial
+hi def link shSpecialNxt shSpecial
hi def link shNoQuote shDoubleQuote
hi def link shOption shCommandSub
hi def link shPattern shString
diff --git a/runtime/syntax/teraterm.vim b/runtime/syntax/teraterm.vim
index 521331d8ce..1924996738 100644
--- a/runtime/syntax/teraterm.vim
+++ b/runtime/syntax/teraterm.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Tera Term Language (TTL)
-" Based on Tera Term Version 4.86
+" Based on Tera Term Version 4.92
" Maintainer: Ken Takata
" URL: https://github.com/k-takata/vim-teraterm
-" Last Change: 2015 Jun 24
+" Last Change: 2016 Aug 17
" Filenames: *.ttl
" License: VIM License
@@ -33,7 +33,7 @@ syn keyword ttlOperator and or xor not
syn match ttlVar "\<groupmatchstr\d\>"
syn match ttlVar "\<param\d\>"
-syn keyword ttlVar inputstr matchstr paramcnt result timeout mtimeout
+syn keyword ttlVar inputstr matchstr paramcnt params result timeout mtimeout
syn match ttlLine nextgroup=ttlStatement "^"
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index bb3fa1f6c9..91f70c6a1a 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -53,10 +53,10 @@ syn case ignore
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
" Default highlighting groups {{{2
-syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual WarningMsg WildMenu
+syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
syn keyword vimOnlyHLGroup contained VisualNOS
-syn keyword nvimHLGroup contained EndOfBuffer Substitute TermCursor TermCursorNC QuickFixLine
+syn keyword nvimHLGroup contained Substitute TermCursor TermCursorNC QuickFixLine
"}}}2
syn case match
" Special Vim Highlighting (not automatic) {{{1