mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
vim-patch:46eea444d (#17920)
Update runtime files
46eea444d9
Skip repeat.txt as it only has vim9-specific changes.
This commit is contained in:
parent
75ff156d9b
commit
ac1dd046c0
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
" Maintainer: <vacancy>
|
||||
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" 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
|
||||
"
|
||||
@ -91,6 +91,9 @@ endfunction
|
||||
|
||||
function! s:DefPython()
|
||||
py3 << PYTHONEOF
|
||||
import warnings
|
||||
warnings.simplefilter(action='ignore', category=FutureWarning)
|
||||
|
||||
import sys, tokenize, io, types
|
||||
from token import NAME, DEDENT, NEWLINE, STRING
|
||||
|
||||
|
@ -499,10 +499,10 @@ CursorMoved After the cursor was moved in Normal or Visual
|
||||
mode or to another window. Also when the text
|
||||
of the cursor line has been changed, e.g. with
|
||||
"x", "rx" or "p".
|
||||
Not triggered when there is typeahead, while
|
||||
executing a script file, or when an operator
|
||||
is pending. Always triggered when moving to
|
||||
another window.
|
||||
Not always triggered when there is typeahead,
|
||||
while executing commands in a script file, or
|
||||
when an operator is pending. Always triggered
|
||||
when moving to another window.
|
||||
For an example see |match-parens|.
|
||||
Note: Cannot be skipped with |:noautocmd|.
|
||||
Careful: This is triggered very often, don't
|
||||
|
@ -1319,14 +1319,15 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
or another valid interrupt key, confirm() returns 0.
|
||||
|
||||
An example: >
|
||||
:let choice = confirm("What do you want?", "&Apples\n&Oranges\n&Bananas", 2)
|
||||
:if choice == 0
|
||||
: echo "make up your mind!"
|
||||
:elseif choice == 3
|
||||
: echo "tasteful"
|
||||
:else
|
||||
: echo "I prefer bananas myself."
|
||||
:endif
|
||||
let choice = confirm("What do you want?",
|
||||
\ "&Apples\n&Oranges\n&Bananas", 2)
|
||||
if choice == 0
|
||||
echo "make up your mind!"
|
||||
elseif choice == 3
|
||||
echo "tasteful"
|
||||
else
|
||||
echo "I prefer bananas myself."
|
||||
endif
|
||||
< In a GUI dialog, buttons are used. The layout of the buttons
|
||||
depends on the 'v' flag in 'guioptions'. If it is included,
|
||||
the buttons are always put vertically. Otherwise, confirm()
|
||||
|
@ -780,7 +780,7 @@ If the previous expansion was split, because it got longer than 'textwidth',
|
||||
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
|
||||
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
|
||||
for those lines starting with this word.
|
||||
|
||||
|
@ -751,7 +751,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
|
||||
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:
|
||||
value effect ~
|
||||
|
@ -5,7 +5,7 @@
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-10-26
|
||||
" Last Change: 2022-03-24
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
|
||||
" specially and hence are not indented specially.
|
||||
"
|
||||
" -*- 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
|
||||
|
||||
" Provide insert mode completions for special forms and clojure.core. As
|
||||
@ -66,10 +66,10 @@ endif
|
||||
|
||||
" Filter files in the browse dialog
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
|
||||
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
|
||||
\ "Java Source Files (*.java)\t*.java\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
let b:browsefilter = "All Files\t*\n" .
|
||||
\ "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx\n" .
|
||||
\ "EDN Files\t*.edn\n" .
|
||||
\ "Java Files\t*.java\n"
|
||||
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
|
||||
endif
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Feb 13
|
||||
" Last Change: 2022 Mar 21
|
||||
|
||||
if (exists("b:did_ftplugin"))
|
||||
finish
|
||||
@ -53,7 +53,7 @@ endif
|
||||
" TODO:
|
||||
"setlocal define=^\\s*def
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal comments=b:#
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
if !exists('g:ruby_version_paths')
|
||||
@ -87,8 +87,14 @@ endfunction
|
||||
|
||||
function! s:build_path(path) abort
|
||||
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
|
||||
if &g:path !~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
|
||||
let path = substitute(&g:path,',,$',',','') . ',' . path
|
||||
if &g:path =~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
|
||||
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
|
||||
return path
|
||||
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")
|
||||
nmap <buffer><script> <SID>: :<C-U>
|
||||
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'],'','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>')
|
||||
|
||||
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', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><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', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><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', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><ctag>"<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><ctag>"<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-]> <SID>:exe v:count1."tag <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', 'g<C-]> <SID>:exe "tjump <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', 'g] <SID>:exe "tselect <SID><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', '<script><silent>', '<C-W><C-]> <SID>:exe v:count1."stag <SID><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', '<script><silent>', '<C-W>g] <SID>:exe "stselect <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>} <SID>:exe v:count1."ptag <SID><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', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W><C-F> <SID>c:sfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W>gf <SID>c:tabfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', 'gf <SID>c:find <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>f <SID>c:sfind <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W><C-F> <SID>c:sfind <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>gf <SID>c:tabfind <SID><cfile><CR>')
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
@ -5,7 +5,7 @@
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-10-26
|
||||
" Last Change: 2022-03-24
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
|
@ -4,7 +4,7 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now at bitwi.se>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Feb 03
|
||||
" Last Change: 2022 Mar 22
|
||||
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
@ -40,9 +40,11 @@ setlocal nosmartindent
|
||||
" Now, set up our indentation expression and keys that trigger it.
|
||||
setlocal indentexpr=GetRubyIndent(v:lnum)
|
||||
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
|
||||
|
||||
let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRubyIndent")
|
||||
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.
|
||||
let s:ruby_indent_keywords =
|
||||
\ '^\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\):\@!\>' .
|
||||
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
|
||||
\ '\<\%(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.
|
||||
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.
|
||||
"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:\@!\>'
|
||||
|
||||
" 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.
|
||||
let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>'
|
||||
|
||||
" Expression used for searchpair() call for finding match for 'end' keyword.
|
||||
let s:end_skip_expr = s:skip_expr .
|
||||
\ ' || (expand("<cword>") == "do"' .
|
||||
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")'
|
||||
" Expression used for searchpair() call for finding a match for an 'end' keyword.
|
||||
function! s:EndSkipExpr()
|
||||
if eval(s:skip_expr)
|
||||
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 [.
|
||||
let s:non_bracket_continuation_regex =
|
||||
@ -572,6 +593,11 @@ function! s:AfterUnbalancedBracket(pline_info) abort
|
||||
call cursor(info.plnum, closing.pos + 1)
|
||||
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)
|
||||
return indent('.') + info.sw
|
||||
else
|
||||
@ -610,7 +636,7 @@ function! s:AfterIndentKeyword(pline_info) abort
|
||||
let info = a:pline_info
|
||||
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)
|
||||
let ind = virtcol('.') - 1 + info.sw
|
||||
" 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
|
||||
" module Foo; class Bar; end
|
||||
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
|
||||
if s:Match(info.plnum_msl, s:end_end_regex)
|
||||
let ind = ind - info.sw
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.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
|
||||
|
||||
" Standard syntax initialization
|
||||
@ -24,7 +24,7 @@ let s:supported = [
|
||||
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'trixie', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
@ -35,7 +35,7 @@ let s:unsupported = [
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
|
||||
\ 'disco', 'eoan', 'groovy'
|
||||
\ 'disco', 'eoan', 'hirsute', 'groovy'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" 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
|
||||
|
||||
" Standard syntax initialization
|
||||
@ -26,7 +26,7 @@ let s:supported = [
|
||||
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'trixie', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
@ -37,7 +37,7 @@ let s:unsupported = [
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
|
||||
\ 'disco', 'eoan', 'groovy'
|
||||
\ 'disco', 'eoan', 'hirsute', 'groovy'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" 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
|
||||
endif
|
||||
|
||||
@ -19,8 +19,6 @@ endif
|
||||
|
||||
if &filetype =~ '^eruby\.'
|
||||
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'
|
||||
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\+')
|
||||
@ -54,10 +52,10 @@ if !b:eruby_nest_level
|
||||
let b:eruby_nest_level = 1
|
||||
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"
|
||||
unlet! b:current_syntax
|
||||
endif
|
||||
unlet! b:current_syntax
|
||||
syn include @rubyTop syntax/ruby.vim
|
||||
|
||||
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 erubyComment Comment
|
||||
|
||||
let b:current_syntax = matchstr(&syntax, '^.*\<eruby\>')
|
||||
let b:current_syntax = 'eruby'
|
||||
|
||||
if main_syntax == 'eruby'
|
||||
unlet main_syntax
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Jun 06
|
||||
" Last Change: 2021 Nov 03
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Previous Maintainer: Mirko Nasato
|
||||
@ -66,7 +66,7 @@ endfunction
|
||||
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
|
||||
|
||||
" 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
|
||||
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 '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
|
||||
syn match rubyLineContinuation "\\$" nextgroup=@rubyModifier skipwhite skipnl
|
||||
syn match rubyConditionalModifier "\<\%(if\|unless\)\>"
|
||||
@ -430,9 +433,10 @@ endif
|
||||
" Comments and Documentation {{{1
|
||||
syn match rubySharpBang "\%^#!.*" display
|
||||
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\%<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 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 "[]})\"':]\@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 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
|
||||
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 rubyPercentStringDelimiter rubyStringDelimiter
|
||||
hi def link rubyPercentSymbolDelimiter rubySymbolDelimiter
|
||||
hi def link rubyDoubleQuoteSymbolDelimiter rubySymbolDelimiter
|
||||
hi def link rubySingleQuoteSymbolDelimiter rubySymbolDelimiter
|
||||
hi def link rubyRegexpDelimiter rubyStringDelimiter
|
||||
hi def link rubySymbolDelimiter rubySymbol
|
||||
hi def link rubyString String
|
||||
|
@ -1,5 +1,5 @@
|
||||
" Language: tmux(1) configuration file
|
||||
" Version: 3.2a (git-44ada9cd)
|
||||
" Version: 3.3-rc (git-964deae4)
|
||||
" URL: https://github.com/ericpruitt/tmux.vim/
|
||||
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
|
||||
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
|
||||
@ -18,40 +18,49 @@ syntax iskeyword @,48-57,_,192-255,-
|
||||
syntax case match
|
||||
|
||||
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 match tmuxColour /\<colour[0-9]\+/ display
|
||||
syn match tmuxColour /\<colou\?r[0-9]\+\>/ display
|
||||
syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
|
||||
syn match tmuxNumber /\<\d\+\>/ display
|
||||
syn match tmuxFlags /\s-\a\+/ display
|
||||
syn match tmuxVariable /\w\+=/ display
|
||||
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
|
||||
syn match tmuxControl /%\(if\|elif\|else\|endif\)/
|
||||
syn match tmuxVariableExpansion /\$\({[A-Za-z_]\w*}\|[A-Za-z_]\w*\)/ display
|
||||
syn match tmuxControl /^\s*%\(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 tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,@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 tmuxUninterpolatedString start=+'+ skip=+\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
|
||||
|
||||
" TODO: Figure out how escaping works inside of #(...) and #{...} blocks.
|
||||
syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend
|
||||
syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ 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 tmuxAction Boolean
|
||||
hi def link tmuxBoolean Boolean
|
||||
hi def link tmuxCommands Keyword
|
||||
hi def link tmuxControl Keyword
|
||||
hi def link tmuxControl PreCondit
|
||||
hi def link tmuxComment Comment
|
||||
hi def link tmuxEscape Special
|
||||
hi def link tmuxEscapeUnquoted Special
|
||||
hi def link tmuxKey Special
|
||||
hi def link tmuxNumber Number
|
||||
hi def link tmuxFlags Identifier
|
||||
hi def link tmuxOptions Function
|
||||
hi def link tmuxString String
|
||||
hi def link tmuxTodo Todo
|
||||
hi def link tmuxUninterpolatedString
|
||||
\ String
|
||||
hi def link tmuxVariable Identifier
|
||||
hi def link tmuxVariableExpansion Identifier
|
||||
|
||||
@ -61,63 +70,85 @@ hi def link tmuxVariableExpansion Identifier
|
||||
if get(g:, "tmux_syntax_colors", 1)
|
||||
for s:i in range(0, 255)
|
||||
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
|
||||
endfor
|
||||
endif
|
||||
|
||||
syn keyword tmuxOptions
|
||||
\ backspace buffer-limit command-alias copy-command default-terminal editor
|
||||
\ escape-time exit-empty activity-action assume-paste-time base-index
|
||||
\ bell-action default-command default-shell default-size destroy-unattached
|
||||
\ activity-action after-bind-key after-capture-pane after-copy-mode
|
||||
\ after-display-message after-display-panes after-kill-pane
|
||||
\ 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
|
||||
\ display-panes-time display-time exit-unattached extended-keys focus-events
|
||||
\ history-file history-limit key-table lock-after-time lock-command
|
||||
\ message-command-style message-limit message-style aggressive-resize
|
||||
\ allow-rename alternate-screen automatic-rename automatic-rename-format
|
||||
\ clock-mode-colour clock-mode-style copy-mode-current-match-style
|
||||
\ copy-mode-mark-style copy-mode-match-style main-pane-height
|
||||
\ main-pane-width mode-keys mode-style monitor-activity monitor-bell
|
||||
\ monitor-silence mouse other-pane-height other-pane-width
|
||||
\ pane-active-border-style pane-base-index pane-border-format
|
||||
\ pane-border-lines pane-border-status pane-border-style pane-colours prefix
|
||||
\ prefix2 prompt-history-limit remain-on-exit renumber-windows repeat-time
|
||||
\ set-clipboard set-titles set-titles-string silence-action status status-bg
|
||||
\ status-fg status-format status-interval status-justify status-keys
|
||||
\ status-left status-left-length 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
|
||||
\ display-panes-time display-time editor escape-time exit-empty
|
||||
\ exit-unattached extended-keys fill-character focus-events history-file
|
||||
\ history-limit key-table lock-after-time lock-command main-pane-height
|
||||
\ main-pane-width message-command-style message-limit message-style
|
||||
\ mode-keys mode-style monitor-activity monitor-bell monitor-silence mouse
|
||||
\ other-pane-height other-pane-width pane-active-border-style
|
||||
\ pane-base-index pane-border-format pane-border-indicators
|
||||
\ pane-border-lines pane-border-status pane-border-style pane-colours
|
||||
\ pane-died pane-exited pane-focus-in pane-focus-out pane-mode-changed
|
||||
\ pane-set-clipboard pane-title-changed popup-border-lines
|
||||
\ popup-border-style popup-style prefix prefix2 prompt-history-limit
|
||||
\ remain-on-exit remain-on-exit-format renumber-windows repeat-time
|
||||
\ scroll-on-clear session-closed session-created session-renamed
|
||||
\ session-window-changed set-clipboard set-titles set-titles-string
|
||||
\ silence-action status status-bg status-fg status-format status-interval
|
||||
\ status-justify status-keys status-left status-left-length
|
||||
\ 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-status-current-format window-status-current-style
|
||||
\ 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
|
||||
\ 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
|
||||
\ detach detach-client display display-menu display-message display-panes
|
||||
\ display-popup displayp find-window findw if if-shell join-pane joinp
|
||||
\ kill-pane kill-server kill-session kill-window killp has has-session killw
|
||||
\ delete-buffer deleteb detach detach-client display display-menu
|
||||
\ display-message display-panes display-popup displayp find-window findw has
|
||||
\ 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
|
||||
\ 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
|
||||
\ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window
|
||||
\ clear-prompt-history clearphist movep movew new new-session new-window
|
||||
\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane
|
||||
\ pipep popup prev previous-layout previous-window prevl refresh
|
||||
\ refresh-client rename rename-session rename-window renamew resize-pane
|
||||
\ resize-window resizep resizew respawn-pane respawn-window respawnp
|
||||
\ respawnw rotate-window rotatew run run-shell save-buffer saveb
|
||||
\ select-layout select-pane select-window selectl selectp selectw send
|
||||
\ send-keys send-prefix set set-buffer set-environment set-hook set-option
|
||||
\ lock-server lock-session lockc locks ls lsb lsc lscm lsk lsp lsw menu
|
||||
\ move-pane move-window movep movew new new-session new-window neww next
|
||||
\ next-layout next-window nextl paste-buffer pasteb pipe-pane pipep popup
|
||||
\ prev previous-layout previous-window prevl refresh refresh-client rename
|
||||
\ rename-session rename-window renamew resize-pane resize-window resizep
|
||||
\ resizew respawn-pane respawn-window respawnp respawnw rotate-window
|
||||
\ rotatew run run-shell save-buffer saveb select-layout select-pane
|
||||
\ select-window selectl selectp selectw send send-keys send-prefix
|
||||
\ server-info set set-buffer set-environment set-hook set-option
|
||||
\ set-window-option setb setenv setw show show-buffer show-environment
|
||||
\ show-hooks show-messages show-options show-prompt-history
|
||||
\ show-window-options showb showenv showmsgs showphist showw source
|
||||
\ source-file split-window splitw start start-server suspend-client suspendc
|
||||
\ swap-pane swap-window swapp swapw switch-client switchc unbind unbind-key
|
||||
\ unlink-window unlinkw wait wait-for
|
||||
\ source-file split-pane split-window splitp splitw start start-server
|
||||
\ suspend-client suspendc swap-pane swap-window swapp swapw switch-client
|
||||
\ switchc unbind unbind-key unlink-window unlinkw wait wait-for
|
||||
|
||||
let &cpo = s:original_cpo
|
||||
unlet! s:original_cpo s:bg s:i
|
||||
|
Loading…
Reference in New Issue
Block a user