vim-patch:68e6560b84f1

Update runtime files.
68e6560b84
This commit is contained in:
Justin M. Keyes 2019-08-02 06:29:23 +02:00
parent bf6919f26b
commit 4ea8323667
12 changed files with 172 additions and 82 deletions

View File

@ -1010,8 +1010,9 @@ There must not be white space before or after the dot.
Examples: >
:let dict = {"one": 1, 2: "two"}
:echo dict.one
:echo dict .2
:echo dict.one " shows "1"
:echo dict.2 " shows "two"
:echo dict .2 " error because of space before the dot
Note that the dot is also used for String concatenation. To avoid confusion
always put spaces around the dot for String concatenation.
@ -9327,7 +9328,7 @@ This function can then be called with: >
*:cal* *:call* *E107* *E117*
:[range]cal[l] {name}([arguments])
Call a function. The name of the function and its arguments
are as specified with |:function|. Up to 20 arguments can be
are as specified with `:function`. Up to 20 arguments can be
used. The returned value is discarded.
Without a range and for functions that accept a range, the
function is called once. When a range is given the cursor is
@ -9381,9 +9382,9 @@ Using an autocommand ~
This is introduced in the user manual, section |41.14|.
The autocommand is useful if you have a plugin that is a long Vim script file.
You can define the autocommand and quickly quit the script with |:finish|.
You can define the autocommand and quickly quit the script with `:finish`.
That makes Vim startup faster. The autocommand should then load the same file
again, setting a variable to skip the |:finish| command.
again, setting a variable to skip the `:finish` command.
Use the FuncUndefined autocommand event with a pattern that matches the
function(s) to be defined. Example: >

View File

@ -240,6 +240,9 @@ format of the file. The file will not be marked unmodified. If you care
about the loss of information, set the 'fileencoding' option to another value
that can handle the characters in the buffer and write again. If you don't
care, you can abandon the buffer or reset the 'modified' option.
If there is a backup file, when 'writebackup' or 'backup' is set, it will not
be deleted, so you can move it back into place if you want to discard the
changes.
*E302* >
Could not rename swap file

View File

@ -46,6 +46,7 @@ or change text. The following operators are available:
|!| ! filter through an external program
|=| = filter through 'equalprg' or C-indenting if empty
|gq| gq text formatting
|gw| gw text formatting with no cursor movement
|g?| g? ROT13 encoding
|>| > shift right
|<| < shift left

View File

@ -771,6 +771,7 @@ Short explanation of each option: *option-list*
'menuitems' 'mis' maximum number of items in a menu
'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree
'modeline' 'ml' recognize modelines at start or end of file
'modelineexpr' 'mle' allow setting expression options from a modeline
'modelines' 'mls' number of lines checked for modelines
'modifiable' 'ma' changes to the text are not possible
'modified' 'mod' buffer has been modified

View File

@ -165,7 +165,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
:so[urce] {file} Read Ex commands from {file}. These are commands that
start with a ":".
Triggers the |SourcePre| autocommand.
*:source!*
:so[urce]! {file} Read Vim commands from {file}. These are commands
that are executed from Normal mode, like you type
them.
@ -173,6 +173,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|:bufdo|, in a loop or when another command follows
the display won't be updated while executing the
commands.
Cannot be used in the |sandbox|.
*:ru* *:runtime*
:ru[ntime][!] [where] {file} ..

View File

@ -80,9 +80,6 @@ CTRL-U Scroll window Upwards in the buffer. The number of
may be a difference). When the cursor is on the first
line of the buffer nothing happens and a beep is
produced. See also 'startofline' option.
{difference from vi: Vim scrolls 'scroll' screen
lines, instead of file lines; makes a difference when
lines wrap}
<S-Up> or *<S-Up>* *<kPageUp>*
<PageUp> or *<PageUp>* *CTRL-B*

View File

@ -99,12 +99,13 @@ Read this from start to end to learn the essential commands.
|usr_05.txt| Set your settings
|05.1| The vimrc file
|05.2| The example vimrc file explained
|05.3| Simple mappings
|05.4| Adding a package
|05.5| Adding a plugin
|05.6| Adding a help file
|05.7| The option window
|05.8| Often used options
|05.3| The defaults.vim file explained
|05.4| Simple mappings
|05.5| Adding a package
|05.6| Adding a plugin
|05.7| Adding a help file
|05.8| The option window
|05.9| Often used options
|usr_06.txt| Using syntax highlighting
|06.1| Switching it on

View File

@ -1154,7 +1154,6 @@ list of buffers. |unlisted-buffer|
the way when you're browsing code/text buffers. The next three
commands also work like this.
*:sbn* *:sbnext*
:[N]sbn[ext] [+cmd] [N]
Split window and go to [N]th next buffer in buffer list.

View File

@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Jan 27
" Last Change: 2019 May 25
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@ -932,6 +932,8 @@ call <SID>Header("reading and writing files")
call append("$", "modeline\tenable using settings from modelines when reading a file")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("ml")
call append("$", "modelineexpr\tallow setting expression options from a modeline")
call <SID>BinOptionG("mle", &mle)
call append("$", "modelines\tnumber of lines to check for modelines")
call append("$", " \tset mls=" . &mls)
call append("$", "binary\tbinary file editing")

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
" Last Change: 2017 Oct 19
" Last Change: 2019 May 12
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@ -11,7 +11,7 @@ endif
let s:cpo_save = &cpo
set cpo&vim
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*[ \t]\+\*"me=e-1
syn match helpSectionDelim "^===.*===$"
syn match helpSectionDelim "^---.*--$"
if has("conceal")

View File

@ -1,5 +1,5 @@
" Language: tmux(1) configuration file
" Version: 2.7 (git-e4e060f2)
" Version: 2.9a (git-0d64531f)
" 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)
@ -64,60 +64,51 @@ endfor
syn keyword tmuxOptions
\ buffer-limit command-alias default-terminal escape-time exit-empty
\ activity-action assume-paste-time base-index bell-action default-command
\ default-shell destroy-unattached detach-on-destroy
\ default-shell default-size destroy-unattached detach-on-destroy
\ display-panes-active-colour display-panes-colour display-panes-time
\ display-time exit-unattached focus-events history-file history-limit
\ key-table lock-after-time lock-command message-attr message-bg
\ message-command-attr message-command-bg message-command-fg
\ message-command-style message-fg message-limit message-style mouse
\ aggressive-resize allow-rename alternate-screen automatic-rename
\ automatic-rename-format clock-mode-colour clock-mode-style force-height
\ force-width main-pane-height main-pane-width mode-attr mode-bg mode-fg
\ mode-keys mode-style monitor-activity monitor-bell monitor-silence
\ other-pane-height other-pane-width pane-active-border-bg
\ pane-active-border-fg pane-active-border-style pane-base-index
\ pane-border-bg pane-border-fg pane-border-format pane-border-status
\ pane-border-style prefix prefix2 remain-on-exit renumber-windows
\ repeat-time set-clipboard set-titles set-titles-string silence-action
\ status status-attr status-bg status-fg status-interval status-justify
\ status-keys status-left status-left-attr status-left-bg status-left-fg
\ status-left-length status-left-style status-position status-right
\ status-right-attr status-right-bg status-right-fg status-right-length
\ key-table lock-after-time lock-command message-command-style message-limit
\ message-style mouse aggressive-resize allow-rename alternate-screen
\ automatic-rename automatic-rename-format clock-mode-colour
\ clock-mode-style main-pane-height main-pane-width mode-keys mode-style
\ monitor-activity monitor-bell monitor-silence other-pane-height
\ other-pane-width pane-active-border-style pane-base-index
\ pane-border-format pane-border-status pane-border-style prefix prefix2
\ 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-overrides
\ update-environment user-keys visual-activity visual-bell visual-silence
\ window-active-style window-status-activity-attr window-status-activity-bg
\ window-status-activity-fg window-status-activity-style window-status-attr
\ window-status-bell-attr window-status-bell-bg window-status-bell-fg
\ window-status-bell-style window-status-bg window-status-current-attr
\ window-status-current-bg window-status-current-fg
\ window-status-current-format window-status-current-style window-status-fg
\ window-status-format window-status-last-attr window-status-last-bg
\ window-status-last-fg window-status-last-style window-status-separator
\ window-status-style window-style word-separators wrap-search xterm-keys
\ window-active-style 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 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
\ clock-mode command-prompt confirm confirm-before copy-mode detach
\ detach-client display display-message display-panes displayp find-window
\ findw if if-shell join-pane joinp kill-pane kill-server kill-session
\ kill-window killp has-session has killw 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 last-pane
\ lastp lockc locks last-window last ls lsb delete-buffer deleteb lsc lscm
\ lsk lsp lsw move-pane move-window movep movew new new-session new-window
\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane
\ pipep prev previous-layout previous-window prevl refresh refresh-client
\ rename rename-session rename-window renamew resize-pane resizep
\ 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 set-window-option setb setenv setw
\ show show-buffer show-environment show-hooks show-messages show-options
\ show-window-options showb showenv showmsgs 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
\ detach-client display display-menu display-message display-panes displayp
\ find-window findw if if-shell join-pane joinp kill-pane kill-server
\ kill-session kill-window killp has-session has killw 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-window last lsb lsc delete-buffer
\ deleteb 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 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
\ set-window-option setb setenv setw show show-buffer show-environment
\ show-hooks show-messages show-options show-window-options showb showenv
\ showmsgs 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
let &cpo = s:original_cpo
unlet! s:original_cpo s:bg s:i

View File

@ -1,11 +1,12 @@
" This script tests a color scheme for some errors. Load the scheme and source
" this script. e.g. :e colors/desert.vim | :so check_colors.vim
" Will output possible errors.
" This script tests a color scheme for some errors and lists potential errors.
" Load the scheme and source this script, like this:
" :edit colors/desert.vim | :so colors/tools/check_colors.vim
let s:save_cpo= &cpo
set cpo&vim
func! Test_check_colors()
let l:savedview = winsaveview()
call cursor(1,1)
let err={}
@ -17,11 +18,69 @@ func! Test_check_colors()
endif
" 2) Check for some well-defined highlighting groups
" Some items, check several groups, e.g. Diff, Spell
let hi_groups = ['ColorColumn', 'Diff', 'ErrorMsg', 'Folded',
\ 'FoldColumn', 'IncSearch', 'LineNr', 'ModeMsg', 'MoreMsg', 'NonText',
\ 'Normal', 'Pmenu', 'Todo', 'Search', 'Spell', 'StatusLine', 'TabLine',
\ 'Title', 'Visual', 'WarningMsg', 'WildMenu']
let hi_groups = [
\ 'ColorColumn',
\ 'Comment',
\ 'Conceal',
\ 'Constant',
\ 'Cursor',
\ 'CursorColumn',
\ 'CursorLine',
\ 'CursorLineNr',
\ 'DiffAdd',
\ 'DiffChange',
\ 'DiffDelete',
\ 'DiffText',
\ 'Directory',
\ 'EndOfBuffer',
\ 'Error',
\ 'ErrorMsg',
\ 'FoldColumn',
\ 'Folded',
\ 'Identifier',
\ 'Ignore',
\ 'IncSearch',
\ 'LineNr',
\ 'MatchParen',
\ 'ModeMsg',
\ 'MoreMsg',
\ 'NonText',
\ 'Normal',
\ 'Pmenu',
\ 'PmenuSbar',
\ 'PmenuSel',
\ 'PmenuThumb',
\ 'PreProc',
\ 'Question',
\ 'QuickFixLine',
\ 'Search',
\ 'SignColumn',
\ 'Special',
\ 'SpecialKey',
\ 'SpellBad',
\ 'SpellCap',
\ 'SpellLocal',
\ 'SpellRare',
\ 'Statement',
\ 'StatusLine',
\ 'StatusLineNC',
\ 'StatusLineTerm',
\ 'StatusLineTermNC',
\ 'TabLine',
\ 'TabLineFill',
\ 'TabLineSel',
\ 'Title',
\ 'Todo',
\ 'ToolbarButton',
\ 'ToolbarLine',
\ 'Type',
\ 'Underlined',
\ 'VertSplit',
\ 'Visual',
\ 'VisualNOS',
\ 'WarningMsg',
\ 'WildMenu',
\ ]
let groups={}
for group in hi_groups
if search('\c@suppress\s\+'.group, 'cnW')
@ -30,6 +89,9 @@ func! Test_check_colors()
let groups[group] = 'Ignoring '.group
continue
endif
if search('hi\%[ghlight]!\= \+link \+'.group, 'cnW') " Linked group
continue
endif
if !search('hi\%[ghlight] \+'.group, 'cnW')
let groups[group] = 'No highlight definition for '.group
continue
@ -43,12 +105,15 @@ func! Test_check_colors()
let groups[group] = 'Missing bg terminal color for '.group
continue
endif
call search('hi\%[ghlight] \+'.group, 'cW')
" only check in the current line
if !search('guifg', 'cnW', line('.')) || !search('ctermfg', 'cnW', line('.'))
" do not check for background colors, they could be intentionally left out
let groups[group] = 'Missing fg definition for '.group
if !search('hi\%[ghlight] \+'.group. '.*guifg=', 'cnW')
let groups[group] = 'Missing guifg definition for '.group
continue
endif
if !search('hi\%[ghlight] \+'.group. '.*ctermfg=', 'cnW')
let groups[group] = 'Missing ctermfg definition for '.group
continue
endif
" do not check for background colors, they could be intentionally left out
call cursor(1,1)
endfor
let err['highlight'] = groups
@ -91,15 +156,43 @@ func! Test_check_colors()
endif
" 7) Does not define filetype specific groups like vimCommand, htmlTag,
let hi_groups = ['vim', 'html', 'python', 'sh', 'ruby']
let hi_groups = filter(getcompletion('', 'filetype'), { _,v -> v !~# '\%[no]syn\%(color\|load\|tax\)' })
let ft_groups = []
" let group = '\%('.join(hi_groups, '\|').'\)' " More efficient than a for loop, but less informative
for group in hi_groups
let pat='\Chi\%[ghlight]\s*\zs'.group.'\w\+\>'
let pat='\Chi\%[ghlight]!\= *\%[link] \+\zs'.group.'\w\+\>\ze \+.' " Skips `hi clear`
if search(pat, 'cW')
call add(ft_groups, matchstr(getline('.'), pat))
endif
call cursor(1,1)
endfor
if !empty(ft_groups)
let err['filetype'] = get(err, 'filetype', 'Should not define: ') . join(uniq(sort(ft_groups)))
endif
" 8) Were debugPC and debugBreakpoint defined?
for group in ['debugPC', 'debugBreakpoint']
let pat='\Chi\%[ghlight]!\= *\%[link] \+\zs'.group.'\>'
if search(pat, 'cnW')
let line = search(pat, 'cW')
let err['filetype'] = get(err, 'filetype', 'Should not define: ') . matchstr(getline('.'), pat). ' '
endif
call cursor(1,1)
endfor
" 9) Normal should be defined first, not use reverse, fg or bg
call cursor(1,1)
let pat = 'hi\%[light] \+\%(link\|clear\)\@!\w\+\>'
call search(pat, 'cW') " Look for the first hi def, skipping `hi link` and `hi clear`
if getline('.') !~# '\m\<Normal\>'
let err['highlight']['Normal'] = 'Should be defined first'
elseif getline('.') =~# '\m\%(=\%(fg\|bg\)\)'
let err['highlight']['Normal'] = "Should not use 'fg' or 'bg'"
elseif getline('.') =~# '\m=\%(inv\|rev\)erse'
let err['highlight']['Normal'] = 'Should not use reverse mode'
endif
call winrestview(l:savedview)
let g:err = err
" print Result
@ -107,11 +200,11 @@ func! Test_check_colors()
endfu
fu! Result(err)
let do_roups = 0
let do_groups = 0
echohl Title|echomsg "---------------"|echohl Normal
for key in sort(keys(a:err))
if key is# 'highlight'
let do_groups = 1
let do_groups = !empty(a:err[key])
continue
else
if a:err[key] !~ 'OK'