mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:47e13953ffdb
Update runtime files
47e13953ff
Ignore *.rej files, generated by vim-patch.sh.
Source of mistakes for 1st-time contributors.
This commit is contained in:
@@ -442,6 +442,9 @@ This edits the same file again with 'fileformat' set to "unix". >
|
||||
:w ++enc=latin1 newfile
|
||||
This writes the current buffer to "newfile" in latin1 format.
|
||||
|
||||
The message given when writing a file will show "[converted]" when
|
||||
'fileencoding' or the value specified with ++enc differs from 'encoding'.
|
||||
|
||||
There may be several ++opt arguments, separated by white space. They must all
|
||||
appear before any |+cmd| argument.
|
||||
|
||||
@@ -1040,9 +1043,9 @@ The names can be in upper- or lowercase.
|
||||
|
||||
*:q* *:quit*
|
||||
:q[uit] Quit the current window. Quit Vim if this is the last
|
||||
window. This fails when changes have been made and
|
||||
Vim refuses to |abandon| the current buffer, and when
|
||||
the last file in the argument list has not been
|
||||
|edit-window|. This fails when changes have been made
|
||||
and Vim refuses to |abandon| the current buffer, and
|
||||
when the last file in the argument list has not been
|
||||
edited.
|
||||
If there are other tab pages and quitting the last
|
||||
window in the current tab page the current tab page is
|
||||
@@ -1067,18 +1070,22 @@ The names can be in upper- or lowercase.
|
||||
code. See |:cq|.
|
||||
|
||||
*:wq*
|
||||
:wq [++opt] Write the current file and quit. Writing fails when
|
||||
the file is read-only or the buffer does not have a
|
||||
name. Quitting fails when the last file in the
|
||||
argument list has not been edited.
|
||||
:wq [++opt] Write the current file and close the window. If this
|
||||
was the last |edit-window| Vim quits.
|
||||
Writing fails when the file is read-only or the buffer
|
||||
does not have a name. Quitting fails when the last
|
||||
file in the argument list has not been edited.
|
||||
|
||||
:wq! [++opt] Write the current file and quit. Writing fails when
|
||||
the current buffer does not have a name.
|
||||
:wq! [++opt] Write the current file and close the window. If this
|
||||
was the last |edit-window| Vim quits. Writing fails
|
||||
when the current buffer does not have a name.
|
||||
|
||||
:wq [++opt] {file} Write to {file} and quit. Quitting fails when the
|
||||
:wq [++opt] {file} Write to {file} and close the window. If this was the
|
||||
last |edit-window| Vim quits. Quitting fails when the
|
||||
last file in the argument list has not been edited.
|
||||
|
||||
:wq! [++opt] {file} Write to {file} and quit.
|
||||
:wq! [++opt] {file} Write to {file} and close the current window. Quit
|
||||
Vim if this was the last |edit-window|.
|
||||
|
||||
:[range]wq[!] [++opt] [file]
|
||||
Same as above, but only write the lines in [range].
|
||||
@@ -1095,10 +1102,10 @@ The names can be in upper- or lowercase.
|
||||
Same as :xit.
|
||||
|
||||
*ZZ*
|
||||
ZZ Write current file, if modified, and quit (same as
|
||||
":x"). (Note: If there are several windows for the
|
||||
current file, the file is written if it was modified
|
||||
and the window is closed).
|
||||
ZZ Write current file, if modified, and close the current
|
||||
window (same as ":x").
|
||||
If there are several windows for the current file,
|
||||
only the current window is closed.
|
||||
|
||||
*ZQ*
|
||||
ZQ Quit without checking for changes (same as ":q!").
|
||||
|
||||
@@ -353,8 +353,8 @@ tag char note action in Normal mode ~
|
||||
register x]
|
||||
|Y| ["x]Y yank N lines [into register x]; synonym for
|
||||
"yy"
|
||||
|ZZ| ZZ store current file if modified, and exit
|
||||
|ZQ| ZQ exit current file always
|
||||
|ZZ| ZZ write if buffer changed and close window
|
||||
|ZQ| ZQ close window without writing
|
||||
|[| [{char} square bracket command (see |[| below)
|
||||
\ not used
|
||||
|]| ]{char} square bracket command (see |]| below)
|
||||
@@ -1676,7 +1676,7 @@ tag command action ~
|
||||
|:wqall| :wqa[ll] write all changed buffers and quit Vim
|
||||
|:wshada| :wsh[ada] write to ShaDa file
|
||||
|:wundo| :wu[ndo] write undo information to a file
|
||||
|:xit| :x[it] write if buffer changed and quit window or Vim
|
||||
|:xit| :x[it] write if buffer changed and close window
|
||||
|:xall| :xa[ll] same as ":wqall"
|
||||
|:xmapclear| :xmapc[lear] remove all mappings for Visual mode
|
||||
|:xmap| :xm[ap] like ":map" but for Visual mode
|
||||
|
||||
@@ -106,8 +106,9 @@ If you want to make sure that your changes are in the swap file use this
|
||||
command:
|
||||
|
||||
*:pre* *:preserve* *E313* *E314*
|
||||
:pre[serve] Write all text for all buffers into swap files. The
|
||||
original file is no longer needed for recovery.
|
||||
:pre[serve] Write all text for the current buffer into its swap
|
||||
file. The original file is no longer needed for
|
||||
recovery. This sets a flag in the current buffer.
|
||||
|
||||
A Vim swap file can be recognized by the first six characters: "b0VIM ".
|
||||
After that comes the version number, e.g., "3.0".
|
||||
|
||||
@@ -269,8 +269,9 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
|
||||
Without {count}: Quit the current window. If {count} is
|
||||
given quit the {count} window
|
||||
|
||||
When quitting the last window (not counting a help window),
|
||||
exit Vim.
|
||||
*edit-window*
|
||||
When quitting the last edit window (not counting help or
|
||||
preview windows), exit Vim.
|
||||
|
||||
When 'hidden' is set, and there is only one window for the
|
||||
current buffer, it becomes hidden. When 'hidden' is not set,
|
||||
@@ -287,8 +288,9 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
|
||||
:+quit " quit the next window
|
||||
:+2quit " quit the second next window
|
||||
<
|
||||
When closing a help window, Vim will try to restore the
|
||||
previous window layout |:helpclose|.
|
||||
When closing a help window, and this is not the only window,
|
||||
Vim will try to restore the previous window layout, see
|
||||
|:helpclose|.
|
||||
|
||||
:q[uit]!
|
||||
:{count}q[uit]!
|
||||
@@ -309,9 +311,9 @@ CTRL-W c *CTRL-W_c* *:clo* *:close*
|
||||
[!] is used, the buffer becomes hidden (unless there is another
|
||||
window editing it).
|
||||
|
||||
When there is only one window in the current tab page and
|
||||
there is another tab page, this closes the current tab page.
|
||||
|tab-page|.
|
||||
When there is only one |edit-window| in the current tab page
|
||||
and there is another tab page, this closes the current tab
|
||||
page. |tab-page|.
|
||||
|
||||
This command fails when: *E444*
|
||||
- There is only one window on the screen.
|
||||
|
||||
19
runtime/ftplugin/masm.vim
Normal file
19
runtime/ftplugin/masm.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Microsoft Macro Assembler (80x86)
|
||||
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
|
||||
" Last Change: 2020-05-09 23:02:05 +0800
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl iskeyword<"
|
||||
|
||||
setlocal iskeyword=@,48-57,_,36,60,62,63,@-@
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -28,6 +28,11 @@ set cpo&vim
|
||||
|
||||
let s:maxoff = 50 " maximum number of lines to look backwards for ()
|
||||
|
||||
" See if the specified line is already user-dedented from the expected value.
|
||||
function s:Dedented(lnum, expected)
|
||||
return indent(a:lnum) <= a:expected - shiftwidth()
|
||||
endfunction
|
||||
|
||||
function GetPythonIndent(lnum)
|
||||
|
||||
" If this line is explicitly joined: If the previous line was also joined,
|
||||
@@ -158,12 +163,12 @@ function GetPythonIndent(lnum)
|
||||
" If the previous line was a stop-execution statement...
|
||||
if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
|
||||
" See if the user has already dedented
|
||||
if indent(a:lnum) > indent(plnum) - shiftwidth()
|
||||
" If not, recommend one dedent
|
||||
return indent(plnum) - shiftwidth()
|
||||
if s:Dedented(a:lnum, indent(plnum))
|
||||
" If so, trust the user
|
||||
return -1
|
||||
endif
|
||||
" Otherwise, trust the user
|
||||
return -1
|
||||
" If not, recommend one dedent
|
||||
return indent(plnum) - shiftwidth()
|
||||
endif
|
||||
|
||||
" If the current line begins with a keyword that lines up with "try"
|
||||
@@ -191,7 +196,7 @@ function GetPythonIndent(lnum)
|
||||
endif
|
||||
|
||||
" Or the user has already dedented
|
||||
if indent(a:lnum) <= plindent - shiftwidth()
|
||||
if s:Dedented(a:lnum, plindent)
|
||||
return -1
|
||||
endif
|
||||
|
||||
@@ -203,7 +208,12 @@ function GetPythonIndent(lnum)
|
||||
" + c)
|
||||
" here
|
||||
if parlnum > 0
|
||||
return plindent
|
||||
" ...unless the user has already dedented
|
||||
if s:Dedented(a:lnum, plindent)
|
||||
return -1
|
||||
else
|
||||
return plindent
|
||||
endif
|
||||
endif
|
||||
|
||||
return -1
|
||||
|
||||
@@ -20,7 +20,7 @@ augroup gzip
|
||||
"
|
||||
" Set binary mode before reading the file.
|
||||
" Use "gzip -d", gunzip isn't always available.
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br setlocal bin
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br,*.lzo setlocal bin
|
||||
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
|
||||
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
|
||||
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
|
||||
@@ -29,6 +29,7 @@ augroup gzip
|
||||
autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
|
||||
autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm")
|
||||
autocmd BufReadPost,FileReadPost *.br call gzip#read("brotli -d --rm")
|
||||
autocmd BufReadPost,FileReadPost *.lzo call gzip#read("lzop -d -U")
|
||||
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
|
||||
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
|
||||
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
|
||||
@@ -37,6 +38,7 @@ augroup gzip
|
||||
autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip")
|
||||
autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm")
|
||||
autocmd BufWritePost,FileWritePost *.br call gzip#write("brotli --rm")
|
||||
autocmd BufWritePost,FileWritePost *.lzo call gzip#write("lzop -U")
|
||||
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
|
||||
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
|
||||
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
|
||||
@@ -45,6 +47,7 @@ augroup gzip
|
||||
autocmd FileAppendPre *.lz call gzip#appre("lzip -d")
|
||||
autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm")
|
||||
autocmd FileAppendPre *.br call gzip#appre("brotli -d --rm")
|
||||
autocmd FileAppendPre *.lzo call gzip#appre("lzop -d -U")
|
||||
autocmd FileAppendPost *.gz call gzip#write("gzip")
|
||||
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
|
||||
autocmd FileAppendPost *.Z call gzip#write("compress -f")
|
||||
@@ -53,4 +56,5 @@ augroup gzip
|
||||
autocmd FileAppendPost *.lz call gzip#write("lzip")
|
||||
autocmd FileAppendPost *.zst call gzip#write("zstd --rm")
|
||||
autocmd FileAppendPost *.br call gzip#write("brotli --rm")
|
||||
autocmd FileAppendPost *.lzo call gzip#write("lzop -U")
|
||||
augroup END
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Josh Wainwright <wainwright DOT ja AT gmail DOT com>
|
||||
" Last Maintainer: Andrew Rasmussen andyras@users.sourceforge.net
|
||||
" Original Maintainer: John Hoelzel johnh51@users.sourceforge.net
|
||||
" Last Change: 2015-08-25
|
||||
" Last Change: 2020 May 12
|
||||
" Filenames: *.gnu *.plt *.gpi *.gih *.gp *.gnuplot scripts: #!*gnuplot
|
||||
" URL: http://www.vim.org/scripts/script.php?script_id=4873
|
||||
" Original URL: http://johnh51.get.to/vim/syntax/gnuplot.vim
|
||||
@@ -479,7 +479,7 @@ syn keyword gnuplotKeyword terminal palette rgb rbg grb gbr brg bgr
|
||||
|
||||
" ---- Macros ---- "
|
||||
|
||||
syn region gnuplotMacro start="@" end=" "
|
||||
syn match gnuplotMacro "@[a-zA-Z0-9_]*"
|
||||
|
||||
" ---- Todos ---- "
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Microsoft Macro Assembler (80x86)
|
||||
" Orig Author: Rob Brady <robb@datatone.com>
|
||||
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
|
||||
" Last Change: 2020-05-07 17:04:10 +0800
|
||||
" Last Change: 2020-05-09 22:55:38 +0800
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -12,7 +12,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,36,60,62,63,@-@
|
||||
syn iskeyword @,48-57,_,36,60,62,63,@-@
|
||||
|
||||
syn case ignore
|
||||
|
||||
|
||||
28
runtime/syntax/pamenv.vim
Normal file
28
runtime/syntax/pamenv.vim
Normal file
@@ -0,0 +1,28 @@
|
||||
" Vim syntax file
|
||||
" Language: pam_env.conf(5) configuration file
|
||||
" Latest Revision: 2020-05-10
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn keyword pamenvTodo contained TODO FIXME XXX NOTE
|
||||
syn region pamenvComment start='^#' end='$' display oneline contains=pamenvTodo,@Spells
|
||||
|
||||
syn match pamenvVars '^[A-Z_][A-Z_0-9]*' nextgroup=pamenvKeywords skipwhite
|
||||
|
||||
syn keyword pamenvKeywords contained DEFAULT OVERRIDE nextgroup=pamenvVarEq
|
||||
|
||||
syn match pamenvVarEq contained '=' nextgroup=pamenvValue,pamenvValueWithQuote
|
||||
|
||||
syn match pamenvValue contained '[^ \t]*' skipwhite nextgroup=pamenvKeywords
|
||||
syn region pamenvValueWithQuote contained start='"' end='"' skipwhite nextgroup=pamenvKeywords
|
||||
|
||||
hi def link pamenvTodo Todo
|
||||
hi def link pamenvComment Comment
|
||||
hi def link pamenvKeywords Keyword
|
||||
hi def link pamenvVars Identifier
|
||||
hi def link pamenvValue String
|
||||
hi def link pamenvValueWithQuote String
|
||||
|
||||
let b:current_syntax = "pamenv"
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Oct 16, 2019
|
||||
" Version: 189
|
||||
" Last Change: Apr 14, 2020
|
||||
" Version: 190
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
|
||||
@@ -357,19 +357,18 @@ elseif !exists("g:sh_no_error")
|
||||
syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
|
||||
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList
|
||||
syn match shSpecialDQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshDblQuote,@shNoZSList
|
||||
syn match shSpecialStart "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecialNxt contained "\\[\\"'`$()#]"
|
||||
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart
|
||||
syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
"syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart
|
||||
"syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
|
||||
|
||||
" Comments: {{{1
|
||||
"==========
|
||||
@@ -454,13 +453,13 @@ if !exists("g:sh_no_error")
|
||||
syn match shDerefWordError "[^}$[~]" contained
|
||||
endif
|
||||
syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList
|
||||
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
|
||||
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray nextgroup=shSpecialStart
|
||||
syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList
|
||||
syn match shDerefSimple "\$\$" nextgroup=@shNoZSList
|
||||
syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList
|
||||
syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList nextgroup=shSpecialStart
|
||||
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
|
||||
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS
|
||||
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS
|
||||
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart
|
||||
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS,shSpecialStart
|
||||
endif
|
||||
|
||||
" ksh: ${!var[*]} array index list syntax: {{{1
|
||||
|
||||
Reference in New Issue
Block a user