aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/compiler/eslint.vim16
-rw-r--r--runtime/compiler/standard.vim16
-rw-r--r--runtime/doc/eval.txt3
-rw-r--r--runtime/doc/index.txt8
-rw-r--r--runtime/doc/makehtml.awk2
-rw-r--r--runtime/doc/repeat.txt7
-rw-r--r--runtime/ftplugin/vim.vim18
-rw-r--r--runtime/indent/sshconfig.vim34
-rw-r--r--runtime/indent/testdir/sshconfig.in53
-rw-r--r--runtime/indent/testdir/sshconfig.ok53
-rw-r--r--runtime/macros/less.vim6
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim13
-rw-r--r--runtime/syntax/groovy.vim10
-rw-r--r--runtime/syntax/spec.vim5
-rw-r--r--runtime/syntax/vim.vim7
15 files changed, 220 insertions, 31 deletions
diff --git a/runtime/compiler/eslint.vim b/runtime/compiler/eslint.vim
new file mode 100644
index 0000000000..1e7af2b182
--- /dev/null
+++ b/runtime/compiler/eslint.vim
@@ -0,0 +1,16 @@
+" Vim compiler file
+" Compiler: ESLint for JavaScript
+" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
+" Last Change: 2020 May 17
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "eslint"
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+CompilerSet makeprg=eslint\ --format\ compact
+CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%#
diff --git a/runtime/compiler/standard.vim b/runtime/compiler/standard.vim
new file mode 100644
index 0000000000..b6bcf1f6b0
--- /dev/null
+++ b/runtime/compiler/standard.vim
@@ -0,0 +1,16 @@
+" Vim compiler file
+" Compiler: Standard for JavaScript
+" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
+" Last Change: 2020 May 17
+
+if exists("current_compiler")
+ finish
+endif
+let current_compiler = "standard"
+
+if exists(":CompilerSet") != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+CompilerSet makeprg=standard
+CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%#
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 5470aab2b7..edc37a66cf 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -538,6 +538,8 @@ adict.
Weeding out entries from a Dictionary can be done with |filter()|: >
:call filter(dict, 'v:val =~ "x"')
This removes all entries from "dict" with a value not matching 'x'.
+This can also be used to remove all entries: >
+ call filter(dict, 0)
Dictionary function ~
@@ -2521,6 +2523,7 @@ win_splitmove({nr}, {target} [, {options}])
Number move window {nr} to split of {target}
winbufnr({nr}) Number buffer number of window {nr}
wincol() Number window column of the cursor
+windowsversion() String MS-Windows OS version
winheight({nr}) Number height of window {nr}
winlayout([{tabnr}]) List layout of windows in tab {tabnr}
winline() Number window line of the cursor
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 47a39926d4..503e3a87bf 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -819,7 +819,7 @@ tag char note action in Normal mode ~
|zD| zD delete folds recursively
|zE| zE eliminate all folds
|zF| zF create a fold for N lines
-|zG| zG mark word as good spelled word
+|zG| zG temporarily mark word as good spelled word
|zH| zH when 'wrap' off scroll half a screenwidth
to the right
|zL| zL when 'wrap' off scroll half a screenwidth
@@ -828,7 +828,7 @@ tag char note action in Normal mode ~
|zN| zN set 'foldenable'
|zO| zO open folds recursively
|zR| zR set 'foldlevel' to the deepest fold
-|zW| zW mark word as wrong (bad) spelled word
+|zW| zW temporarily mark word as bad spelled word
|zX| zX re-apply 'foldlevel'
|z^| z^ cursor on line N (default line above
window), otherwise like "z-"
@@ -840,7 +840,7 @@ tag char note action in Normal mode ~
position the cursor at the end (right side)
of the screen
|zf| zf{motion} create a fold for Nmove text
-|zg| zg mark word as good spelled word
+|zg| zg permanently mark word as good spelled word
|zh| zh when 'wrap' off scroll screen N characters
to the right
|zi| zi toggle 'foldenable'
@@ -861,7 +861,7 @@ tag char note action in Normal mode ~
|zuW| zuW undo |zW|
|zuG| zuG undo |zG|
|zv| zv open enough folds to view the cursor line
-|zw| zw mark word as wrong (bad) spelled word
+|zw| zw permanently mark word as bad spelled word
|zx| zx re-apply 'foldlevel' and do "zv"
|zz| zz redraw, cursor line at center of window
|z<Left>| z<Left> same as "zh"
diff --git a/runtime/doc/makehtml.awk b/runtime/doc/makehtml.awk
index 6e93c01c54..50f5611fa7 100644
--- a/runtime/doc/makehtml.awk
+++ b/runtime/doc/makehtml.awk
@@ -65,7 +65,7 @@ substr($0,length($0),1) == "~" { print "<B><FONT COLOR=\"PURPLE\">" substr($0,1,
#
#ad hoc code
#
-/^"\|\& / {gsub(/\|/,"\\&#124;"); }
+/^"\|& / {gsub(/\|/,"\\&#124;"); }
/ = b / {gsub(/ b /," \\&#98; "); }
#
# one letter tag
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt
index d38691a59e..31bd93ca24 100644
--- a/runtime/doc/repeat.txt
+++ b/runtime/doc/repeat.txt
@@ -117,6 +117,11 @@ q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"}
recorded macro and the yank will overwrite the
recorded macro.
+ Note: The recording happens while you type, replaying
+ the register happens as if the keys come from a
+ mapping. This matters, for example, for undo, which
+ only syncs when commands were typed.
+
q Stops recording.
Implementation note: The 'q' that stops recording is
not stored in the register, unless it was the result
@@ -129,7 +134,7 @@ q Stops recording.
used.
The register is executed like a mapping, that means
that the difference between 'wildchar' and 'wildcharm'
- applies.
+ applies, and undo might not be synced in the same way.
For "@=" you are prompted to enter an expression. The
result of the expression is then executed.
See also |@:|.
diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim
index 34f5eb6db1..c0d0fc00cd 100644
--- a/runtime/ftplugin/vim.vim
+++ b/runtime/ftplugin/vim.vim
@@ -12,7 +12,7 @@ endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
-set cpo-=C
+set cpo&vim
if !exists('*VimFtpluginUndo')
func VimFtpluginUndo()
@@ -66,14 +66,14 @@ if !exists("no_plugin_maps") && !exists("no_vim_maps")
let b:did_add_maps = 1
" Move around functions.
- nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR>
- vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR>
- nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR>
- vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR>
- nnoremap <silent><buffer> [] m':call search('^\s*endf\%[unction]\>', "bW")<CR>
- vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf\%[unction]\>', "bW")<CR>
- nnoremap <silent><buffer> ][ m':call search('^\s*endf\%[unction]\>', "W")<CR>
- vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf\%[unction]\>', "W")<CR>
+ nnoremap <silent><buffer> [[ m':call search('^\s*\(fu\%[nction]\\|def\)\>', "bW")<CR>
+ vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|def\)\>', "bW")<CR>
+ nnoremap <silent><buffer> ]] m':call search('^\s*\(fu\%[nction]\\|def\)\>', "W")<CR>
+ vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|def\)\>', "W")<CR>
+ nnoremap <silent><buffer> [] m':call search('^\s*end\(f\%[unction]\\|def\)\>', "bW")<CR>
+ vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|def\)\>', "bW")<CR>
+ nnoremap <silent><buffer> ][ m':call search('^\s*end\(f\%[unction]\\|def\)\>', "W")<CR>
+ vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|def\)\>', "W")<CR>
" Move around comments
nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
diff --git a/runtime/indent/sshconfig.vim b/runtime/indent/sshconfig.vim
new file mode 100644
index 0000000000..b456a9e3aa
--- /dev/null
+++ b/runtime/indent/sshconfig.vim
@@ -0,0 +1,34 @@
+" Vim indent file
+" Language: ssh config file
+" Maintainer: JasonKim <git@jasonk.me>
+" Last Change: 2020 May 16
+
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal autoindent
+setlocal indentexpr=GetSshconfigIndent(v:lnum)
+setlocal indentkeys=o,O,*<Return>,0=~host\ ,0=~match\ ,0#,!^F
+
+let b:undo_indent = "setlocal autoindent< indentexpr< indentkeys<"
+
+if exists("*GetSshconfigIndent")
+ finish
+endif
+
+function GetSshconfigIndent(lnum)
+ let sw = shiftwidth()
+ let prev_lnum = prevnonblank(a:lnum - 1)
+ let curr_lnum = a:lnum
+ let prev_line = getline(prev_lnum)
+ let curr_line = getline(curr_lnum)
+ if curr_line =~? '^\s*\(host\|match\)\s'
+ return 0
+ elseif prev_line =~? '^\s*\(host\|match\)\s'
+ return sw
+ else
+ return indent(prev_lnum)
+ endif
+endfunction
diff --git a/runtime/indent/testdir/sshconfig.in b/runtime/indent/testdir/sshconfig.in
new file mode 100644
index 0000000000..87b998e465
--- /dev/null
+++ b/runtime/indent/testdir/sshconfig.in
@@ -0,0 +1,53 @@
+# vim: set filetype=sshconfig shiftwidth=4 expandtab :
+
+# START_INDENT
+Host myhost
+User myuser
+PasswordAuthentication no
+# END_INDENT
+
+# START_INDENT
+Host aaa
+User bbb
+Host ccc
+Host ddd
+# END_INDENT
+
+# START_INDENT
+host aaa
+HOST bbb
+hoSt ccc
+match ddd
+MATCH eee
+MatCH fff
+# END_INDENT
+
+# START_INDENT
+Host aaa
+User host
+PasswordAuthentication no
+Host *
+User user
+PasswordAuthentication no
+Host match
+User bbb
+# END_INDENT
+
+# START_INDENT
+Host tab
+User myuser
+# END_INDENT
+
+# START_INDENT
+Host mix
+User myuser
+# END_INDENT
+
+# START_INDENT
+Host aaa
+User bbb
+Match ccc
+User ddd
+HostKeyAlgorithms ssh-ed25519
+Match eee
+# END_INDENT
diff --git a/runtime/indent/testdir/sshconfig.ok b/runtime/indent/testdir/sshconfig.ok
new file mode 100644
index 0000000000..b24b7cf4e1
--- /dev/null
+++ b/runtime/indent/testdir/sshconfig.ok
@@ -0,0 +1,53 @@
+# vim: set filetype=sshconfig shiftwidth=4 expandtab :
+
+# START_INDENT
+Host myhost
+ User myuser
+ PasswordAuthentication no
+# END_INDENT
+
+# START_INDENT
+Host aaa
+ User bbb
+Host ccc
+Host ddd
+# END_INDENT
+
+# START_INDENT
+host aaa
+HOST bbb
+hoSt ccc
+match ddd
+MATCH eee
+MatCH fff
+# END_INDENT
+
+# START_INDENT
+Host aaa
+ User host
+ PasswordAuthentication no
+Host *
+ User user
+ PasswordAuthentication no
+Host match
+ User bbb
+# END_INDENT
+
+# START_INDENT
+Host tab
+ User myuser
+# END_INDENT
+
+# START_INDENT
+Host mix
+ User myuser
+# END_INDENT
+
+# START_INDENT
+Host aaa
+ User bbb
+Match ccc
+ User ddd
+ HostKeyAlgorithms ssh-ed25519
+Match eee
+# END_INDENT
diff --git a/runtime/macros/less.vim b/runtime/macros/less.vim
index aad122d70a..4883dae41a 100644
--- a/runtime/macros/less.vim
+++ b/runtime/macros/less.vim
@@ -1,6 +1,6 @@
" Vim script to work like "less"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2017 Mar 31
+" Last Change: 2020 May 18
" Avoid loading this file twice, allow the user to define his own script.
if exists("loaded_less")
@@ -66,8 +66,8 @@ endif
" When reading from stdin don't consider the file modified.
au VimEnter * set nomod
-" Can't modify the text
-set noma
+" Can't modify the text or write the file.
+set nomodifiable readonly
" Give help
noremap h :call <SID>Help()<CR>
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 99819c93ea..41d59c39d9 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -2,7 +2,7 @@
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
-" Last Change: 2020 Feb 19
+" Last Change: 2020 May 22
"
" WORK IN PROGRESS - Only the basics work
" Note: On MS-Windows you need a recent version of gdb. The one included with
@@ -758,8 +758,10 @@ func s:InstallCommands()
command Asm call s:GotoAsmwinOrCreateIt()
command Winbar call s:InstallWinbar()
- " TODO: can the K mapping be restored?
- nnoremap K :Evaluate<CR>
+ if !exists('g:termdebug_map_K') || g:termdebug_map_K
+ let s:k_map_saved = maparg('K', 'n', 0, 1)
+ nnoremap K :Evaluate<CR>
+ endif
let &cpo = save_cpo
endfunc
@@ -797,7 +799,10 @@ func s:DeleteCommands()
delcommand Asm
delcommand Winbar
- nunmap K
+ if exists('s:k_map_saved')
+ call mapset('n', 0, s:k_map_saved)
+ unlet s:k_map_saved
+ endif
exe 'sign unplace ' . s:pc_id
for [id, entries] in items(s:breakpoints)
diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim
index 2245b79d04..9bc1bd6d8d 100644
--- a/runtime/syntax/groovy.vim
+++ b/runtime/syntax/groovy.vim
@@ -1,10 +1,10 @@
" Vim syntax file
" Language: Groovy
-" Original Author: Alessio Pace <billy.corgan@tiscali.it>
-" Maintainer: Tobias Rapp <yahuxo@gmx.de>
-" Version: 0.1.16
+" Original Author: Alessio Pace <billy.corgan AT tiscali.it>
+" Maintainer: Tobias Rapp <yahuxo+vim AT mailbox.org>
+" Version: 0.1.17
" URL: http://www.vim.org/scripts/script.php?script_id=945
-" Last Change: 2016 May 23
+" Last Change: 2020 May 26
" THE ORIGINAL AUTHOR'S NOTES:
"
@@ -253,7 +253,7 @@ if exists("groovy_regex_strings")
endif
" syn region groovyELExpr start=+${+ end=+}+ keepend contained
syn match groovyELExpr /\${.\{-}}/ contained
-syn match groovyELExpr /\$[a-zA-Z_][a-zA-Z0-9_.]*/ contained
+syn match groovyELExpr /\$[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE_][a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]*/ contained
hi def link groovyELExpr Identifier
" TODO: better matching. I am waiting to understand how it really works in groovy
diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim
index 4df549e677..d7d5877943 100644
--- a/runtime/syntax/spec.vim
+++ b/runtime/syntax/spec.vim
@@ -3,7 +3,7 @@
" Language: SPEC: Build/install scripts for Linux RPM packages
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
" Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014)
-" Last Change: 2020 Feb 07
+" Last Change: 2020 May 25
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -128,6 +128,8 @@ syn case match
"sh-like comment stile, only valid in script part
syn match shComment contained '#.*$'
+syn region dnlComment matchgroup=specComment start=+%dnl+ end=+$+
+
syn region shQuote1 contained matchgroup=shQuoteDelim start=+'+ skip=+\\'+ end=+'+ contains=specMacroIdentifier
syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier
@@ -173,6 +175,7 @@ endif
"sh colors
hi def link shComment Comment
+hi def link dnlComment Comment
hi def link shIf Statement
hi def link shOperator Special
hi def link shQuote1 String
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index dcca7297ec..dfcd931abd 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -201,7 +201,7 @@ syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperPa
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
-syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
+syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=vimoperStar,@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
syn match vimOperError ")"
@@ -272,7 +272,7 @@ syn match vimComment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCom
syn match vimComment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
" Vim9 comment inside expression
-syn match vim9Comment +\s\zs#[^{].*$+ contains=@vimCommentGroup,vimCommentString
+syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
" Environment Variables: {{{2
" =====================
@@ -293,7 +293,7 @@ syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"
syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+
syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup
syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup
-syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup
+"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup
syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
@@ -911,6 +911,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimNumber Number
hi def link vimOperError Error
hi def link vimOper Operator
+ hi def link vimOperStar vimOper
hi def link vimOption PreProc
hi def link vimParenSep Delimiter
hi def link vimPatSepErr vimError