1
0
forked from aniani/vim

Update runtime files

This commit is contained in:
Bram Moolenaar
2022-03-30 10:51:39 +01:00
parent 9247a221ce
commit 46eea444d9
22 changed files with 259 additions and 174 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
" Maintainer: <vacancy> " Maintainer: <vacancy>
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com> " Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Version: 0.9 " Version: 0.9
" Last Updated: 2020 Oct 9 " Last Updated: 2022 Mar 30
" "
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim " Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
" "
@@ -91,6 +91,9 @@ endfunction
function! s:DefPython() function! s:DefPython()
py3 << PYTHONEOF py3 << PYTHONEOF
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import sys, tokenize, io, types import sys, tokenize, io, types
from token import NAME, DEDENT, NEWLINE, STRING from token import NAME, DEDENT, NEWLINE, STRING

View File

@@ -1,5 +1,5 @@
" Maintainer: Drew Vogel <dvogel@sidejump.org> " Maintainer: Drew Vogel <dvogel@sidejump.org>
" Last Change: 2021 Jul 25 " Last Change: 2022 Mar 20
" "
" Replaced rgb.txt as the source of de facto standard color names. This is " Replaced rgb.txt as the source of de facto standard color names. This is
" sourced each time the colorscheme command is run. It is also sourced each " sourced each time the colorscheme command is run. It is also sourced each
@@ -430,6 +430,8 @@ call extend(v:colornames, {
\ 'yellow2': '#eeee00', \ 'yellow2': '#eeee00',
\ 'yellow3': '#cdcd00', \ 'yellow3': '#cdcd00',
\ 'yellow4': '#8b8b00', \ 'yellow4': '#8b8b00',
\ 'dark yellow': '#8b8b00',
\ 'darkyellow': '#8b8b00',
\ 'gold1': '#ffd700', \ 'gold1': '#ffd700',
\ 'gold2': '#eec900', \ 'gold2': '#eec900',
\ 'gold3': '#cdad00', \ 'gold3': '#cdad00',
@@ -506,6 +508,8 @@ call extend(v:colornames, {
\ 'orangered2': '#ee4000', \ 'orangered2': '#ee4000',
\ 'orangered3': '#cd3700', \ 'orangered3': '#cd3700',
\ 'orangered4': '#8b2500', \ 'orangered4': '#8b2500',
\ 'light red': '#ff8b8b',
\ 'lightred': '#ff8b8b',
\ 'red1': '#ff0000', \ 'red1': '#ff0000',
\ 'red2': '#ee0000', \ 'red2': '#ee0000',
\ 'red3': '#cd0000', \ 'red3': '#cd0000',
@@ -538,6 +542,8 @@ call extend(v:colornames, {
\ 'violetred2': '#ee3a8c', \ 'violetred2': '#ee3a8c',
\ 'violetred3': '#cd3278', \ 'violetred3': '#cd3278',
\ 'violetred4': '#8b2252', \ 'violetred4': '#8b2252',
\ 'light magenta': '#ff8bff',
\ 'lightmagenta': '#ff8bff',
\ 'magenta1': '#ff00ff', \ 'magenta1': '#ff00ff',
\ 'magenta2': '#ee00ee', \ 'magenta2': '#ee00ee',
\ 'magenta3': '#cd00cd', \ 'magenta3': '#cd00cd',

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2022 Mar 04 *autocmd.txt* For Vim version 8.2. Last change: 2022 Mar 27
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -690,9 +690,9 @@ CursorHoldI Just like CursorHold, but in Insert mode.
CursorMoved After the cursor was moved in Normal or Visual CursorMoved After the cursor was moved in Normal or Visual
mode. Also when the text of the cursor line mode. Also when the text of the cursor line
has been changed, e.g., with "x", "rx" or "p". has been changed, e.g., with "x", "rx" or "p".
Not triggered when there is typeahead, while Not always triggered when there is typeahead,
executing commands in a script file, when while executing commands in a script file,
an operator is pending or when moving to when an operator is pending or when moving to
another window while remaining at the same another window while remaining at the same
cursor position. cursor position.
For an example see |match-parens|. For an example see |match-parens|.

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 8.2. Last change: 2022 Mar 08 *builtin.txt* For Vim version 8.2. Last change: 2022 Mar 26
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1562,14 +1562,15 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
or another valid interrupt key, confirm() returns 0. or another valid interrupt key, confirm() returns 0.
An example: > An example: >
:let choice = confirm("What do you want?", "&Apples\n&Oranges\n&Bananas", 2) let choice = confirm("What do you want?",
:if choice == 0 \ "&Apples\n&Oranges\n&Bananas", 2)
: echo "make up your mind!" if choice == 0
:elseif choice == 3 echo "make up your mind!"
: echo "tasteful" elseif choice == 3
:else echo "tasteful"
: echo "I prefer bananas myself." else
:endif echo "I prefer bananas myself."
endif
< In a GUI dialog, buttons are used. The layout of the buttons < In a GUI dialog, buttons are used. The layout of the buttons
depends on the 'v' flag in 'guioptions'. If it is included, depends on the 'v' flag in 'guioptions'. If it is included,
the buttons are always put vertically. Otherwise, confirm() the buttons are always put vertically. Otherwise, confirm()

View File

@@ -1,4 +1,4 @@
*channel.txt* For Vim version 8.2. Last change: 2022 Feb 27 *channel.txt* For Vim version 8.2. Last change: 2022 Mar 26
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.2. Last change: 2022 Mar 13 *insert.txt* For Vim version 8.2. Last change: 2022 Mar 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -800,7 +800,7 @@ If the previous expansion was split, because it got longer than 'textwidth',
then just the text in the current line will be used. then just the text in the current line will be used.
If the match found is at the end of a line, then the first word in the next If the match found is at the end of a line, then the first word in the next
line will be inserted and the message "word from next line" displayed, if line will be inserted and the message "Word from other line" displayed, if
this word is accepted the next CTRL-X CTRL-P or CTRL-X CTRL-N will search this word is accepted the next CTRL-X CTRL-P or CTRL-X CTRL-N will search
for those lines starting with this word. for those lines starting with this word.

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2022 Mar 13 *options.txt* For Vim version 8.2. Last change: 2022 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -987,7 +987,8 @@ A jump table for the options with a short description can be found at |Q_op|.
nostop like start, except CTRL-W and CTRL-U do not stop at the start of nostop like start, except CTRL-W and CTRL-U do not stop at the start of
insert. insert.
When the value is empty, Vi compatible backspacing is used. When the value is empty, Vi compatible backspacing is used, none of
the ways mentioned for the items above are possible.
For backwards compatibility with version 5.4 and earlier: For backwards compatibility with version 5.4 and earlier:
value effect ~ value effect ~

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2022 Jan 21 *repeat.txt* For Vim version 8.2. Last change: 2022 Mar 30
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -210,22 +210,26 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
To source a range of lines that doesn't start with the To source a range of lines that doesn't start with the
|:vim9script| command in Vim9 script context, the |:vim9script| command in Vim9 script context, the
|:vim9cmd| modifier can be used. |:vim9cmd| modifier can be used. If you use a Visual
selection and type ":", the range in the form "'<,'>"
can come before it: >
:'<,'>vim9cmd source
< Otherwise the range goes after the modifier and must
have a colon prefixed, like all Vim9 ranges: >
:vim9cmd :5,9source
When a range of lines in a buffer is sourced in the < When a range of lines in a buffer is sourced in the
Vim9 script context, the previously defined Vim9 script context, the previously defined
script-local variables and functions are not cleared. script-local variables and functions are not cleared.
This works like the range started with the This works like the range started with the
":vim9script noclear" command. The "++clear" argument ":vim9script noclear" command. The "++clear" argument
can be used to clear the script-local variables and can be used to clear the script-local variables and
functions before sourcing the script. This works like functions before sourcing the script. This works like
the range started with the |:vimscript| command the range started with the `:vim9script` command
without the "noclear" argument. See |vim9-reload| for without the "noclear" argument. See |vim9-reload| for
more information. more information.
Examples: > Examples: >
:4,5source :4,5source
:vim9cmd :'<,'>source
:10,18source ++clear :10,18source ++clear
*:source!* *:source!*

View File

@@ -8000,6 +8000,7 @@ lace.vim syntax.txt /*lace.vim*
lambda eval.txt /*lambda* lambda eval.txt /*lambda*
lang-variable eval.txt /*lang-variable* lang-variable eval.txt /*lang-variable*
language-mapping map.txt /*language-mapping* language-mapping map.txt /*language-mapping*
language-server-protocol channel.txt /*language-server-protocol*
last-pattern pattern.txt /*last-pattern* last-pattern pattern.txt /*last-pattern*
last-position-jump usr_05.txt /*last-position-jump* last-position-jump usr_05.txt /*last-position-jump*
last_buffer_nr() builtin.txt /*last_buffer_nr()* last_buffer_nr() builtin.txt /*last_buffer_nr()*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2022 Mar 18 *todo.txt* For Vim version 8.2. Last change: 2022 Mar 30
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,6 +38,9 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
Allow for: "import autoload '../lib/script.vim'"
avoids going through 'runtimepath' and avoids name collisions.
Really drop the Athena and NeXtaw GUI? Decide end of March. Really drop the Athena and NeXtaw GUI? Decide end of March.
Once Vim9 is stable: Once Vim9 is stable:
@@ -48,6 +51,7 @@ Once Vim9 is stable:
vim9instr.c vim9instr.c
vim9script.c vim9script.c
vim9type.c vim9type.c
- Adjust intro message to say "help version9".
Further Vim9 improvements, possibly after launch: Further Vim9 improvements, possibly after launch:
- Check performance with callgrind and kcachegrind. - Check performance with callgrind and kcachegrind.
@@ -417,13 +421,6 @@ register, then "" doesn't contain anything. Make it still follow "+.
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733) File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
"make test_gui" crashed in submenu_change(). Fix and remove workaround in
add_pixmap_args().
Athena is OK.
Motif: Build on Ubuntu can't enter any text in dialog text fields.
Running test_gui and test_gui_init with Motif sometimes kills the window
manager. Problem with Motif?
When editing a file with ":edit" the output of :swapname is relative, while When editing a file with ":edit" the output of :swapname is relative, while
editing it with "vim file" it is absolute. (#355) editing it with "vim file" it is absolute. (#355)
Which one should it be? Which one should it be?
@@ -478,11 +475,6 @@ Test loose_clipboard() by selecting text before suspending.
Undo puts cursor in wrong line after "cG<Esc>" undo. Undo puts cursor in wrong line after "cG<Esc>" undo.
Implement completion for "breakadd". Should expand the second argument, e.g.
"func", and then function names after ":breakadd func". Including
script-local functions.
Also for ":profile".
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019 :unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
Dec 19) Dec 19)
@@ -2501,10 +2493,6 @@ Works OK when 'cmdheight' is 2.
8 Use a mechanism similar to omni completion to figure out the kind of tab 8 Use a mechanism similar to omni completion to figure out the kind of tab
for CTRL-] and jump to the appropriate matching tag (if there are for CTRL-] and jump to the appropriate matching tag (if there are
several). several).
Alternative: be able to define a function that takes the tag name and uses
taglist() to find the right location. With indication of using CTRL-] so
that the context can be taken into account. (Robert Webb)
Patch by Christian Brabandt, 2013 May 31.
The utf class table is missing some entries: The utf class table is missing some entries:
0x2212, minus sign 0x2212, minus sign

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2022 Mar 18 *vim9.txt* For Vim version 8.2. Last change: 2022 Mar 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -184,8 +184,8 @@ For now you will need to pass the dictionary explicitly: >
def DictFunc(d: dict<any>, arg: string) def DictFunc(d: dict<any>, arg: string)
echo d[arg] echo d[arg]
enddef enddef
var d = {item: 'value', func: DictFunc} var ad = {item: 'value', func: DictFunc}
d.func(d, 'item') ad.func(d, 'item')
You can call a legacy dict function though: > You can call a legacy dict function though: >
func Legacy() dict func Legacy() dict
@@ -376,13 +376,23 @@ And with autocommands: >
} }
Although using a :def function probably works better. Although using a :def function probably works better.
*E1022* *E1103* *E1130* *E1131* *E1133* *E1022* *E1103* *E1130* *E1131* *E1133*
*E1134* *E1235* *E1134* *E1235*
Declaring a variable with a type but without an initializer will initialize to Declaring a variable with a type but without an initializer will initialize to
false (for bool), empty (for string, list, dict, etc.) or zero (for number, false (for bool), empty (for string, list, dict, etc.) or zero (for number,
any, etc.). This matters especially when using the "any" type, the value will any, etc.). This matters especially when using the "any" type, the value will
default to the number zero. default to the number zero. For example, when declaring a list, items can be
*E1016* *E1052* *E1066* added: >
var myList: list<number>
myList->add(7)
Initializing a variable to a null value, e.g. `null_list`, differs from not
initializing the variable. This throws an error: >
var myList = null_list
myList->add(7) # E1130: Cannot add to null list
< *E1016* *E1052* *E1066*
In Vim9 script `:let` cannot be used. An existing variable is assigned to In Vim9 script `:let` cannot be used. An existing variable is assigned to
without any command. The same for global, window, tab, buffer and Vim without any command. The same for global, window, tab, buffer and Vim
variables, because they are not really declared. Those can also be deleted variables, because they are not really declared. Those can also be deleted
@@ -1243,7 +1253,7 @@ Closures defined in a loop will share the same context. For example: >
A closure must be compiled in the context that it is defined in, so that A closure must be compiled in the context that it is defined in, so that
variables in that context can be found. This mostly happens correctly, except variables in that context can be found. This mostly happens correctly, except
when a function is marked for debugging with `breakadd` after it was compiled. when a function is marked for debugging with `breakadd` after it was compiled.
Make sure the define the breakpoint before compiling the outerh function. Make sure to define the breakpoint before compiling the outer function.
The "inloop" variable will exist only once, all closures put in the list refer The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 4. This is to the same instance, which in the end will have the value 4. This is

View File

@@ -5,7 +5,7 @@
" Meikel Brandmeyer <mb@kotka.de> " Meikel Brandmeyer <mb@kotka.de>
" URL: https://github.com/clojure-vim/clojure.vim " URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license) " License: Vim (see :h license)
" Last Change: 2021-10-26 " Last Change: 2022-03-24
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
" specially and hence are not indented specially. " specially and hence are not indented specially.
" "
" -*- LISPWORDS -*- " -*- LISPWORDS -*-
" Generated from https://github.com/clojure-vim/clojure.vim/blob/62b215f079ce0f3834fd295c7a7f6bd8cc54bcc3/clj/src/vim_clojure_static/generate.clj " Generated from https://github.com/clojure-vim/clojure.vim/blob/fd280e33e84c88e97860930557dba3ff80b1a82d/clj/src/vim_clojure_static/generate.clj
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
" Provide insert mode completions for special forms and clojure.core. As " Provide insert mode completions for special forms and clojure.core. As
@@ -66,10 +66,10 @@ endif
" Filter files in the browse dialog " Filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" . let b:browsefilter = "All Files\t*\n" .
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" . \ "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx\n" .
\ "Java Source Files (*.java)\t*.java\n" . \ "EDN Files\t*.edn\n" .
\ "All Files (*.*)\t*.*\n" \ "Java Files\t*.java\n"
let b:undo_ftplugin .= ' | unlet! b:browsefilter' let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif endif

View File

@@ -3,7 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com> " Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Feb 13 " Last Change: 2022 Mar 21
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))
finish finish
@@ -53,7 +53,7 @@ endif
" TODO: " TODO:
"setlocal define=^\\s*def "setlocal define=^\\s*def
setlocal comments=:# setlocal comments=b:#
setlocal commentstring=#\ %s setlocal commentstring=#\ %s
if !exists('g:ruby_version_paths') if !exists('g:ruby_version_paths')
@@ -87,8 +87,14 @@ endfunction
function! s:build_path(path) abort function! s:build_path(path) abort
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',') let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
if &g:path !~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$' if &g:path =~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
let path = substitute(&g:path,',,$',',','') . ',' . path let path = path . ',.,,'
elseif &g:path =~# ',\.,,$'
let path = &g:path[0:-4] . path . ',.,,'
elseif &g:path =~# ',,$'
let path = &g:path[0:-2] . path . ',,'
else
let path = substitute(&g:path, '[^,]\zs$', ',', '') . path
endif endif
return path return path
endfunction endfunction
@@ -164,6 +170,8 @@ let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><ctag>| sil! cunmap <buffer
if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
nmap <buffer><script> <SID>: :<C-U> nmap <buffer><script> <SID>: :<C-U>
nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR> nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR>
cmap <buffer> <SID><cfile> <Plug><cfile>
cmap <buffer> <SID><ctag> <Plug><ctag>
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','n')<CR> nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','n')<CR>
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','n')<CR> nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','n')<CR>
@@ -210,20 +218,20 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
call s:map('c', '', '<C-R><C-F> <Plug><cfile>') call s:map('c', '', '<C-R><C-F> <Plug><cfile>')
cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : '' cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : ''
call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><ctag>"<SID>tagzv<CR>') call s:map('n', '<script><silent>', '<C-]> <SID>:exe v:count1."tag <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><ctag>"<SID>tagzv<CR>') call s:map('n', '<script><silent>', 'g<C-]> <SID>:exe "tjump <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><ctag>"<SID>tagzv<CR>') call s:map('n', '<script><silent>', 'g] <SID>:exe "tselect <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>') call s:map('n', '<script><silent>', '<C-W>] <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>') call s:map('n', '<script><silent>', '<C-W><C-]> <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><ctag>"<SID>tagzv<CR>') call s:map('n', '<script><silent>', '<C-W>g<C-]> <SID>:exe "stjump <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><ctag>"<SID>tagzv<CR>') call s:map('n', '<script><silent>', '<C-W>g] <SID>:exe "stselect <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><ctag>"<CR>') call s:map('n', '<script><silent>', '<C-W>} <SID>:exe v:count1."ptag <SID><ctag>"<CR>')
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><ctag>"<CR>') call s:map('n', '<script><silent>', '<C-W>g} <SID>:exe "ptjump <SID><ctag>"<CR>')
call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>') call s:map('n', '<script><silent>', 'gf <SID>c:find <SID><cfile><CR>')
call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>') call s:map('n', '<script><silent>', '<C-W>f <SID>c:sfind <SID><cfile><CR>')
call s:map('n', '<silent>', '<C-W><C-F> <SID>c:sfind <Plug><cfile><CR>') call s:map('n', '<script><silent>', '<C-W><C-F> <SID>c:sfind <SID><cfile><CR>')
call s:map('n', '<silent>', '<C-W>gf <SID>c:tabfind <Plug><cfile><CR>') call s:map('n', '<script><silent>', '<C-W>gf <SID>c:tabfind <SID><cfile><CR>')
endif endif
let &cpo = s:cpo_save let &cpo = s:cpo_save

View File

@@ -5,7 +5,7 @@
" Meikel Brandmeyer <mb@kotka.de> " Meikel Brandmeyer <mb@kotka.de>
" URL: https://github.com/clojure-vim/clojure.vim " URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license) " License: Vim (see :h license)
" Last Change: 2021-10-26 " Last Change: 2022-03-24
if exists("b:did_indent") if exists("b:did_indent")
finish finish

View File

@@ -4,7 +4,7 @@
" Previous Maintainer: Nikolai Weibull <now at bitwi.se> " Previous Maintainer: Nikolai Weibull <now at bitwi.se>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com> " Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Feb 03 " Last Change: 2022 Mar 22
" 0. Initialization {{{1 " 0. Initialization {{{1
" ================= " =================
@@ -40,9 +40,11 @@ setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it. " Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetRubyIndent(v:lnum) setlocal indentexpr=GetRubyIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,. setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,.
setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end setlocal indentkeys+==end,=else,=elsif,=when,=in\ ,=ensure,=rescue,==begin,==end
setlocal indentkeys+==private,=protected,=public setlocal indentkeys+==private,=protected,=public
let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<"
" Only define the function once. " Only define the function once.
if exists("*GetRubyIndent") if exists("*GetRubyIndent")
finish finish
@@ -85,14 +87,17 @@ let s:skip_expr =
" Regex used for words that, at the start of a line, add a level of indent. " Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords = let s:ruby_indent_keywords =
\ '^\s*\zs\<\%(module\|class\|if\|for' . \ '^\s*\zs\<\%(module\|class\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' . \ '\|while\|until\|else\|elsif\|case\|when\|in\|unless\|begin\|ensure\|rescue' .
\ '\|\%(\K\k*[!?]\?\s\+\)\=def\):\@!\>' . \ '\|\%(\K\k*[!?]\?\s\+\)\=def\):\@!\>' .
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' . \ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>' \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
" Def without an end clause: def method_call(...) = <expression>
let s:ruby_endless_def = '\<def\s\+\k\+[!?]\=\%((.*)\|\s\)\s*='
" Regex used for words that, at the start of a line, remove a level of indent. " Regex used for words that, at the start of a line, remove a level of indent.
let s:ruby_deindent_keywords = let s:ruby_deindent_keywords =
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>' \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|in\|end\):\@!\>'
" Regex that defines the start-match for the 'end' keyword. " Regex that defines the start-match for the 'end' keyword.
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>' "let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
@@ -104,15 +109,31 @@ let s:end_start_regex =
\ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>' \ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
" Regex that defines the middle-match for the 'end' keyword. " Regex that defines the middle-match for the 'end' keyword.
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|elsif\):\@!\>' let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|\%(\%(^\|;\)\s*\)\@<=\<in\|elsif\):\@!\>'
" Regex that defines the end-match for the 'end' keyword. " Regex that defines the end-match for the 'end' keyword.
let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>' let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>'
" Expression used for searchpair() call for finding match for 'end' keyword. " Expression used for searchpair() call for finding a match for an 'end' keyword.
let s:end_skip_expr = s:skip_expr . function! s:EndSkipExpr()
\ ' || (expand("<cword>") == "do"' . if eval(s:skip_expr)
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")' return 1
elseif expand('<cword>') == 'do'
\ && getline(".") =~ '^\s*\<\(while\|until\|for\):\@!\>'
return 1
elseif getline('.') =~ s:ruby_endless_def
return 1
elseif getline('.') =~ '\<def\s\+\k\+[!?]\=([^)]*$'
" Then it's a `def method(` with a possible `) =` later
call search('\<def\s\+\k\+\zs(', 'W', line('.'))
normal! %
return getline('.') =~ ')\s*='
else
return 0
endif
endfunction
let s:end_skip_expr = function('s:EndSkipExpr')
" Regex that defines continuation lines, not including (, {, or [. " Regex that defines continuation lines, not including (, {, or [.
let s:non_bracket_continuation_regex = let s:non_bracket_continuation_regex =
@@ -572,6 +593,11 @@ function! s:AfterUnbalancedBracket(pline_info) abort
call cursor(info.plnum, closing.pos + 1) call cursor(info.plnum, closing.pos + 1)
normal! % normal! %
if strpart(info.pline, closing.pos) =~ '^)\s*='
" special case: the closing `) =` of an endless def
return indent(s:GetMSL(line('.')))
endif
if s:Match(line('.'), s:ruby_indent_keywords) if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + info.sw return indent('.') + info.sw
else else
@@ -610,7 +636,7 @@ function! s:AfterIndentKeyword(pline_info) abort
let info = a:pline_info let info = a:pline_info
let col = s:Match(info.plnum, s:ruby_indent_keywords) let col = s:Match(info.plnum, s:ruby_indent_keywords)
if col > 0 if col > 0 && s:Match(info.plnum, s:ruby_endless_def) <= 0
call cursor(info.plnum, col) call cursor(info.plnum, col)
let ind = virtcol('.') - 1 + info.sw let ind = virtcol('.') - 1 + info.sw
" TODO: make this better (we need to count them) (or, if a searchpair " TODO: make this better (we need to count them) (or, if a searchpair
@@ -657,7 +683,7 @@ function! s:IndentingKeywordInMSL(msl_info) abort
" TODO: this does not take into account contrived things such as " TODO: this does not take into account contrived things such as
" module Foo; class Bar; end " module Foo; class Bar; end
let col = s:Match(info.plnum_msl, s:ruby_indent_keywords) let col = s:Match(info.plnum_msl, s:ruby_indent_keywords)
if col > 0 if col > 0 && s:Match(info.plnum_msl, s:ruby_endless_def) <= 0
let ind = indent(info.plnum_msl) + info.sw let ind = indent(info.plnum_msl) + info.sw
if s:Match(info.plnum_msl, s:end_end_regex) if s:Match(info.plnum_msl, s:end_end_regex)
let ind = ind - info.sw let ind = ind - info.sw

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers " Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org> " Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2021 Oct 19 " Last Change: 2022 Mar 28
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization " Standard syntax initialization
@@ -24,7 +24,7 @@ let s:supported = [
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm', \ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy', \ 'trixie', 'sid', 'rc-buggy',
\ \
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy', \ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
\ 'devel' \ 'devel'
\ ] \ ]
let s:unsupported = [ let s:unsupported = [
@@ -35,7 +35,7 @@ let s:unsupported = [
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'groovy' \ 'disco', 'eoan', 'hirsute', 'groovy'
\ ] \ ]
let &cpo=s:cpo let &cpo=s:cpo

View File

@@ -2,7 +2,7 @@
" Language: Debian sources.list " Language: Debian sources.list
" Maintainer: Debian Vim Maintainers " Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2021 Oct 19 " Last Change: 2022 Mar 28
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization " Standard syntax initialization
@@ -26,7 +26,7 @@ let s:supported = [
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm', \ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy', \ 'trixie', 'sid', 'rc-buggy',
\ \
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy', \ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
\ 'devel' \ 'devel'
\ ] \ ]
let s:unsupported = [ let s:unsupported = [
@@ -37,7 +37,7 @@ let s:unsupported = [
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'groovy' \ 'disco', 'eoan', 'hirsute', 'groovy'
\ ] \ ]
let &cpo=s:cpo let &cpo=s:cpo

View File

@@ -3,9 +3,9 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com> " Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2018 Jul 04 " Last Change: 2022 Mar 18
if &syntax !~# '\<eruby\>' || get(b:, 'current_syntax') =~# '\<eruby\>' if exists("b:current_syntax")
finish finish
endif endif
@@ -19,8 +19,6 @@ endif
if &filetype =~ '^eruby\.' if &filetype =~ '^eruby\.'
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
elseif &filetype =~ '^.*\.eruby\>'
let b:eruby_subtype = matchstr(&filetype,'^.\{-\}\ze\.eruby\>')
elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' elseif !exists("b:eruby_subtype") && main_syntax == 'eruby'
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
@@ -54,10 +52,10 @@ if !b:eruby_nest_level
let b:eruby_nest_level = 1 let b:eruby_nest_level = 1
endif endif
if get(b:, 'eruby_subtype', '') !~# '^\%(eruby\)\=$' && &syntax =~# '^eruby\>' if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=? 'eruby'
exe "runtime! syntax/".b:eruby_subtype.".vim" exe "runtime! syntax/".b:eruby_subtype.".vim"
endif
unlet! b:current_syntax unlet! b:current_syntax
endif
syn include @rubyTop syntax/ruby.vim syn include @rubyTop syntax/ruby.vim
syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment
@@ -72,7 +70,7 @@ exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:erub
hi def link erubyDelimiter PreProc hi def link erubyDelimiter PreProc
hi def link erubyComment Comment hi def link erubyComment Comment
let b:current_syntax = matchstr(&syntax, '^.*\<eruby\>') let b:current_syntax = 'eruby'
if main_syntax == 'eruby' if main_syntax == 'eruby'
unlet main_syntax unlet main_syntax

View File

@@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com> " Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Jun 06 " Last Change: 2021 Nov 03
" ---------------------------------------------------------------------------- " ----------------------------------------------------------------------------
" "
" Previous Maintainer: Mirko Nasato " Previous Maintainer: Mirko Nasato
@@ -66,7 +66,7 @@ endfunction
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>) com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
" Not-Top Cluster {{{1 " Not-Top Cluster {{{1
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses,@Spell syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyDoubleQuoteSymbolDelimiter,rubySingleQuoteSymbolDelimiter,rubyParentheses,@Spell
" Whitespace Errors {{{1 " Whitespace Errors {{{1
if exists("ruby_space_errors") if exists("ruby_space_errors")
@@ -364,6 +364,9 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
SynFold 'class' syn region rubyClassBlock start="\<class\>" matchgroup=rubyClass skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop SynFold 'class' syn region rubyClassBlock start="\<class\>" matchgroup=rubyClass skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
SynFold 'module' syn region rubyModuleBlock start="\<module\>" matchgroup=rubyModule skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop SynFold 'module' syn region rubyModuleBlock start="\<module\>" matchgroup=rubyModule skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
" endless def
syn match rubyDefine "\<def\s\+\ze[^[:space:];#(]\+\%(\s\+\|\s*(.*)\s*\)=" nextgroup=rubyMethodDeclaration skipwhite
" modifiers " modifiers
syn match rubyLineContinuation "\\$" nextgroup=@rubyModifier skipwhite skipnl syn match rubyLineContinuation "\\$" nextgroup=@rubyModifier skipwhite skipnl
syn match rubyConditionalModifier "\<\%(if\|unless\)\>" syn match rubyConditionalModifier "\<\%(if\|unless\)\>"
@@ -430,9 +433,10 @@ endif
" Comments and Documentation {{{1 " Comments and Documentation {{{1
syn match rubySharpBang "\%^#!.*" display syn match rubySharpBang "\%^#!.*" display
syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained
syn match rubyEncoding "[[:alnum:]-]\+" contained display syn match rubyEncoding "[[:alnum:]-_]\+" contained display
syn match rubyMagicComment "\c\%<3l#\s*\zs\%(coding\|encoding\):" contained nextgroup=rubyEncoding skipwhite syn match rubyMagicComment "\c\%<3l#\s*\zs\%(coding\|encoding\):" contained nextgroup=rubyEncoding skipwhite
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen_string_literal\|warn_indent\|warn_past_scope\):" contained nextgroup=rubyBoolean skipwhite syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen_string_literal\|warn_indent\|warn_past_scope\):" contained nextgroup=rubyBoolean skipwhite
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(shareable_constant_value\):" contained nextgroup=rubyEncoding skipwhite
syn match rubyComment "#.*" contains=@rubyCommentSpecial,rubySpaceError,@Spell syn match rubyComment "#.*" contains=@rubyCommentSpecial,rubySpaceError,@Spell
syn cluster rubyCommentSpecial contains=rubySharpBang,rubyTodo,rubyMagicComment syn cluster rubyCommentSpecial contains=rubySharpBang,rubyTodo,rubyMagicComment
@@ -465,6 +469,10 @@ syn match rubyDefinedOperator "\%#=1\<defined?" display
syn match rubySymbol "\%(\w\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 contained containedin=rubyBlockParameterList,rubyCurlyBlock syn match rubySymbol "\%(\w\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 contained containedin=rubyBlockParameterList,rubyCurlyBlock
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1 syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1 syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1
syn match rubySingleQuoteSymbolDelimiter "'" contained
syn match rubySymbol "'\%(\\.\|[^']\)*'::\@!"he=e-1 contains=rubyQuoteEscape,rubyBackslashEscape,rubySingleQuoteSymbolDelimiter
syn match rubyDoubleQuoteSymbolDelimiter "\"" contained
syn match rubySymbol "\"\%(\\.\|[^\"]\)*\"::\@!"he=e-1 contains=@rubyStringSpecial,rubyDoubleQuoteSymbolDelimiter
" __END__ Directive {{{1 " __END__ Directive {{{1
SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$"
@@ -565,6 +573,8 @@ hi def link rubyHeredocDelimiter rubyStringDelimiter
hi def link rubyPercentRegexpDelimiter rubyRegexpDelimiter hi def link rubyPercentRegexpDelimiter rubyRegexpDelimiter
hi def link rubyPercentStringDelimiter rubyStringDelimiter hi def link rubyPercentStringDelimiter rubyStringDelimiter
hi def link rubyPercentSymbolDelimiter rubySymbolDelimiter hi def link rubyPercentSymbolDelimiter rubySymbolDelimiter
hi def link rubyDoubleQuoteSymbolDelimiter rubySymbolDelimiter
hi def link rubySingleQuoteSymbolDelimiter rubySymbolDelimiter
hi def link rubyRegexpDelimiter rubyStringDelimiter hi def link rubyRegexpDelimiter rubyStringDelimiter
hi def link rubySymbolDelimiter rubySymbol hi def link rubySymbolDelimiter rubySymbol
hi def link rubyString String hi def link rubyString String

View File

@@ -1,5 +1,5 @@
" Language: tmux(1) configuration file " Language: tmux(1) configuration file
" Version: 3.2a (git-44ada9cd) " Version: 3.3-rc (git-964deae4)
" URL: https://github.com/ericpruitt/tmux.vim/ " URL: https://github.com/ericpruitt/tmux.vim/
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com> " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
@@ -18,40 +18,49 @@ syntax iskeyword @,48-57,_,192-255,-
syntax case match syntax case match
syn keyword tmuxAction none any current other syn keyword tmuxAction none any current other
syn keyword tmuxBoolean off on syn keyword tmuxBoolean off on yes no
syn keyword tmuxTodo FIXME NOTE TODO XXX contained syn keyword tmuxTodo FIXME NOTE TODO XXX contained
syn match tmuxColour /\<colour[0-9]\+/ display syn match tmuxColour /\<colou\?r[0-9]\+\>/ display
syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
syn match tmuxNumber /\<\d\+\>/ display syn match tmuxNumber /\<\d\+\>/ display
syn match tmuxFlags /\s-\a\+/ display syn match tmuxFlags /\s-\a\+/ display
syn match tmuxVariable /\w\+=/ display syn match tmuxVariableExpansion /\$\({[A-Za-z_]\w*}\|[A-Za-z_]\w*\)/ display
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display syn match tmuxControl /^\s*%\(if\|elif\|else\|endif\)\>/
syn match tmuxControl /%\(if\|elif\|else\|endif\)/ syn match tmuxEscape /\\\(u\x\{4\}\|U\x\{8\}\|\o\{3\}\|[\\ernt$]\)/ display
syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo,@Spell syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo,@Spell
syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,@Spell syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,tmuxEscape,tmuxVariableExpansion,@Spell
syn region tmuxString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell syn region tmuxUninterpolatedString start=+'+ skip=+\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
" TODO: Figure out how escaping works inside of #(...) and #{...} blocks. " TODO: Figure out how escaping works inside of #(...) and #{...} blocks.
syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend
syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend
syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend
" At the time of this writing, the latest tmux release will parse a line
" reading "abc=xyz set-option ..." as an assignment followed by a command
" hence the presence of "\s" in the "end" argument.
syn region tmuxAssignment matchgroup=tmuxVariable start=/^\s*[A-Za-z_]\w*=\@=/ skip=/\\$\|\\\s/ end=/\s\|$/ contains=tmuxString,tmuxUninterpolatedString,tmuxVariableExpansion,tmuxControl,tmuxEscape
hi def link tmuxFormatString Identifier hi def link tmuxFormatString Identifier
hi def link tmuxAction Boolean hi def link tmuxAction Boolean
hi def link tmuxBoolean Boolean hi def link tmuxBoolean Boolean
hi def link tmuxCommands Keyword hi def link tmuxCommands Keyword
hi def link tmuxControl Keyword hi def link tmuxControl PreCondit
hi def link tmuxComment Comment hi def link tmuxComment Comment
hi def link tmuxEscape Special
hi def link tmuxEscapeUnquoted Special
hi def link tmuxKey Special hi def link tmuxKey Special
hi def link tmuxNumber Number hi def link tmuxNumber Number
hi def link tmuxFlags Identifier hi def link tmuxFlags Identifier
hi def link tmuxOptions Function hi def link tmuxOptions Function
hi def link tmuxString String hi def link tmuxString String
hi def link tmuxTodo Todo hi def link tmuxTodo Todo
hi def link tmuxUninterpolatedString
\ String
hi def link tmuxVariable Identifier hi def link tmuxVariable Identifier
hi def link tmuxVariableExpansion Identifier hi def link tmuxVariableExpansion Identifier
@@ -61,63 +70,85 @@ hi def link tmuxVariableExpansion Identifier
if get(g:, "tmux_syntax_colors", 1) if get(g:, "tmux_syntax_colors", 1)
for s:i in range(0, 255) for s:i in range(0, 255)
let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none" let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none"
exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display" exec "syn match tmuxColour" . s:i . " /\\<colou\\?r" . s:i . "\\>/ display"
\ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg \ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
endfor endfor
endif endif
syn keyword tmuxOptions syn keyword tmuxOptions
\ backspace buffer-limit command-alias copy-command default-terminal editor \ activity-action after-bind-key after-capture-pane after-copy-mode
\ escape-time exit-empty activity-action assume-paste-time base-index \ after-display-message after-display-panes after-kill-pane
\ bell-action default-command default-shell default-size destroy-unattached \ after-list-buffers after-list-clients after-list-keys after-list-panes
\ after-list-sessions after-list-windows after-load-buffer after-lock-server
\ after-new-session after-new-window after-paste-buffer after-pipe-pane
\ after-queue after-refresh-client after-rename-session after-rename-window
\ after-resize-pane after-resize-window after-save-buffer
\ after-select-layout after-select-pane after-select-window after-send-keys
\ after-set-buffer after-set-environment after-set-hook after-set-option
\ after-show-environment after-show-messages after-show-options
\ after-split-window after-unbind-key aggressive-resize alert-activity
\ alert-bell alert-silence allow-passthrough allow-rename alternate-screen
\ assume-paste-time automatic-rename automatic-rename-format backspace
\ base-index bell-action buffer-limit client-active client-attached
\ client-detached client-focus-in client-focus-out client-resized
\ client-session-changed clock-mode-colour clock-mode-style command-alias
\ copy-command copy-mode-current-match-style copy-mode-mark-style
\ copy-mode-match-style cursor-colour cursor-style default-command
\ default-shell default-size default-terminal destroy-unattached
\ detach-on-destroy display-panes-active-colour display-panes-colour \ detach-on-destroy display-panes-active-colour display-panes-colour
\ display-panes-time display-time exit-unattached extended-keys focus-events \ display-panes-time display-time editor escape-time exit-empty
\ history-file history-limit key-table lock-after-time lock-command \ exit-unattached extended-keys fill-character focus-events history-file
\ message-command-style message-limit message-style aggressive-resize \ history-limit key-table lock-after-time lock-command main-pane-height
\ allow-rename alternate-screen automatic-rename automatic-rename-format \ main-pane-width message-command-style message-limit message-style
\ clock-mode-colour clock-mode-style copy-mode-current-match-style \ mode-keys mode-style monitor-activity monitor-bell monitor-silence mouse
\ copy-mode-mark-style copy-mode-match-style main-pane-height \ other-pane-height other-pane-width pane-active-border-style
\ main-pane-width mode-keys mode-style monitor-activity monitor-bell \ pane-base-index pane-border-format pane-border-indicators
\ monitor-silence mouse other-pane-height other-pane-width \ pane-border-lines pane-border-status pane-border-style pane-colours
\ pane-active-border-style pane-base-index pane-border-format \ pane-died pane-exited pane-focus-in pane-focus-out pane-mode-changed
\ pane-border-lines pane-border-status pane-border-style pane-colours prefix \ pane-set-clipboard pane-title-changed popup-border-lines
\ prefix2 prompt-history-limit remain-on-exit renumber-windows repeat-time \ popup-border-style popup-style prefix prefix2 prompt-history-limit
\ set-clipboard set-titles set-titles-string silence-action status status-bg \ remain-on-exit remain-on-exit-format renumber-windows repeat-time
\ status-fg status-format status-interval status-justify status-keys \ scroll-on-clear session-closed session-created session-renamed
\ status-left status-left-length status-left-style status-position \ session-window-changed set-clipboard set-titles set-titles-string
\ status-right status-right-length status-right-style status-style \ silence-action status status-bg status-fg status-format status-interval
\ synchronize-panes terminal-features terminal-overrides update-environment \ status-justify status-keys status-left status-left-length
\ user-keys visual-activity visual-bell visual-silence window-active-style \ status-left-style status-position status-right status-right-length
\ status-right-style status-style synchronize-panes terminal-features
\ terminal-overrides update-environment user-keys visual-activity
\ visual-bell visual-silence window-active-style window-layout-changed
\ window-linked window-pane-changed window-renamed window-resized
\ window-size window-status-activity-style window-status-bell-style \ window-size window-status-activity-style window-status-bell-style
\ window-status-current-format window-status-current-style \ window-status-current-format window-status-current-style
\ window-status-format window-status-last-style window-status-separator \ window-status-format window-status-last-style window-status-separator
\ window-status-style window-style word-separators wrap-search \ window-status-style window-style window-unlinked word-separators
\ wrap-search xterm-keys
syn keyword tmuxCommands syn keyword tmuxCommands
\ attach attach-session bind bind-key break-pane breakp capture-pane \ attach attach-session bind bind-key break-pane breakp capture-pane
\ capturep choose-buffer choose-client choose-tree clear-history clearhist \ capturep choose-buffer choose-client choose-session choose-tree
\ choose-window clear-history clear-prompt-history clearhist clearphist
\ clock-mode command-prompt confirm confirm-before copy-mode customize-mode \ clock-mode command-prompt confirm confirm-before copy-mode customize-mode
\ detach detach-client display display-menu display-message display-panes \ delete-buffer deleteb detach detach-client display display-menu
\ display-popup displayp find-window findw if if-shell join-pane joinp \ display-message display-panes display-popup displayp find-window findw has
\ kill-pane kill-server kill-session kill-window killp has has-session killw \ has-session if if-shell info join-pane joinp kill-pane kill-server
\ kill-session kill-window killp killw last last-pane last-window lastp
\ link-window linkw list-buffers list-clients list-commands list-keys \ link-window linkw list-buffers list-clients list-commands list-keys
\ list-panes list-sessions list-windows load-buffer loadb lock lock-client \ list-panes list-sessions list-windows load-buffer loadb lock lock-client
\ lock-server lock-session lockc last-pane lastp locks ls last last-window \ lock-server lock-session lockc locks ls lsb lsc lscm lsk lsp lsw menu
\ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window \ move-pane move-window movep movew new new-session new-window neww next
\ clear-prompt-history clearphist movep movew new new-session new-window \ next-layout next-window nextl paste-buffer pasteb pipe-pane pipep popup
\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane \ prev previous-layout previous-window prevl refresh refresh-client rename
\ pipep popup prev previous-layout previous-window prevl refresh \ rename-session rename-window renamew resize-pane resize-window resizep
\ refresh-client rename rename-session rename-window renamew resize-pane \ resizew respawn-pane respawn-window respawnp respawnw rotate-window
\ resize-window resizep resizew respawn-pane respawn-window respawnp \ rotatew run run-shell save-buffer saveb select-layout select-pane
\ respawnw rotate-window rotatew run run-shell save-buffer saveb \ select-window selectl selectp selectw send send-keys send-prefix
\ select-layout select-pane select-window selectl selectp selectw send \ server-info set set-buffer set-environment set-hook set-option
\ send-keys send-prefix set set-buffer set-environment set-hook set-option
\ set-window-option setb setenv setw show show-buffer show-environment \ set-window-option setb setenv setw show show-buffer show-environment
\ show-hooks show-messages show-options show-prompt-history \ show-hooks show-messages show-options show-prompt-history
\ show-window-options showb showenv showmsgs showphist showw source \ show-window-options showb showenv showmsgs showphist showw source
\ source-file split-window splitw start start-server suspend-client suspendc \ source-file split-pane split-window splitp splitw start start-server
\ swap-pane swap-window swapp swapw switch-client switchc unbind unbind-key \ suspend-client suspendc swap-pane swap-window swapp swapw switch-client
\ unlink-window unlinkw wait wait-for \ switchc unbind unbind-key unlink-window unlinkw wait wait-for
let &cpo = s:original_cpo let &cpo = s:original_cpo
unlet! s:original_cpo s:bg s:i unlet! s:original_cpo s:bg s:i