Merge branch 'master' into lazier-arg_errmsg-gettext

This commit is contained in:
ZyX 2017-04-21 00:33:12 +03:00
commit d463c9e03a
176 changed files with 6953 additions and 5411 deletions

View File

@ -6,10 +6,15 @@ Getting started
If you want to help but don't know where to start, here are some
low-risk/isolated tasks:
- Help us [review pull requests](#reviewing)!
- Merge a [Vim patch].
- Try a [complexity:low] issue.
- Fix [clang-scan] or [coverity](#coverity) warnings.
- Fix [clang-scan], [coverity](#coverity), and [PVS](#pvs-studio) warnings.
Developer guidelines
--------------------
- Nvim developers should read `:help dev-help`.
- External UI developers should read `:help dev-ui`.
Reporting problems
------------------
@ -26,17 +31,25 @@ Reporting problems
Pull requests ("PRs")
---------------------
- To avoid duplicate work, you may want to create a `[WIP]` pull request so that
others know what you are working on.
- Avoid cosmetic changes to unrelated files in the same commit: extra noise
makes reviews more difficult.
- To avoid duplicate work, create a `[WIP]` pull request as soon as possible.
- Avoid cosmetic changes to unrelated files in the same commit: noise makes
reviews take longer.
- Use a [feature branch][git-feature-branch] instead of the master branch.
- [Rebase your feature branch][git-rebasing] onto (upstream) master before
opening the PR.
- After addressing the review comments, it's fine to rebase and force-push to
your review.
- Try to [tidy your history][git-history-rewriting]: combine related commits
with interactive rebasing, separate monolithic commits, etc.
- Use a **rebase workflow** for small PRs.
- After addressing review comments, it's fine to rebase and force-push.
- Use a **merge workflow** for big, high-risk PRs.
- Merge `master` into your PR when there are conflicts or when master
introduces breaking changes.
- Use the `ri` git alias:
```
[alias]
ri = "!sh -c 't=\"${1:-master}\" ; s=\"${2:-HEAD}\" ; if git merge-base --is-ancestor \"$t\" \"$s\" ; then o=\"$t\" ; else mb=\"$(git merge-base \"$t\" \"$s\")\" ; if test \"x$mb\" = x ; then o=\"$t\" ; else lm=\"$(git log -n1 --merges \"$t..$s\" --pretty=%H)\" ; if test \"x$lm\" = x ; then o=\"$mb\" ; else o=\"$lm\" ; fi ; fi ; fi ; [ $# -gt 0 ] && shift ; [ $# -gt 0 ] && shift ; git rebase --interactive \"$o\" \"$@\"' -"
```
This avoids unnecessary rebases yet still allows you to combine related
commits, separate monolithic commits, etc.
- Do not edit commits that come before the merge commit.
- During a squash/fixup, use `exec make -C build unittest` between each
pick/edit/reword.
### Stages: WIP, RFC, RDY
@ -111,6 +124,11 @@ Use this commit-message format for coverity fixes:
where `<id>` is the Coverity ID (CID). For example see [#804](https://github.com/neovim/neovim/pull/804).
### PVS-Studio
Run `scripts/pvscheck.sh` to check the codebase with [PVS
Studio](https://www.viva64.com/en/pvs-studio/).
Reviewing
---------

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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, '']

View File

@ -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*
@ -54,6 +53,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*

View File

@ -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:

View File

@ -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.

View File

@ -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

View File

@ -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*

View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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*

View File

@ -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

View File

@ -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:

View File

@ -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}.

View File

@ -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.

View File

@ -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

View File

@ -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\\+

View File

@ -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:

View File

@ -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\|'

View File

@ -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
" 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
" strip line of comment
function s:StripLine(c)
return a:c !~# s:expr_case ? substitute(a:c, '\%(:\@<!\/\/.*\)$', '','') : a:c
endfunction
" 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

View File

@ -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, "()", "", ""))

609
runtime/indent/scala.vim Normal file
View File

@ -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:

View File

@ -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

View File

@ -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()

View File

@ -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.

View File

@ -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
§ >
± <
@ "
# №
$ %
% :
^ ,
& .
* ;
` ]
~ [

View File

@ -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")

View File

@ -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

View File

@ -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")

View File

@ -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
\ 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 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
\ 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 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 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 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
\ 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 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
\ 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 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 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 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 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

View File

@ -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

View File

@ -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 "\$"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

231
runtime/syntax/scala.vim Normal file
View File

@ -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:

View File

@ -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

View File

@ -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 "^"

View File

@ -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

172
scripts/pvscheck.sh Executable file
View File

@ -0,0 +1,172 @@
#!/bin/sh
set -e
get_jobs_num() {
local num="$(cat /proc/cpuinfo | grep -c "^processor")"
num="$(echo $(( num + 1 )))"
num="${num:-1}"
echo $num
}
help() {
echo 'Usage:'
echo ' pvscheck.sh [target-directory [branch]]'
echo ' pvscheck.sh [--recheck] [target-directory]'
echo ' pvscheck.sh --patch [--only-build]'
echo
echo ' --patch: patch sources in the current directory.'
echo ' Does not patch already patched files.'
echo ' Does not run analysis.'
echo
echo ' --only-build: Only patch files in ./build directory.'
echo
echo ' --recheck: run analysis on a prepared target directory.'
echo
echo ' target-directory: Directory where build should occur.'
echo ' Default: ../neovim-pvs'
echo
echo ' branch: Branch to check.'
echo ' Default: master.'
}
get_pvs_comment() {
cat > pvs-comment << EOF
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
EOF
}
install_pvs() {
mkdir pvs-studio
cd pvs-studio
curl -o pvs-studio.tar.gz "$PVS_URL"
tar xzf pvs-studio.tar.gz
rm pvs-studio.tar.gz
local pvsdir="$(find . -maxdepth 1 -mindepth 1)"
find "$pvsdir" -maxdepth 1 -mindepth 1 -exec mv '{}' . \;
rmdir "$pvsdir"
export PATH="$PWD/bin${PATH+:}${PATH}"
cd ..
}
create_compile_commands() {
mkdir build
cd build
env \
CC=clang \
CFLAGS=' -O0 ' \
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$PWD/root"
make -j"$(get_jobs_num)"
find src/nvim/auto -name '*.test-include.c' -delete
cd ..
}
patch_sources() {
get_pvs_comment
local sh_script='
pvs_comment="$(cat pvs-comment ; echo -n EOS)"
filehead="$(head -c $(( ${#pvs_comment} - 3 )) "$1" ; echo -n EOS)"
if test "x$filehead" != "x$pvs_comment" ; then
cat pvs-comment "$1" > "$1.tmp"
mv "$1.tmp" "$1"
fi
'
if test "x$1" != "x--only-build" ; then
find \
src/nvim test/functional/fixtures test/unit/fixtures \
-name '*.c' \
-exec /bin/sh -c "$sh_script" - '{}' \;
fi
find \
build/src/nvim/auto build/config \
-name '*.c' -not -name '*.test-include.c' \
-exec /bin/sh -c "$sh_script" - '{}' \;
rm pvs-comment
}
run_analysis() {
pvs-studio-analyzer \
analyze \
--threads "$(get_jobs_num)" \
--output-file PVS-studio.log \
--verbose \
--file build/compile_commands.json \
--sourcetree-root .
plog-converter -t xml -o PVS-studio.xml PVS-studio.log
plog-converter -t errorfile -o PVS-studio.err PVS-studio.log
plog-converter -t tasklist -o PVS-studio.tsk PVS-studio.log
}
do_check() {
local tgt="${1}"
local branch="${2}"
git clone --branch="$branch" . "$tgt"
cd "$tgt"
install_pvs
create_compile_commands
run_analysis
}
do_recheck() {
local tgt="${1}"
cd "$tgt"
export PATH="$PWD/pvs-studio/bin${PATH+:}${PATH}"
run_analysis
}
main() {
local PVS_URL="http://files.viva64.com/pvs-studio-6.14.21446.1-x86_64.tgz"
if test "x$1" = "x--help" ; then
help
return
fi
set -x
if test "x$1" = "x--patch" ; then
shift
if test "x$1" = "x--only-build" ; then
shift
patch_sources --only-build
else
patch_sources
fi
exit $?
fi
local recheck=
if test "x$1" = "x--recheck" ; then
recheck=1
shift
fi
local tgt="${1:-$PWD/../neovim-pvs}"
local branch="${2:-master}"
if test "x$recheck" = "x" ; then
do_check "$tgt" "$branch"
else
do_recheck "$tgt"
fi
}
main "$@"

View File

@ -137,18 +137,18 @@ preprocess_patch() {
# Remove channel.txt, netbeans.txt, os_*.txt, todo.txt, version*.txt, tags
local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|todo\.txt\|version\d\.txt\|tags'
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\%('${na_doc}'\)@norm! d/\v(^diff)|%$ ' +w +q "$file"
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\<\%('${na_doc}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file"
# Remove "Last change ..." changes in doc files.
2>/dev/null $nvim --cmd 'set dir=/tmp' +'%s/^@@.*\n.*For Vim version.*Last change.*\n.*For Vim version.*Last change.*//' +w +q "$file"
# Remove some testdir/Make_*.mak files
local na_src_testdir='Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms'
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\%('${na_src_testdir}'\)@norm! d/\v(^diff)|%$ ' +w +q "$file"
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('${na_src_testdir}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file"
# Remove some *.po files. #5622
local na_po='sjiscorr.c\|ja.sjis.po\|ko.po\|pl.cp1250.po\|pl.po\|ru.cp1251.po\|uk.cp1251.po\|zh_CN.cp936.po\|zh_CN.po\|zh_TW.po'
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\%('${na_po}'\)@norm! d/\v(^diff)|%$ ' +w +q "$file"
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\<\%('${na_po}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file"
# Rename src/ paths to src/nvim/
LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' \

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// Much of this code was adapted from 'if_py_both.h' from the original
// vim source
#include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>

View File

@ -8,6 +8,7 @@
#include "nvim/memory.h"
#include "nvim/lib/kvec.h"
// -V:api_set_error:618
#define api_set_error(err, errtype, ...) \
do { \
snprintf((err)->msg, \

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stddef.h>
#include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdint.h>
#include <inttypes.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file arabic.c
///
/// Functions for Arabic language.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* buffer.c: functions for dealing with the buffer structure
*/
@ -741,12 +744,13 @@ static void clear_wininfo(buf_T *buf)
*/
void goto_buffer(exarg_T *eap, int start, int dir, int count)
{
(void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
start, dir, count, eap->forceit);
bufref_T old_curbuf;
set_bufref(&old_curbuf, curbuf);
swap_exists_action = SEA_DIALOG;
(void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
start, dir, count, eap->forceit);
if (swap_exists_action == SEA_QUIT && *eap->cmd == 's') {
cleanup_T cs;
@ -1838,9 +1842,7 @@ int buflist_getfile(int n, linenr_T lnum, int options, int forceit)
return FAIL;
}
/*
* go to the last know line number for the current buffer
*/
// Go to the last known line number for the current buffer.
void buflist_getfpos(void)
{
pos_T *fpos;
@ -2338,9 +2340,7 @@ linenr_T buflist_findlnum(buf_T *buf)
return buflist_findfpos(buf)->lnum;
}
/*
* List all know file names (for :files and :buffers command).
*/
// List all known file names (for :files and :buffers command).
void buflist_list(exarg_T *eap)
{
buf_T *buf;

View File

@ -103,7 +103,8 @@ static inline void buf_set_changedtick(buf_T *const buf, const int changedtick)
assert(changedtick_di->di_flags == (DI_FLAGS_RO|DI_FLAGS_FIX));
# endif
assert(changedtick_di == (dictitem_T *)&buf->changedtick_di);
assert(&buf->b_changedtick == &buf->changedtick_di.di_tv.vval.v_number);
assert(&buf->b_changedtick // -V501
== &buf->changedtick_di.di_tv.vval.v_number);
#endif
buf->b_changedtick = changedtick;
}

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file charset.c
///
/// Code related to character sets.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h>
#include <inttypes.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdint.h>
#include "nvim/vim.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file diff.c
///
/// Code for diff'ing two, three or four buffers.
@ -1076,8 +1079,8 @@ void diff_win_options(win_T *wp, int addbuf)
if (!wp->w_p_diff) {
wp->w_p_wrap_save = wp->w_p_wrap;
}
wp->w_p_wrap = FALSE;
curwin = wp;
wp->w_p_wrap = false;
curwin = wp; // -V519
curbuf = curwin->w_buffer;
if (!wp->w_p_diff) {

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file digraph.c
///
/// code for digraphs
@ -1569,7 +1572,8 @@ int getdigraph(int char1, int char2, int meta_char)
if (((retval = getexactdigraph(char1, char2, meta_char)) == char2)
&& (char1 != char2)
&& ((retval = getexactdigraph(char2, char1, meta_char)) == char1)) {
&& ((retval = getexactdigraph(char2, char1, meta_char)) // -V764
== char1)) {
return char2;
}
return retval;
@ -1675,11 +1679,7 @@ static void printdigraph(digr_T *dp)
int list_width;
if ((dy_flags & DY_UHEX) || has_mbyte) {
list_width = 13;
} else {
list_width = 11;
}
list_width = 13;
if (dp->result != 0) {
if (msg_col > Columns - list_width) {
@ -1700,15 +1700,11 @@ static void printdigraph(digr_T *dp)
*p++ = dp->char2;
*p++ = ' ';
if (has_mbyte) {
// add a space to draw a composing char on
if (enc_utf8 && utf_iscomposing(dp->result)) {
*p++ = ' ';
}
p += (*mb_char2bytes)(dp->result, p);
} else {
*p++ = (char_u)dp->result;
// add a space to draw a composing char on
if (utf_iscomposing(dp->result)) {
*p++ = ' ';
}
p += (*mb_char2bytes)(dp->result, p);
if (char2cells(dp->result) == 1) {
*p++ = ' ';

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* edit.c: functions for Insert mode
*/
@ -3419,6 +3422,7 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
else
return; /* nothing to do */
}
assert(ptr != NULL);
if (compl_orig_text != NULL) {
p = compl_orig_text;
for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len)
@ -3427,10 +3431,11 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
len -= (*mb_head_off)(p, p + len);
for (p += len; *p != NUL; mb_ptr_adv(p))
AppendCharToRedobuff(K_BS);
} else
} else {
len = 0;
if (ptr != NULL)
AppendToRedobuffLit(ptr + len, -1);
}
assert(ptr != NULL);
AppendToRedobuffLit(ptr + len, -1);
}
/*

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* eval.c: Expression evaluation.
*/
@ -462,6 +465,7 @@ typedef struct {
int refcount;
long timeout;
bool stopped;
bool paused;
Callback callback;
} timer_T;
@ -2741,12 +2745,13 @@ void ex_call(exarg_T *eap)
* call, and the loop is broken.
*/
if (eap->skip) {
++emsg_skip;
lnum = eap->line2; /* do it once, also with an invalid range */
} else
emsg_skip++;
lnum = eap->line2; // Do it once, also with an invalid range.
} else {
lnum = eap->line1;
for (; lnum <= eap->line2; ++lnum) {
if (!eap->skip && eap->addr_count > 0) {
}
for (; lnum <= eap->line2; lnum++) {
if (!eap->skip && eap->addr_count > 0) { // -V560
curwin->w_cursor.lnum = lnum;
curwin->w_cursor.col = 0;
curwin->w_cursor.coladd = 0;
@ -2767,7 +2772,7 @@ void ex_call(exarg_T *eap)
}
tv_clear(&rettv);
if (doesrange || eap->skip) {
if (doesrange || eap->skip) { // -V560
break;
}
@ -2998,8 +3003,7 @@ int do_unlet(const char *const name, const size_t name_len, const int forceit)
return FAIL;
}
if (d == NULL
|| tv_check_lock(d->dv_lock, (const char *)name, TV_CSTRING)) {
if (tv_check_lock(d->dv_lock, (const char *)name, TV_CSTRING)) {
return FAIL;
}
@ -4763,7 +4767,7 @@ static int get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
// Special key, e.g.: "\<C-W>"
case '<':
extra = trans_special((const char_u **) &p, STRLEN(p), name, true);
extra = trans_special((const char_u **)&p, STRLEN(p), name, true, true);
if (extra != 0) {
name += extra;
break;
@ -7303,18 +7307,14 @@ static void f_changenr(typval_T *argvars, typval_T *rettv, FunPtr fptr)
*/
static void f_char2nr(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
if (has_mbyte) {
int utf8 = 0;
if (argvars[1].v_type != VAR_UNKNOWN) {
utf8 = tv_get_number_chk(&argvars[1], NULL);
if (argvars[1].v_type != VAR_UNKNOWN) {
if (!tv_check_num(&argvars[1])) {
return;
}
rettv->vval.v_number = (utf8 ? *utf_ptr2char : *mb_ptr2char)(
(const char_u *)tv_get_string(&argvars[0]));
} else {
rettv->vval.v_number = (uint8_t)(tv_get_string(&argvars[0])[0]);
}
rettv->vval.v_number = utf_ptr2char(
(const char_u *)tv_get_string(&argvars[0]));
}
/*
@ -8662,7 +8662,6 @@ static void f_foldtext(typval_T *argvars, typval_T *rettv, FunPtr fptr)
char_u *r;
int len;
char *txt;
long count;
rettv->v_type = VAR_STRING;
rettv->vval.v_string = NULL;
@ -8690,8 +8689,8 @@ static void f_foldtext(typval_T *argvars, typval_T *rettv, FunPtr fptr)
s = skipwhite(s + 1);
}
}
count = (long)(foldend - foldstart + 1);
txt = _("+-%s%3ld lines: ");
unsigned long count = (unsigned long)(foldend - foldstart + 1);
txt = ngettext("+-%s%3ld line: ", "+-%s%3ld lines: ", count);
r = xmalloc(STRLEN(txt)
+ STRLEN(dashes) // for %s
+ 20 // for %3ld
@ -8711,7 +8710,7 @@ static void f_foldtext(typval_T *argvars, typval_T *rettv, FunPtr fptr)
static void f_foldtextresult(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
char_u *text;
char_u buf[51];
char_u buf[FOLD_TEXT_LEN];
foldinfo_T foldinfo;
int fold_count;
@ -8977,13 +8976,10 @@ static void f_get(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (strcmp(what, "func") == 0 || strcmp(what, "name") == 0) {
rettv->v_type = (*what == 'f' ? VAR_FUNC : VAR_STRING);
const char *const n = (const char *)partial_name(pt);
if (n == NULL) {
rettv->vval.v_string = NULL;
} else {
rettv->vval.v_string = (char_u *)xstrdup(n);
if (rettv->v_type == VAR_FUNC) {
func_ref(rettv->vval.v_string);
}
assert(n != NULL);
rettv->vval.v_string = (char_u *)xstrdup(n);
if (rettv->v_type == VAR_FUNC) {
func_ref(rettv->vval.v_string);
}
} else if (strcmp(what, "dict") == 0) {
rettv->v_type = VAR_DICT;
@ -12540,7 +12536,7 @@ static void f_min(typval_T *argvars, typval_T *rettv, FunPtr fptr)
*/
static void f_mkdir(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
int prot = 0755;
int prot = 0755; // -V536
rettv->vval.v_number = FAIL;
if (check_restricted() || check_secure())
@ -12765,25 +12761,32 @@ static void f_nextnonblank(typval_T *argvars, typval_T *rettv, FunPtr fptr)
*/
static void f_nr2char(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
char_u buf[NUMBUFLEN];
if (has_mbyte) {
int utf8 = 0;
if (argvars[1].v_type != VAR_UNKNOWN) {
utf8 = tv_get_number_chk(&argvars[1], NULL);
if (argvars[1].v_type != VAR_UNKNOWN) {
if (!tv_check_num(&argvars[1])) {
return;
}
if (utf8) {
buf[(*utf_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
} else {
buf[(*mb_char2bytes)((int)tv_get_number(&argvars[0]), buf)] = NUL;
}
} else {
buf[0] = (char_u)tv_get_number(&argvars[0]);
buf[1] = NUL;
}
bool error = false;
const varnumber_T num = tv_get_number_chk(&argvars[0], &error);
if (error) {
return;
}
if (num < 0) {
emsgf(_("E5070: Character number must not be less than zero"));
return;
}
if (num > INT_MAX) {
emsgf(_("E5071: Character number must not be greater than INT_MAX (%i)"),
INT_MAX);
return;
}
char buf[MB_MAXBYTES];
const int len = utf_char2bytes((int)num, (char_u *)buf);
rettv->v_type = VAR_STRING;
rettv->vval.v_string = vim_strsave(buf);
rettv->vval.v_string = xmemdupz(buf, (size_t)len);
}
/*
@ -14298,7 +14301,7 @@ static void f_serverstop(typval_T *argvars, typval_T *rettv, FunPtr fptr)
return;
}
if (argvars[0].v_type == VAR_UNKNOWN || argvars[0].v_type != VAR_STRING) {
if (argvars[0].v_type != VAR_STRING) {
EMSG(_(e_invarg));
return;
}
@ -14322,7 +14325,7 @@ static void f_setbufvar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
buf_T *const buf = get_buf_tv(&argvars[0], false);
typval_T *varp = &argvars[2];
if (buf != NULL && varname != NULL && varp != NULL) {
if (buf != NULL && varname != NULL) {
if (*varname == '&') {
long numval;
bool error = false;
@ -14866,7 +14869,7 @@ static void f_settabvar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
const char *const varname = tv_get_string_chk(&argvars[1]);
typval_T *const varp = &argvars[2];
if (varname != NULL && varp != NULL && tp != NULL) {
if (varname != NULL && tp != NULL) {
tabpage_T *const save_curtab = curtab;
goto_tabpage_tp(tp, false, false);
@ -16641,6 +16644,77 @@ static bool set_ref_in_callback(Callback *callback, int copyID,
return false;
}
static void add_timer_info(typval_T *rettv, timer_T *timer)
{
list_T *list = rettv->vval.v_list;
dict_T *dict = tv_dict_alloc();
tv_list_append_dict(list, dict);
tv_dict_add_nr(dict, S_LEN("id"), timer->timer_id);
tv_dict_add_nr(dict, S_LEN("time"), timer->timeout);
tv_dict_add_nr(dict, S_LEN("paused"), timer->paused);
tv_dict_add_nr(dict, S_LEN("repeat"),
(timer->repeat_count < 0 ? -1 : timer->repeat_count));
dictitem_T *di = tv_dict_item_alloc("callback");
if (tv_dict_add(dict, di) == FAIL) {
xfree(di);
return;
}
if (timer->callback.type == kCallbackPartial) {
di->di_tv.v_type = VAR_PARTIAL;
di->di_tv.vval.v_partial = timer->callback.data.partial;
timer->callback.data.partial->pt_refcount++;
} else if (timer->callback.type == kCallbackFuncref) {
di->di_tv.v_type = VAR_FUNC;
di->di_tv.vval.v_string = vim_strsave(timer->callback.data.funcref);
}
di->di_tv.v_lock = 0;
}
static void add_timer_info_all(typval_T *rettv)
{
timer_T *timer;
map_foreach_value(timers, timer, {
if (!timer->stopped) {
add_timer_info(rettv, timer);
}
})
}
/// "timer_info([timer])" function
static void f_timer_info(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
tv_list_alloc_ret(rettv);
if (argvars[0].v_type != VAR_UNKNOWN) {
if (argvars[0].v_type != VAR_NUMBER) {
EMSG(_(e_number_exp));
return;
}
timer_T *timer = pmap_get(uint64_t)(timers, tv_get_number(&argvars[0]));
if (timer != NULL && !timer->stopped) {
add_timer_info(rettv, timer);
}
} else {
add_timer_info_all(rettv);
}
}
/// "timer_pause(timer, paused)" function
static void f_timer_pause(typval_T *argvars, typval_T *unused, FunPtr fptr)
{
if (argvars[0].v_type != VAR_NUMBER) {
EMSG(_(e_number_exp));
return;
}
int paused = (bool)tv_get_number(&argvars[1]);
timer_T *timer = pmap_get(uint64_t)(timers, tv_get_number(&argvars[0]));
if (timer != NULL) {
timer->paused = paused;
}
}
/// "timer_start(timeout, callback, opts)" function
static void f_timer_start(typval_T *argvars, typval_T *rettv, FunPtr fptr)
@ -16675,6 +16749,7 @@ static void f_timer_start(typval_T *argvars, typval_T *rettv, FunPtr fptr)
timer = xmalloc(sizeof *timer);
timer->refcount = 1;
timer->stopped = false;
timer->paused = false;
timer->repeat_count = repeat;
timer->timeout = timeout;
timer->timer_id = last_timer_id++;
@ -16684,8 +16759,7 @@ static void f_timer_start(typval_T *argvars, typval_T *rettv, FunPtr fptr)
timer->tw.events = multiqueue_new_child(main_loop.events);
// if main loop is blocked, don't queue up multiple events
timer->tw.blockable = true;
time_watcher_start(&timer->tw, timer_due_cb, timeout,
timeout * (repeat != 1));
time_watcher_start(&timer->tw, timer_due_cb, timeout, timeout);
pmap_put(uint64_t)(timers, timer->timer_id, timer);
rettv->vval.v_number = timer->timer_id;
@ -16709,13 +16783,19 @@ static void f_timer_stop(typval_T *argvars, typval_T *rettv, FunPtr fptr)
timer_stop(timer);
}
static void f_timer_stopall(typval_T *argvars, typval_T *unused, FunPtr fptr)
{
timer_stop_all();
}
// invoked on the main loop
static void timer_due_cb(TimeWatcher *tw, void *data)
{
timer_T *timer = (timer_T *)data;
if (timer->stopped) {
if (timer->stopped || timer->paused) {
return;
}
timer->refcount++;
// if repeat was negative repeat forever
if (timer->repeat_count >= 0 && --timer->repeat_count == 0) {
@ -16768,7 +16848,7 @@ static void timer_decref(timer_T *timer)
}
}
void timer_teardown(void)
static void timer_stop_all(void)
{
timer_T *timer;
map_foreach_value(timers, timer, {
@ -16776,6 +16856,11 @@ void timer_teardown(void)
})
}
void timer_teardown(void)
{
timer_stop_all();
}
/*
* "tolower(string)" function
*/
@ -19404,8 +19489,9 @@ void ex_function(exarg_T *eap)
* interrupt, or an exception.
*/
if (!aborting()) {
if (!eap->skip && fudi.fd_newkey != NULL)
if (fudi.fd_newkey != NULL) {
EMSG2(_(e_dictkey), fudi.fd_newkey);
}
xfree(fudi.fd_newkey);
return;
} else
@ -20989,8 +21075,8 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
char *s = tofree;
emsg_off--;
if (s != NULL) {
char buf[MSG_BUF_LEN];
if (vim_strsize((char_u *)s) > MSG_BUF_CLEN) {
char buf[MSG_BUF_LEN];
trunc_string((char_u *)s, (char_u *)buf, MSG_BUF_CLEN,
sizeof(buf));
s = buf;

View File

@ -306,8 +306,11 @@ return {
tempname={},
termopen={args={1, 2}},
test_garbagecollect_now={},
timer_info={args={0,1}},
timer_pause={args=2},
timer_start={args={2,3}},
timer_stop={args=1},
timer_stopall={args=0},
tolower={args=1},
toupper={args=1},
tr={args=3},

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stddef.h>
#include <msgpack.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file encode.c
///
/// File containing functions for encoding and decoding VimL values.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include "nvim/eval/typval.h"
#include "nvim/eval/executor.h"
#include "nvim/eval.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include "nvim/eval/typval.h"
#include "nvim/eval/gc.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdio.h>
#include <stddef.h>
#include <string.h>
@ -136,7 +139,7 @@ void tv_list_watch_fix(list_T *const l, const listitem_T *const item)
///
/// @return [allocated] new list.
list_T *tv_list_alloc(void)
FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC
FUNC_ATTR_NONNULL_RET
{
list_T *const list = xcalloc(1, sizeof(list_T));
@ -1011,7 +1014,6 @@ void tv_dict_item_free(dictitem_T *const item)
/// @return [allocated] new dictionary item.
static dictitem_T *tv_dict_item_copy(dictitem_T *const di)
FUNC_ATTR_NONNULL_RET FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
FUNC_ATTR_MALLOC
{
dictitem_T *const new_di = tv_dict_item_alloc((const char *)di->di_key);
tv_copy(&di->di_tv, &new_di->di_tv);
@ -1040,7 +1042,7 @@ void tv_dict_item_remove(dict_T *const dict, dictitem_T *const item)
///
/// @return [allocated] new dictionary.
dict_T *tv_dict_alloc(void)
FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_WARN_UNUSED_RESULT
FUNC_ATTR_NONNULL_RET FUNC_ATTR_WARN_UNUSED_RESULT
{
dict_T *const d = xmalloc(sizeof(dict_T));
@ -1577,7 +1579,7 @@ void tv_dict_set_keys_readonly(dict_T *const dict)
///
/// @return [allocated] pointer to the created list.
list_T *tv_list_alloc_ret(typval_T *const ret_tv)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_MALLOC
FUNC_ATTR_NONNULL_ALL
{
list_T *const l = tv_list_alloc();
ret_tv->vval.v_list = l;

View File

@ -489,7 +489,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
}
if (is_string) {
TYPVAL_ENCODE_CONV_STR_STRING(tv, buf, len);
} else {
} else { // -V523
TYPVAL_ENCODE_CONV_STRING(tv, buf, len);
}
xfree(buf);
@ -611,7 +611,7 @@ _convert_one_value_regular_dict: {}
typval_encode_stop_converting_one_item:
return OK;
// Prevent “unused label” warnings.
goto typval_encode_stop_converting_one_item;
goto typval_encode_stop_converting_one_item; // -V779
}
TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE(
@ -814,6 +814,6 @@ encode_vim_to__error_ret:
_mp_destroy(mpstack);
return FAIL;
// Prevent “unused label” warnings.
goto typval_encode_stop_converting_one_item;
goto typval_encode_stop_converting_one_item; // -V779
}
#endif // NVIM_EVAL_TYPVAL_ENCODE_C_H

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <uv.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdarg.h>
#include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// Multi-level queue for selective async event processing.
// Not threadsafe; access must be synchronized externally.
//

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdlib.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <uv.h>
#include "nvim/event/loop.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdint.h>
#include <uv.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* ex_cmds.c: some functions for command line commands
*/

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file ex_cmds2.c
///
/// Some more functions for command line commands

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* ex_docmd.c: functions for executing an Ex command line.
*/
@ -1304,7 +1307,6 @@ static char_u * do_one_cmd(char_u **cmdlinep,
/*
* 2. Handle command modifiers.
*/
p = ea.cmd;
p = skip_range(ea.cmd, NULL);
switch (*p) {
/* When adding an entry, also modify cmd_exists(). */
@ -1727,11 +1729,7 @@ static char_u * do_one_cmd(char_u **cmdlinep,
errormsg = (char_u *)_("E464: Ambiguous use of user-defined command");
goto doend;
}
/* Check for wrong commands. */
if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78) {
errormsg = uc_fun_cmd();
goto doend;
}
// Check for wrong commands.
if (ea.cmdidx == CMD_SIZE) {
if (!ea.skip) {
STRCPY(IObuff, _("E492: Not an editor command"));
@ -4100,14 +4098,12 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp)
xpc.xp_context = EXPAND_FILES;
if (p_wic)
options += WILD_ICASE;
p = ExpandOne(&xpc, eap->arg, NULL,
options, WILD_EXPAND_FREE);
if (p == NULL)
p = ExpandOne(&xpc, eap->arg, NULL, options, WILD_EXPAND_FREE);
if (p == NULL) {
return FAIL;
if (p != NULL) {
(void)repl_cmdline(eap, eap->arg, STRLEN(eap->arg), p, cmdlinep);
xfree(p);
}
(void)repl_cmdline(eap, eap->arg, STRLEN(eap->arg), p, cmdlinep);
xfree(p);
}
}
return OK;
@ -4962,20 +4958,6 @@ static void uc_list(char_u *name, size_t name_len)
MSG(_("No user-defined commands found"));
}
static char_u *uc_fun_cmd(void)
{
static char_u fcmd[] = {0x84, 0xaf, 0x60, 0xb9, 0xaf, 0xb5, 0x60, 0xa4,
0xa5, 0xad, 0xa1, 0xae, 0xa4, 0x60, 0xa1, 0x60,
0xb3, 0xa8, 0xb2, 0xb5, 0xa2, 0xa2, 0xa5, 0xb2,
0xb9, 0x7f, 0};
int i;
for (i = 0; fcmd[i]; ++i)
IObuff[i] = fcmd[i] - 0x40;
IObuff[i] = 0;
return IObuff;
}
static int uc_scan_attr(char_u *attr, size_t len, uint32_t *argt, long *def,
int *flags, int * compl, char_u **compl_arg,
int *addr_type_arg)

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// TODO(ZyX-I): move to eval/executor
/// @file ex_eval.c

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* ex_getln.c: Functions for entering and editing an Ex command line.
*/

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file farsi.c
///
/// Functions for Farsi language
@ -321,7 +324,7 @@ static void put_curr_and_l_to_X(char_u c)
}
if ((curwin->w_cursor.col < (colnr_T)STRLEN(get_cursor_line_ptr()))) {
if ((p_ri && curwin->w_cursor.col) || !p_ri) {
if (!p_ri || curwin->w_cursor.col) {
if (p_ri) {
dec_cursor();
} else {

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// File searching functions for 'path', 'tags' and 'cdpath' options.
//
// External visible functions:

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* fileio.c: read from and write to a file
*/
@ -730,43 +733,16 @@ readfile (
fenc = (char_u *)""; /* binary: don't convert */
fenc_alloced = FALSE;
} else if (curbuf->b_help) {
char_u firstline[80];
int fc;
// Help files are either utf-8 or latin1. Try utf-8 first, if this
// fails it must be latin1.
// It is needed when the first line contains non-ASCII characters.
// That is only in *.??x files.
fenc_next = (char_u *)"latin1";
fenc = (char_u *)"utf-8";
/* Help files are either utf-8 or latin1. Try utf-8 first, if this
* fails it must be latin1.
* Always do this when 'encoding' is "utf-8". Otherwise only do
* this when needed to avoid [converted] remarks all the time.
* It is needed when the first line contains non-ASCII characters.
* That is only in *.??x files. */
fenc = (char_u *)"latin1";
c = enc_utf8;
if (!c && !read_stdin) {
fc = fname[STRLEN(fname) - 1];
if (TOLOWER_ASC(fc) == 'x') {
/* Read the first line (and a bit more). Immediately rewind to
* the start of the file. If the read() fails "len" is -1. */
len = read_eintr(fd, firstline, 80);
lseek(fd, (off_t)0L, SEEK_SET);
for (p = firstline; p < firstline + len; ++p)
if (*p >= 0x80) {
c = TRUE;
break;
}
}
}
fenc_alloced = false;
if (c) {
fenc_next = fenc;
fenc = (char_u *)"utf-8";
/* When the file is utf-8 but a character doesn't fit in
* 'encoding' don't retry. In help text editing utf-8 bytes
* doesn't make sense. */
if (!enc_utf8)
keep_dest_enc = TRUE;
}
fenc_alloced = FALSE;
c = 1;
} else if (*p_fencs == NUL) {
fenc = curbuf->b_p_fenc; /* use format from buffer */
fenc_alloced = FALSE;

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// vim: set fdm=marker fdl=1 fdc=3
/*
@ -1689,12 +1692,10 @@ static void foldDelMarker(linenr_T lnum, char_u *marker, size_t markerlen)
}
}
/* get_foldtext() {{{2 */
/*
* Return the text for a closed fold at line "lnum", with last line "lnume".
* When 'foldtext' isn't set puts the result in "buf[51]". Otherwise the
* result is in allocated memory.
*/
// get_foldtext() {{{2
/// Return the text for a closed fold at line "lnum", with last line "lnume".
/// When 'foldtext' isn't set puts the result in "buf[FOLD_TEXT_LEN]".
/// Otherwise the result is in allocated memory.
char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume,
foldinfo_T *foldinfo, char_u *buf)
FUNC_ATTR_NONNULL_ARG(1)
@ -1781,8 +1782,12 @@ char_u *get_foldtext(win_T *wp, linenr_T lnum, linenr_T lnume,
}
}
if (text == NULL) {
sprintf((char *)buf, _("+--%3ld lines folded "),
(long)(lnume - lnum + 1));
unsigned long count = (unsigned long)(lnume - lnum + 1);
vim_snprintf((char *)buf, FOLD_TEXT_LEN,
ngettext("+--%3ld line folded",
"+--%3ld lines folded ", count),
count);
text = buf;
}
return text;
@ -2765,10 +2770,13 @@ void foldMoveRange(garray_T *gap, const linenr_T line1, const linenr_T line2,
}
dest_index = FOLD_INDEX(fp, gap);
// All folds are now correct, but they are not necessarily in the correct
// order.
// We have to swap folds in the range [move_end, dest_index) with those in
// the range [move_start, move_end).
// All folds are now correct, but not necessarily in the correct order.
// We must swap folds in the range [move_end, dest_index) with those in the
// range [move_start, move_end).
if (move_end == 0) {
// There are no folds after those moved, so none were moved out of order.
return;
}
reverse_fold_order(gap, move_start, dest_index - 1);
reverse_fold_order(gap, move_start, move_start + dest_index - move_end - 1);
reverse_fold_order(gap, move_start + dest_index - move_end, dest_index - 1);

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file garray.c
///
/// Functions for handling growing arrays.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* getchar.c
*
@ -302,13 +305,13 @@ static void add_num_buff(buffheader_T *buf, long n)
*/
static void add_char_buff(buffheader_T *buf, int c)
{
char bytes[MB_MAXBYTES + 1];
uint8_t bytes[MB_MAXBYTES + 1];
int len;
if (IS_SPECIAL(c)) {
len = 1;
} else {
len = (*mb_char2bytes)(c, (char_u *)bytes);
len = mb_char2bytes(c, bytes);
}
for (int i = 0; i < len; i++) {
@ -1849,11 +1852,12 @@ static int vgetorpeek(int advance)
mp_match = mp;
mp_match_len = keylen;
}
} else
/* No match; may have to check for
* termcode at next character. */
if (max_mlen < mlen)
max_mlen = mlen;
} else {
// No match; may have to check for termcode at next character.
if (max_mlen < mlen) {
max_mlen = mlen;
}
}
}
}

View File

@ -548,6 +548,7 @@ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
FOR_ALL_TABS(tp) \
FOR_ALL_WINDOWS_IN_TAB(wp, tp)
// -V:FOR_ALL_WINDOWS_IN_TAB:501
# define FOR_ALL_WINDOWS_IN_TAB(wp, tp) \
for (win_T *wp = ((tp) == curtab) \
? firstwin : (tp)->tp_firstwin; wp != NULL; wp = wp->w_next)

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* hardcopy.c: printing to paper
*/
@ -2576,13 +2579,12 @@ int mch_print_begin(prt_settings_T *psettings)
prt_conv.vc_type = CONV_NONE;
if (!(enc_canon_props(p_enc) & enc_canon_props(p_encoding) & ENC_8BIT)) {
/* Set up encoding conversion if required */
if (FAIL == convert_setup(&prt_conv, p_enc, p_encoding)) {
EMSG2(_("E620: Unable to convert to print encoding \"%s\""),
p_encoding);
return FALSE;
// Set up encoding conversion if required
if (convert_setup(&prt_conv, p_enc, p_encoding) == FAIL) {
emsgf(_("E620: Unable to convert to print encoding \"%s\""),
p_encoding);
return false;
}
prt_do_conv = TRUE;
}
prt_do_conv = prt_conv.vc_type != CONV_NONE;

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file hashtab.c
///
/// Handling of a hashtable with Vim-specific properties.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
* CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
* Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>

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