mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
Update runtime files
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" URL: https://github.com/shawncplus/phpcomplete.vim
|
||||
" Last Change: 2018 Oct 10
|
||||
" Last Change: 2021 Feb 08
|
||||
"
|
||||
" OPTIONS:
|
||||
"
|
||||
@ -122,7 +122,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
" If exists b:php_menu it means completion was already constructed we
|
||||
" don't need to do anything more
|
||||
if exists("b:php_menu")
|
||||
@ -148,8 +147,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
try
|
||||
let eventignore = &eventignore
|
||||
let &eventignore = 'all'
|
||||
let winheight = winheight(0)
|
||||
let winnr = winnr()
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
|
||||
|
||||
@ -183,7 +180,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
|
||||
let sccontent = split(classcontent, "\n")
|
||||
@ -217,7 +213,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
|
||||
endif
|
||||
finally
|
||||
silent! exec winnr.'resize '.winheight
|
||||
let &eventignore = eventignore
|
||||
endtry
|
||||
endfunction
|
||||
@ -1025,7 +1020,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
|
||||
let c_var = '$'.c_var
|
||||
endif
|
||||
let c_variables[c_var] = ''
|
||||
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index)) > 0
|
||||
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index, '')) > 0
|
||||
let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index])
|
||||
endif
|
||||
let var_index += 1
|
||||
@ -2082,26 +2077,17 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
" ...
|
||||
" ]
|
||||
"
|
||||
let full_file_path = fnamemodify(a:file_path, ':p')
|
||||
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
let cfile = join(a:file_lines, "\n")
|
||||
let full_file_path = fnamemodify(a:file_path, ':p')
|
||||
let result = []
|
||||
" We use new buffer and (later) normal! because
|
||||
" this is the most efficient way. The other way
|
||||
" is to go through the looong string looking for
|
||||
" matching {}
|
||||
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
|
||||
|
||||
" remember the window we started at
|
||||
let phpcomplete_original_window = winnr()
|
||||
call win_execute(popup_id, 'call search(''\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)'')')
|
||||
call win_execute(popup_id, "let cfline = line('.')")
|
||||
call win_execute(popup_id, "call search('{')")
|
||||
call win_execute(popup_id, "let endline = line('.')")
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =cfile
|
||||
call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
|
||||
let cfline = line('.')
|
||||
call search('{')
|
||||
let endline = line('.')
|
||||
|
||||
let content = join(getline(cfline, endline), "\n")
|
||||
call win_execute(popup_id, 'let content = join(getline('.cfline.', '.endline.'), "\n")')
|
||||
" Catch extends
|
||||
if content =~? 'extends'
|
||||
let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
|
||||
@ -2117,14 +2103,16 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
else
|
||||
let implemented_interfaces = []
|
||||
endif
|
||||
call searchpair('{', '', '}', 'W')
|
||||
let class_closing_bracket_line = line('.')
|
||||
|
||||
call win_execute(popup_id, 'let [class_closing_bracket_line, class_closing_bracket_col] = searchpairpos("{", "", "}", "W")')
|
||||
|
||||
" Include class docblock
|
||||
let doc_line = cfline - 1
|
||||
if getline(doc_line) =~? '^\s*\*/'
|
||||
call win_execute(popup_id, 'let l = getline('.doc_line.')')
|
||||
if l =~? '^\s*\*/'
|
||||
while doc_line != 0
|
||||
if getline(doc_line) =~? '^\s*/\*\*'
|
||||
call win_execute(popup_id, 'let l = getline('.doc_line.')')
|
||||
if l =~? '^\s*/\*\*'
|
||||
let cfline = doc_line
|
||||
break
|
||||
endif
|
||||
@ -2132,22 +2120,22 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
|
||||
call win_execute(popup_id, 'let classcontent = join(getline('.cfline.', '.class_closing_bracket_line.'), "\n")')
|
||||
|
||||
let used_traits = []
|
||||
" move back to the line next to the class's definition
|
||||
call cursor(endline + 1, 1)
|
||||
call win_execute(popup_id, 'call cursor('.(endline + 1).', 1)')
|
||||
let keep_searching = 1
|
||||
while keep_searching != 0
|
||||
" try to grab "use..." keywords
|
||||
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
|
||||
let syn_name = synIDattr(synID(lnum, col, 0), "name")
|
||||
call win_execute(popup_id, 'let [lnum, col] = searchpos(''\c^\s\+use\s\+'.class_name_pattern.''', "cW", '.class_closing_bracket_line.')')
|
||||
call win_execute(popup_id, 'let syn_name = synIDattr(synID('.lnum.', '.col.', 0), "name")')
|
||||
if syn_name =~? 'string\|comment'
|
||||
call cursor(lnum + 1, 1)
|
||||
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
|
||||
continue
|
||||
endif
|
||||
|
||||
let trait_line = getline(lnum)
|
||||
call win_execute(popup_id, 'let trait_line = getline('.lnum.')')
|
||||
if trait_line !~? ';'
|
||||
" try to find the next line containing ';'
|
||||
let l = lnum
|
||||
@ -2157,25 +2145,23 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
while search_line !~? ';' && l > 0
|
||||
" file lines are reversed so we need to go backwards
|
||||
let l += 1
|
||||
let search_line = getline(l)
|
||||
call win_execute(popup_id, 'let search_line = getline('.l.')')
|
||||
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
|
||||
endwhile
|
||||
endif
|
||||
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
|
||||
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
|
||||
call cursor(lnum + 1, 1)
|
||||
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
|
||||
|
||||
if [lnum, col] == [0, 0]
|
||||
let keep_searching = 0
|
||||
endif
|
||||
endwhile
|
||||
|
||||
silent! bw! %
|
||||
call popup_close(popup_id)
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
|
||||
" go back to original window
|
||||
exe phpcomplete_original_window.'wincmd w'
|
||||
call add(result, {
|
||||
\ 'class': a:class_name,
|
||||
\ 'content': classcontent,
|
||||
@ -2532,40 +2518,37 @@ function! phpcomplete#FormatDocBlock(info) " {{{
|
||||
endif
|
||||
|
||||
return res
|
||||
endfunction!
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let original_window = winnr()
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =a:file_lines
|
||||
normal! G
|
||||
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
|
||||
call win_execute(popup_id, 'normal! G')
|
||||
|
||||
" clear out classes, functions and other blocks
|
||||
while 1
|
||||
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
|
||||
call win_execute(popup_id, 'let block_start_pos = searchpos(''\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{'', "Web")')
|
||||
if block_start_pos == [0, 0]
|
||||
break
|
||||
endif
|
||||
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
|
||||
call win_execute(popup_id, 'let block_end_pos = searchpairpos("{", "", ''}\|\%$'', "W", ''synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'')')
|
||||
|
||||
let popup_lines = winbufnr(popup_id)->getbufline(1, '$')
|
||||
if block_end_pos != [0, 0]
|
||||
" end of the block found, just delete it
|
||||
silent! exec block_start_pos[0].','.block_end_pos[0].'d _'
|
||||
call remove(popup_lines, block_start_pos[0] - 1, block_end_pos[0] - 1)
|
||||
else
|
||||
" block pair not found, use block start as beginning and the end
|
||||
" of the buffer instead
|
||||
silent! exec block_start_pos[0].',$d _'
|
||||
call remove(popup_lines, block_start_pos[0] - 1, -1)
|
||||
endif
|
||||
call popup_settext(popup_id, popup_lines)
|
||||
endwhile
|
||||
normal! G
|
||||
call win_execute(popup_id, 'normal! G', 'silent!')
|
||||
|
||||
" grab the remains
|
||||
let file_lines = reverse(getline(1, line('.') - 1))
|
||||
|
||||
silent! bw! %
|
||||
exe original_window.'wincmd w'
|
||||
call win_execute(popup_id, "let file_lines = reverse(getline(1, line('.')-1))")
|
||||
call popup_close(popup_id)
|
||||
|
||||
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
let i = 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 8.2. Last change: 2019 Nov 10
|
||||
*diff.txt* For Vim version 8.2. Last change: 2021 Feb 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 Feb 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -5903,6 +5903,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
|
||||
When the register was not set an empty list is returned.
|
||||
|
||||
If {regname} is not specified, |v:register| is used.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getreg()
|
||||
@ -5930,6 +5931,7 @@ getreginfo([{regname}]) *getreginfo()*
|
||||
will be returned.
|
||||
If {regname} is not specified, |v:register| is used.
|
||||
The returned Dictionary can be passed to |setreg()|.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getreginfo()
|
||||
@ -5943,6 +5945,7 @@ getregtype([{regname}]) *getregtype()*
|
||||
"" for an empty or unknown register
|
||||
<CTRL-V> is one character with value 0x16.
|
||||
If {regname} is not specified, |v:register| is used.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getregtype()
|
||||
@ -9658,6 +9661,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
setreg({regname}, {value} [, {options}])
|
||||
Set the register {regname} to {value}.
|
||||
If {regname} is "" or "@", the unnamed register '"' is used.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
{value} may be any value returned by |getreg()| or
|
||||
|getreginfo()|, including a |List| or |Dict|.
|
||||
|
@ -610,14 +610,14 @@ the use of square and curly brackets, and otherwise by community convention.
|
||||
These conventions are not universally followed, so the Clojure indent script
|
||||
offers a few configurable options, listed below.
|
||||
|
||||
If the current vim does not include |searchpairpos()|, the indent script falls
|
||||
If the current vim does not include searchpairpos(), the indent script falls
|
||||
back to normal 'lisp' indenting, and the following options are ignored.
|
||||
|
||||
*g:clojure_maxlines*
|
||||
|
||||
Set maximum scan distance of |searchpairpos()|. Larger values trade
|
||||
performance for correctness when dealing with very long forms. A value of 0
|
||||
will scan without limits.
|
||||
Set maximum scan distance of searchpairpos(). Larger values trade performance
|
||||
for correctness when dealing with very long forms. A value of 0 will scan
|
||||
without limits.
|
||||
>
|
||||
" Default
|
||||
let g:clojure_maxlines = 100
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Jan 15
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Feb 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1176,6 +1176,7 @@ tag command action ~
|
||||
|:bNext| :bN[ext] go to previous buffer in the buffer list
|
||||
|:ball| :ba[ll] open a window for each buffer in the buffer list
|
||||
|:badd| :bad[d] add buffer to the buffer list
|
||||
|:balt| :balt like ":badd" but also set the alternate file
|
||||
|:bdelete| :bd[elete] remove a buffer from the buffer list
|
||||
|:behave| :be[have] set mouse and selection behavior
|
||||
|:belowright| :bel[owright] make split window appear right or below
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Feb 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1568,7 +1568,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{only in GUI versions or when the |+xterm_clipboard|
|
||||
feature is included}
|
||||
This option is a list of comma separated names.
|
||||
These names are recognized:
|
||||
Note: if one of the items is "exclude:", then you can't add an item
|
||||
after that. Therefore do append an item with += but use ^= to
|
||||
prepend, e.g.: >
|
||||
set clipboard^=unnamed
|
||||
< These names are recognized:
|
||||
|
||||
*clipboard-unnamed*
|
||||
unnamed When included, Vim will use the clipboard register '*'
|
||||
@ -4882,8 +4886,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*lcs-lead*
|
||||
lead:c Character to show for leading spaces. When omitted,
|
||||
leading spaces are blank. Overrides the "space"
|
||||
setting for leading spaces.
|
||||
*lcs-trail*
|
||||
setting for leading spaces. You can combine it with
|
||||
"tab:", for example: >
|
||||
:set listchars+=tab:>-,lead:.
|
||||
< *lcs-trail*
|
||||
trail:c Character to show for trailing spaces. When omitted,
|
||||
trailing spaces are blank. Overrides the "space"
|
||||
setting for trailing spaces.
|
||||
@ -6232,7 +6238,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
<
|
||||
*'runtimepath'* *'rtp'* *vimfiles*
|
||||
'runtimepath' 'rtp' string (default:
|
||||
Unix: "$HOME/.vim,
|
||||
Unix: "$HOME/.vim,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
@ -6242,7 +6248,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
home:vimfiles/after"
|
||||
PC: "$HOME/vimfiles,
|
||||
MS-Windows: "$HOME/vimfiles,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
@ -6254,8 +6260,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
$BE_USER_SETTINGS/vim/after")
|
||||
VMS: "sys$login:vimfiles,
|
||||
$BE_USER_SETTINGS/vim/after"
|
||||
VMS: "sys$login:vimfiles,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
|
@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
*popup.txt* For Vim version 8.2. Last change: 2021 Feb 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -620,7 +620,8 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
property moves. Use an empty string to remove. See
|
||||
|popup-textprop-pos|.
|
||||
textpropwin What window to search for the text property. When
|
||||
omitted or invalid the current window is used.
|
||||
omitted or invalid the current window is used. Used
|
||||
when "textprop" is present.
|
||||
textpropid Used to identify the text property when "textprop" is
|
||||
present. Use zero to reset.
|
||||
fixed When FALSE (the default), and:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 8.2. Last change: 2020 May 31
|
||||
*quickfix.txt* For Vim version 8.2. Last change: 2021 Feb 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1025,6 +1025,12 @@ commands can be combined to create a NewGrep command: >
|
||||
'smartcase' is not used.
|
||||
If {pattern} is empty (e.g. // is specified), the last
|
||||
used search pattern is used. |last-pattern|
|
||||
|
||||
|QuickFixCmdPre| and |QuickFixCmdPost| are triggered.
|
||||
A file that is opened for matching may use a buffer
|
||||
number, but it is reused if possible to avoid
|
||||
consuming buffer numbers.
|
||||
|
||||
:{count}vim[grep] ...
|
||||
When a number is put before the command this is used
|
||||
as the maximum number of matches to find. Use
|
||||
|
@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*starting.txt* For Vim version 8.2. Last change: 2021 Feb 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1344,7 +1344,11 @@ resulting file, when executed with a ":source" command:
|
||||
"options". Script-local mappings will not be written.
|
||||
2. Restores global variables that start with an uppercase letter and contain
|
||||
at least one lowercase letter, if 'sessionoptions' contains "globals".
|
||||
3. Unloads all currently loaded buffers.
|
||||
3. Closes all windows in the current tab page, except the current one; closes
|
||||
all tab pages except the current one (this results in currently loaded
|
||||
buffers to be unloaded, some may become hidden if 'hidden' is set or
|
||||
otherwise specified); wipes out the current buffer, if it is empty
|
||||
and unnamed.
|
||||
4. Restores the current directory if 'sessionoptions' contains "curdir", or
|
||||
sets the current directory to where the Session file is if 'sessionoptions'
|
||||
contains "sesdir".
|
||||
@ -1640,13 +1644,17 @@ either have to fix the error, or delete the file (while Vim is running, so
|
||||
most of the information will be restored).
|
||||
|
||||
*:rv* *:rviminfo* *E195*
|
||||
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
|
||||
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see
|
||||
|viminfo-file-name| above).
|
||||
If [!] is given, then any information that is
|
||||
already set (registers, marks, |v:oldfiles|, etc.)
|
||||
will be overwritten
|
||||
|
||||
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
|
||||
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
|
||||
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see
|
||||
|viminfo-file-name| above).
|
||||
This command has no effect when 'viminfofile' has been
|
||||
set to "NONE".
|
||||
The information in the file is first read in to make
|
||||
a merge between old and new info. When [!] is used,
|
||||
the old information is not read first, only the
|
||||
|
@ -1292,6 +1292,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+cmdline_compl various.txt /*+cmdline_compl*
|
||||
+cmdline_hist various.txt /*+cmdline_hist*
|
||||
+cmdline_info various.txt /*+cmdline_info*
|
||||
+cmdwin various.txt /*+cmdwin*
|
||||
+comments various.txt /*+comments*
|
||||
+conceal various.txt /*+conceal*
|
||||
+cryptv various.txt /*+cryptv*
|
||||
@ -3943,6 +3944,7 @@ E1136 map.txt /*E1136*
|
||||
E1137 map.txt /*E1137*
|
||||
E114 eval.txt /*E114*
|
||||
E115 eval.txt /*E115*
|
||||
E1155 autocmd.txt /*E1155*
|
||||
E116 eval.txt /*E116*
|
||||
E117 eval.txt /*E117*
|
||||
E118 eval.txt /*E118*
|
||||
@ -6416,6 +6418,7 @@ fixed-7.2 version7.txt /*fixed-7.2*
|
||||
fixed-7.3 version7.txt /*fixed-7.3*
|
||||
fixed-7.4 version7.txt /*fixed-7.4*
|
||||
flatten() eval.txt /*flatten()*
|
||||
flattennew() eval.txt /*flattennew()*
|
||||
flexwiki.vim syntax.txt /*flexwiki.vim*
|
||||
float-e eval.txt /*float-e*
|
||||
float-functions usr_41.txt /*float-functions*
|
||||
@ -6663,6 +6666,7 @@ ftplugin-name usr_05.txt /*ftplugin-name*
|
||||
ftplugin-overrule filetype.txt /*ftplugin-overrule*
|
||||
ftplugin-special usr_41.txt /*ftplugin-special*
|
||||
ftplugins usr_05.txt /*ftplugins*
|
||||
fullcommand() eval.txt /*fullcommand()*
|
||||
funcref() eval.txt /*funcref()*
|
||||
function() eval.txt /*function()*
|
||||
function-argument eval.txt /*function-argument*
|
||||
@ -7633,6 +7637,7 @@ lc_time-variable eval.txt /*lc_time-variable*
|
||||
lcs-conceal options.txt /*lcs-conceal*
|
||||
lcs-eol options.txt /*lcs-eol*
|
||||
lcs-extends options.txt /*lcs-extends*
|
||||
lcs-lead options.txt /*lcs-lead*
|
||||
lcs-nbsp options.txt /*lcs-nbsp*
|
||||
lcs-precedes options.txt /*lcs-precedes*
|
||||
lcs-space options.txt /*lcs-space*
|
||||
@ -7661,6 +7666,7 @@ linewise-visual visual.txt /*linewise-visual*
|
||||
lisp.vim syntax.txt /*lisp.vim*
|
||||
lispindent() eval.txt /*lispindent()*
|
||||
list eval.txt /*list*
|
||||
list-concatenation eval.txt /*list-concatenation*
|
||||
list-functions usr_41.txt /*list-functions*
|
||||
list-identity eval.txt /*list-identity*
|
||||
list-index eval.txt /*list-index*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2021 Jan 04
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2021 Feb 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -126,11 +126,28 @@ After opening the terminal window and setting 'buftype' to "terminal" the
|
||||
|TerminalWinOpen| autocommand event is triggered. This makes it possible to set
|
||||
options specifically for the terminal window and buffer. Example: >
|
||||
au TerminalWinOpen * setlocal bufhidden=hide
|
||||
This only works properly if the terminal is not hidden.
|
||||
|
||||
There is also the |TerminalOpen| event, but this may be triggered for a hidden
|
||||
terminal, and the current window and buffer may not be for the new terminal.
|
||||
For both hidden and non-hidden terminals this works, both for buffer-local and
|
||||
window-local options: >
|
||||
au TerminalWinOpen,BufWinEnter * if &buftype == 'terminal'
|
||||
\ | setlocal bufhidden=hide colorcolumn=123
|
||||
\ | endif
|
||||
Note that for a hidden terminal the options are not set until the terminal is
|
||||
no longer hidden.
|
||||
|
||||
There is also the |TerminalOpen| event. Keep in mind this may be triggered
|
||||
for a hidden terminal, then the current window and buffer are not that of the
|
||||
new terminal.
|
||||
You need to use <abuf>, which is set to the terminal buffer. Example: >
|
||||
au TerminalOpen * call setbufvar(+expand('<abuf>'), '&colorcolumn', 123)
|
||||
au TerminalOpen * call setbufvar(expand('<abuf>')->str2nr(),
|
||||
\ '&termwinscroll', 1000)
|
||||
For a window-local option, you need to delay setting the option until the
|
||||
terminal window has been created (this only works for a hidden terminal): >
|
||||
au TerminalOpen * exe printf(
|
||||
\ 'au BufWinEnter <buffer=%d> ++once setlocal colorcolumn=%d',
|
||||
\ expand('<abuf>')->str2nr(), 123)
|
||||
For a non-hidden terminal use |TerminalWinOpen|.
|
||||
|
||||
Mouse events (click and drag) are passed to the terminal. Mouse move events
|
||||
are only passed when Vim itself is receiving them. For a terminal that is
|
||||
@ -717,6 +734,8 @@ term_scrape({buf}, {row}) *term_scrape()*
|
||||
"attr" attributes of the cell, use |term_getattr()|
|
||||
to get the individual flags
|
||||
"width" cell width: 1 or 2
|
||||
For a double-width cell there is one item, thus the list can
|
||||
be shorter than the width of the terminal.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_scrape(row)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Feb 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -39,6 +39,7 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Vim9 - Make everything work:
|
||||
- Use ":vim9cmd" as a command modifier? Then make ":vim9" short for that.
|
||||
- Add a test for profiling with nested function calls and lambda.
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
@ -166,6 +167,7 @@ Popup windows:
|
||||
However, it may also cause trouble, changing the popup of another plugin.
|
||||
- Width is not computed correctly when minwidth and maxwidth are &columns
|
||||
and padding and a scrollbar are used. (#6676)
|
||||
- Should popup_getoptions() also return the mask? #7774
|
||||
- Add a way to use popup_menu() synchronously: instead of invoking the
|
||||
callback, return the choice. (Ben Jackson, #6534)
|
||||
- Use popup (or popup menu) for command line completion
|
||||
@ -1114,9 +1116,6 @@ Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
|
||||
Using "wviminfo /tmp/viminfo" does not store file marks that Vim knows about,
|
||||
it only works when merging with an existing file. (Shougo, 2017 Jun 19, #1781)
|
||||
|
||||
Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
|
||||
Memory leak in test97? The string is actually freed. Weird.
|
||||
|
||||
assert_fails() can only check for the first error. Make it possible to have
|
||||
@ -1221,10 +1220,6 @@ Patch for wrong cursor position on wrapped line, involving breakindent.
|
||||
|
||||
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
|
||||
|
||||
When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017
|
||||
Apr 23, #1653)
|
||||
Can 'completeopt' be made buffer-local? (#5487)
|
||||
|
||||
Window resizing with 'winfixheight': With a vertical split the height changes
|
||||
anyway. (Tommy allen, 2017 Feb 21, #1502)
|
||||
|
||||
@ -1239,9 +1234,6 @@ Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
|
||||
On Windows buffer completion sees backslash as escape char instead of path
|
||||
separator. (Toffanim, 2016 Nov 24, #1274)
|
||||
|
||||
min() and max() spawn lots of error messages if sorted list/dictionary
|
||||
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
|
||||
|
||||
Should :vmap in matchit.vim be :xmap? (Tony Mechelynck)
|
||||
|
||||
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
|
||||
@ -1342,9 +1334,6 @@ Regexp problems:
|
||||
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
|
||||
(2017 May 15, #1252)
|
||||
|
||||
Feature request: Complete members of a dictionary. (Luc Hermitte, 2017 Jan 4,
|
||||
#1350)
|
||||
|
||||
Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
|
||||
3. Doesn't work properly according to Yukihiro Nakadaira.
|
||||
Also see #1635.
|
||||
@ -1520,9 +1509,6 @@ Build with Python on Mac does not always use the right library.
|
||||
To support Thai (and other languages) word boundaries, include the ICU
|
||||
library: http://userguide.icu-project.org/boundaryanalysis
|
||||
|
||||
When complete() first argument is before where insert started and 'backspace'
|
||||
is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19)
|
||||
|
||||
Patch to use two highlight groups for relative numbers. (Shaun Brady, 2016 Jan
|
||||
30)
|
||||
|
||||
@ -1728,9 +1714,6 @@ Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
|
||||
Remark on the docs. Should not be a compile time feature. But then what?
|
||||
Also see #2034.
|
||||
|
||||
Completion of ":e" is ":earlier", should be ":edit". Complete to the matching
|
||||
command instead of doing this alphabetically. (Mikel Jorgensen)
|
||||
|
||||
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
|
||||
|
||||
Several syntax file match "^\s*" which may get underlined if that's in the
|
||||
@ -1775,10 +1758,6 @@ The BufUnload event is triggered when re-using the empty buffer.
|
||||
(Pokey Rule, 2013 Jul 22)
|
||||
Patch by Marcin Szamotulski, 2013 Jul 22.
|
||||
|
||||
The CompleteDone autocommand needs some info passed to it:
|
||||
- The word that was selected (empty if abandoned complete)
|
||||
- Type of completion: tag, omnifunc, user func.
|
||||
|
||||
Patch to allow more types in remote_expr(). (Lech Lorens, 2014 Jan 5)
|
||||
Doesn't work for string in list. Other way to pass all types of variables
|
||||
reliably?
|
||||
@ -2239,10 +2218,6 @@ Syntax priority problem. (Charles Campbell, 2011 Sep 15)
|
||||
When completion inserts the first match, it may trigger the line to be folded.
|
||||
Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
|
||||
|
||||
When a:base in 'completefunc' starts with a number it's passed as a number,
|
||||
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
|
||||
string value.
|
||||
|
||||
For running gvim on a USB stick: avoid the OLE registration. Use a command
|
||||
line argument -noregister.
|
||||
|
||||
@ -2633,10 +2608,6 @@ More AmigaOS4 patches. (Peter Bengtsson, Nov 9)
|
||||
Amiga patches with vbcc. (Adrien Destugues, 2010 Aug 30)
|
||||
http://pulkomandy.ath.cx/drop/vim73_vbcc_amiga.diff
|
||||
|
||||
Insert mode completion: When editing the text and pressing CTRL-N again goes
|
||||
back to originally completed text, edited text is gone. (Peng Yu, 2008 Jul 24)
|
||||
Suggestion by Ben Schmidt, 2008 Aug 6.
|
||||
|
||||
Problem with compound words? (Bert, 2008 May 6)
|
||||
No warning for when flags are defined after they are used in an affix.
|
||||
|
||||
@ -4931,6 +4902,23 @@ Omni completion:
|
||||
|
||||
|
||||
Insert mode completion/expansion:
|
||||
- Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
- When 'completeopt' has "noselect" does not insert a newline.
|
||||
(Lifepillar, 2017 Apr 23, #1653)
|
||||
- Can 'completeopt' be made buffer-local? (#5487)
|
||||
- When complete() first argument is before where insert started and
|
||||
'backspace' is Vi compatible, the completion fails.
|
||||
(Hirohito Higashi, 2015 Feb 19)
|
||||
- The CompleteDone autocommand needs some info passed to it:
|
||||
- The word that was selected (empty if abandoned complete)
|
||||
- Type of completion: tag, omnifunc, user func.
|
||||
- When a:base in 'completefunc' starts with a number it's passed as a
|
||||
number, not a string. (Sean Ma) Need to add flag to call_func_retlist()
|
||||
to force a string value.
|
||||
- When editing the text and pressing CTRL-N again goes back to originally
|
||||
completed text, edited text is gone. (Peng Yu, 2008 Jul 24)
|
||||
Suggestion by Ben Schmidt, 2008 Aug 6.
|
||||
- GUI implementation of the popup menu.
|
||||
7 When searching in other files the name flash by, too fast to read. Only
|
||||
display a name every second or so, like with ":vimgrep".
|
||||
@ -5028,6 +5016,10 @@ Command line editing:
|
||||
|
||||
|
||||
Command line completion:
|
||||
- Feature request: Complete members of a dictionary.
|
||||
(Luc Hermitte, 2017 Jan 4, #1350)
|
||||
- Completion of ":e" is ":earlier", should be ":edit". Complete to the
|
||||
matching command instead of doing this alphabetically. (Mikel Jorgensen)
|
||||
8 Change expand_interactively into a flag that is passed as an argument.
|
||||
8 With command line completion after '%' and '#', expand current/alternate
|
||||
file name, so it can be edited. Also with modifiers, such as "%:h".
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jan 13
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Feb 01
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version6.txt* For Vim version 8.2. Last change: 2020 Aug 17
|
||||
*version6.txt* For Vim version 8.2. Last change: 2021 Jan 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Jan 23
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Feb 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Dec 18
|
||||
*windows.txt* For Vim version 8.2. Last change: 2021 Feb 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -208,7 +208,9 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|
||||
:[N]new [++opt] [+cmd] {file}
|
||||
:[N]sp[lit] [++opt] [+cmd] {file} *:split_f*
|
||||
Create a new window and start editing file {file} in it. This
|
||||
behaves like a ":split" first, and then an ":e" command.
|
||||
behaves almost like a ":split" first, and then an ":edit"
|
||||
command, but the alternate file name in the original window is
|
||||
set to {file}.
|
||||
If [+cmd] is given, execute the command when the file has been
|
||||
loaded |+cmd|.
|
||||
Also see |++opt|.
|
||||
|
@ -1,11 +1,11 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
"
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 18 July 2016
|
||||
" Language: Clojure
|
||||
" Maintainer: Alex Vear <av@axvr.io>
|
||||
" Former Maintainers: Sung Pae <self@sungpae.com>
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-02-13
|
||||
|
||||
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/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj
|
||||
" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/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
|
||||
@ -57,21 +57,6 @@ for s:setting in ['omnifunc', 'completefunc']
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Take all directories of the CLOJURE_SOURCE_DIRS environment variable
|
||||
" and add them to the path option.
|
||||
"
|
||||
" This is a legacy option for VimClojure users.
|
||||
if exists('$CLOJURE_SOURCE_DIRS')
|
||||
for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':')
|
||||
let s:dir = fnameescape(s:dir)
|
||||
" Whitespace escaping for Windows
|
||||
let s:dir = substitute(s:dir, '\', '\\\\', 'g')
|
||||
let s:dir = substitute(s:dir, '\ ', '\\ ', 'g')
|
||||
execute "setlocal path+=" . s:dir . "/**"
|
||||
endfor
|
||||
let b:undo_ftplugin .= ' | setlocal path<'
|
||||
endif
|
||||
|
||||
" Skip brackets in ignored syntax regions when using the % command
|
||||
if exists('loaded_matchit')
|
||||
let b:match_words = &matchpairs
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Jan 23
|
||||
" Last Change: 2021 Feb 07
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -94,7 +94,7 @@ if exists("loaded_matchit")
|
||||
" func name
|
||||
" require a parenthesis following, then there can be an "endfunc".
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
|
@ -1,12 +1,11 @@
|
||||
" Vim indent file
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: http://kotka.de/projects/clojure/vimclojure.html
|
||||
"
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 18 July 2016
|
||||
" Language: Clojure
|
||||
" Maintainer: Alex Vear <av@axvr.io>
|
||||
" Former Maintainers: Sung Pae <self@sungpae.com>
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-02-13
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@ -87,7 +86,7 @@ if exists("*searchpairpos")
|
||||
function! s:match_pairs(open, close, stopat)
|
||||
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
|
||||
" comments.
|
||||
if a:stopat == 0
|
||||
if a:stopat == 0 && g:clojure_maxlines > 0
|
||||
let stopat = max([line(".") - g:clojure_maxlines, 0])
|
||||
else
|
||||
let stopat = a:stopat
|
||||
@ -121,7 +120,7 @@ if exists("*searchpairpos")
|
||||
if s:syn_id_name() !~? "string"
|
||||
return -1
|
||||
endif
|
||||
if s:current_char() != '\\'
|
||||
if s:current_char() != '\'
|
||||
return -1
|
||||
endif
|
||||
call cursor(0, col("$") - 1)
|
||||
@ -170,7 +169,35 @@ if exists("*searchpairpos")
|
||||
|
||||
call search('\S', 'W')
|
||||
let w = s:strip_namespace_and_macro_chars(s:current_word())
|
||||
|
||||
if g:clojure_special_indent_words =~# '\V\<' . w . '\>'
|
||||
|
||||
" `letfn` is a special-special-case.
|
||||
if w ==# 'letfn'
|
||||
" Earlier code left the cursor at:
|
||||
" (letfn [...] ...)
|
||||
" ^
|
||||
|
||||
" Search and get coordinates of first `[`
|
||||
" (letfn [...] ...)
|
||||
" ^
|
||||
call search('\[', 'W')
|
||||
let pos = getcurpos()
|
||||
let letfn_bracket = [pos[1], pos[2]]
|
||||
|
||||
" Move cursor to start of the form this function was
|
||||
" initially called on. Grab the coordinates of the
|
||||
" closest outer `[`.
|
||||
call cursor(a:position)
|
||||
let outer_bracket = s:match_pairs('\[', '\]', 0)
|
||||
|
||||
" If the located square brackets are not the same,
|
||||
" don't use special-case formatting.
|
||||
if outer_bracket != letfn_bracket
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
|
||||
return 1
|
||||
endif
|
||||
|
||||
@ -190,11 +217,7 @@ if exists("*searchpairpos")
|
||||
" Check if form is a reader conditional, that is, it is prefixed by #?
|
||||
" or @#?
|
||||
function! s:is_reader_conditional_special_case(position)
|
||||
if getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
|
||||
return 1
|
||||
endif
|
||||
|
||||
return 0
|
||||
return getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
|
||||
endfunction
|
||||
|
||||
" Returns 1 for opening brackets, -1 for _anything else_.
|
||||
@ -261,7 +284,7 @@ if exists("*searchpairpos")
|
||||
call cursor(paren)
|
||||
|
||||
if s:is_method_special_case(paren)
|
||||
return [paren[0], paren[1] + shiftwidth() - 1]
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
if s:is_reader_conditional_special_case(paren)
|
||||
@ -292,6 +315,19 @@ if exists("*searchpairpos")
|
||||
return paren
|
||||
endif
|
||||
|
||||
" If the keyword begins with #, check if it is an anonymous
|
||||
" function or set, in which case we indent by the shiftwidth
|
||||
" (minus one if g:clojure_align_subforms = 1), or if it is
|
||||
" ignored, in which case we use the ( position for indent.
|
||||
if w[0] == "#"
|
||||
" TODO: Handle #=() and other rare reader invocations?
|
||||
if w[1] == '(' || w[1] == '{'
|
||||
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
|
||||
elseif w[1] == '_'
|
||||
return paren
|
||||
endif
|
||||
endif
|
||||
|
||||
" Test words without namespace qualifiers and leading reader macro
|
||||
" metacharacters.
|
||||
"
|
||||
@ -299,19 +335,19 @@ if exists("*searchpairpos")
|
||||
let ww = s:strip_namespace_and_macro_chars(w)
|
||||
|
||||
if &lispwords =~# '\V\<' . ww . '\>'
|
||||
return [paren[0], paren[1] + shiftwidth() - 1]
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
if g:clojure_fuzzy_indent
|
||||
\ && !s:match_one(g:clojure_fuzzy_indent_blacklist, ww)
|
||||
\ && s:match_one(g:clojure_fuzzy_indent_patterns, ww)
|
||||
return [paren[0], paren[1] + shiftwidth() - 1]
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
call search('\v\_s', 'cW')
|
||||
call search('\v\S', 'W')
|
||||
if paren[0] < line(".")
|
||||
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : shiftwidth() - 1)]
|
||||
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
|
||||
endif
|
||||
|
||||
call search('\v\S', 'bW')
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim indent script for HTML
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2020 Dec 11
|
||||
" Last Change: 2021 Jan 26
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
@ -941,11 +941,11 @@ func! s:InsideTag(foundHtmlString)
|
||||
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
|
||||
endif
|
||||
if idx == -1
|
||||
" after just "<tag" indent one level more
|
||||
" after just "<tag" indent two levels more
|
||||
let idx = match(text, '<' . s:tagname . '$')
|
||||
if idx >= 0
|
||||
call cursor(lnum, idx)
|
||||
return virtcol('.') + shiftwidth()
|
||||
call cursor(lnum, idx + 1)
|
||||
return virtcol('.') - 1 + shiftwidth() * 2
|
||||
endif
|
||||
endif
|
||||
if idx > 0
|
||||
|
@ -4,7 +4,6 @@
|
||||
" 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: 2019 Dec 08
|
||||
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
@ -27,7 +26,12 @@ endif
|
||||
|
||||
if !exists('g:ruby_indent_block_style')
|
||||
" Possible values: "expression", "do"
|
||||
let g:ruby_indent_block_style = 'expression'
|
||||
let g:ruby_indent_block_style = 'do'
|
||||
endif
|
||||
|
||||
if !exists('g:ruby_indent_hanging_elements')
|
||||
" Non-zero means hanging indents are enabled, zero means disabled
|
||||
let g:ruby_indent_hanging_elements = 1
|
||||
endif
|
||||
|
||||
setlocal nosmartindent
|
||||
@ -322,7 +326,11 @@ function! s:ClosingBracketOnEmptyLine(cline_info) abort
|
||||
|
||||
if searchpair(escape(bracket_pair[0], '\['), '', bracket_pair[1], 'bW', s:skip_expr) > 0
|
||||
if closing_bracket == ')' && col('.') != col('$') - 1
|
||||
let ind = virtcol('.') - 1
|
||||
if g:ruby_indent_hanging_elements
|
||||
let ind = virtcol('.') - 1
|
||||
else
|
||||
let ind = indent(line('.'))
|
||||
end
|
||||
elseif g:ruby_indent_block_style == 'do'
|
||||
let ind = indent(line('.'))
|
||||
else " g:ruby_indent_block_style == 'expression'
|
||||
@ -547,7 +555,9 @@ function! s:AfterUnbalancedBracket(pline_info) abort
|
||||
let [opening, closing] = s:ExtraBrackets(info.plnum)
|
||||
|
||||
if opening.pos != -1
|
||||
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
|
||||
if !g:ruby_indent_hanging_elements
|
||||
return indent(info.plnum) + info.sw
|
||||
elseif opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
|
||||
if col('.') + 1 == col('$')
|
||||
return indent(info.plnum) + info.sw
|
||||
else
|
||||
@ -632,8 +642,7 @@ function! s:PreviousNotMSL(msl_info) abort
|
||||
" TODO (2016-10-07) Wrong/unused? How could it be "1"?
|
||||
return indent(info.plnum) - 1
|
||||
" If previous line is a continuation return its indent.
|
||||
" TODO: the || s:IsInString() thing worries me a bit.
|
||||
elseif s:Match(info.plnum, s:non_bracket_continuation_regex) || s:IsInString(info.plnum, strlen(line))
|
||||
elseif s:Match(info.plnum, s:non_bracket_continuation_regex)
|
||||
return indent(info.plnum)
|
||||
endif
|
||||
endif
|
||||
|
@ -19,7 +19,7 @@ div#d2 { color: green; }
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="foo bar">
|
||||
class="foo bar">
|
||||
text
|
||||
</div>
|
||||
|
||||
|
@ -15,6 +15,21 @@ let x = [
|
||||
\ ]
|
||||
endif
|
||||
|
||||
" TODO: add searchpair() to find matching {
|
||||
"for x in [
|
||||
"{
|
||||
"key: 'value'
|
||||
"},
|
||||
"]
|
||||
"eval 0
|
||||
"endfor
|
||||
|
||||
for x in [
|
||||
{key: 'value'},
|
||||
]
|
||||
eval 0
|
||||
endfor
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
|
@ -15,6 +15,21 @@ if 1
|
||||
\ ]
|
||||
endif
|
||||
|
||||
" TODO: add searchpair() to find matching {
|
||||
"for x in [
|
||||
"{
|
||||
"key: 'value'
|
||||
"},
|
||||
"]
|
||||
"eval 0
|
||||
"endfor
|
||||
|
||||
for x in [
|
||||
{key: 'value'},
|
||||
]
|
||||
eval 0
|
||||
endfor
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Jan 21
|
||||
" Last Change: 2021 Feb 13
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -99,7 +99,9 @@ function GetVimIndentIntern()
|
||||
let ind = ind + shiftwidth()
|
||||
else
|
||||
" A line starting with :au does not increment/decrement indent.
|
||||
if prev_text !~ '^\s*au\%[tocmd]'
|
||||
" A { may start a block or a dict. Assume that when a } follows it's a
|
||||
" terminated dict.
|
||||
if prev_text !~ '^\s*au\%[tocmd]' && prev_text !~ '^\s*{.*}'
|
||||
let i = match(prev_text, '\(^\||\)\s*\(export\s\+\)\?\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\|finall\%[y]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
|
||||
if i >= 0
|
||||
let ind += shiftwidth()
|
||||
@ -152,13 +154,17 @@ function GetVimIndentIntern()
|
||||
endif
|
||||
|
||||
" Below a line starting with "]" we must be below the end of a list.
|
||||
if prev_text_end =~ '^\s*]'
|
||||
" Include a "}" and "},} in case a dictionary ends too.
|
||||
if prev_text_end =~ '^\s*\(},\=\s*\)\=]'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
let ends_in_comment = has('syntax_items')
|
||||
\ && synIDattr(synID(lnum, col('$'), 1), "name") =~ '\(Comment\|String\)$'
|
||||
|
||||
" A line ending in "{"/"[} is most likely the start of a dict/list literal,
|
||||
" indent the next line more. Not for a continuation line.
|
||||
if prev_text_end =~ '[{[]\s*$' && !found_cont
|
||||
" indent the next line more. Not for a continuation line or {{{.
|
||||
if !ends_in_comment && prev_text_end =~ '\s[{[]\s*$' && !found_cont
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2020 Aug 15
|
||||
" Last change: 2021 Jan 22
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,9 +2,9 @@
|
||||
" Language: Groovy
|
||||
" Original Author: Alessio Pace <billy.corgan AT tiscali.it>
|
||||
" Maintainer: Tobias Rapp <yahuxo+vim AT mailbox.org>
|
||||
" Version: 0.1.17
|
||||
" Version: 0.1.18
|
||||
" URL: http://www.vim.org/scripts/script.php?script_id=945
|
||||
" Last Change: 2020 May 26
|
||||
" Last Change: 2021 Feb 03
|
||||
|
||||
" THE ORIGINAL AUTHOR'S NOTES:
|
||||
"
|
||||
@ -253,7 +253,8 @@ if exists("groovy_regex_strings")
|
||||
endif
|
||||
" syn region groovyELExpr start=+${+ end=+}+ keepend contained
|
||||
syn match groovyELExpr /\${.\{-}}/ 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
|
||||
" Fix: force use of the NFA regexp engine (2), see GitHub issue #7280
|
||||
syn match groovyELExpr /\%#=2\$[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
|
||||
|
@ -4,6 +4,7 @@
|
||||
" Latest Revision: 2008-06-29
|
||||
" Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega
|
||||
" 2016 Jan 19: messagesDate changed by Bram
|
||||
" 2021 Jan 27: messagesHourRFC3339 changed from #946
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -26,7 +27,7 @@ syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d'
|
||||
syn match messagesRFC3339T contained display '\cT'
|
||||
\ nextgroup=messagesHourRFC3339
|
||||
|
||||
syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)'
|
||||
syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)\s*'
|
||||
\ nextgroup=messagesHost
|
||||
|
||||
syn match messagesHost contained display '\S*\s*'
|
||||
|
@ -2927,7 +2927,7 @@ msgid "[string too long]"
|
||||
msgstr "[p<><70>li<6C> dlouh<75> <20>et<65>zec]"
|
||||
|
||||
msgid "Messages maintainer: Bram Moolenaar <Bram@vim.org>"
|
||||
msgstr "Spr<70>vce zpr<70>v: Bram Moolenaar <Bram@vim.org>"
|
||||
msgstr "Spr<70>vce zpr<70>v: Ji<EFBFBD><EFBFBD> Pavlovsk<73> <jpavlovsky@mbox.vol.cz>"
|
||||
|
||||
msgid "Interrupt: "
|
||||
msgstr "P<>eru<72>en<65>: "
|
||||
|
@ -2927,7 +2927,7 @@ msgid "[string too long]"
|
||||
msgstr "[p<><70>li<6C> dlouh<75> <20>et<65>zec]"
|
||||
|
||||
msgid "Messages maintainer: Bram Moolenaar <Bram@vim.org>"
|
||||
msgstr "Spr<70>vce zpr<70>v: Bram Moolenaar <Bram@vim.org>"
|
||||
msgstr "Spr<70>vce zpr<70>v: Ji<EFBFBD><EFBFBD> Pavlovsk<73> <jpavlovsky@mbox.vol.cz>"
|
||||
|
||||
msgid "Interrupt: "
|
||||
msgstr "P<>eru<72>en<65>: "
|
||||
|
@ -13,7 +13,6 @@ msgstr ""
|
||||
"POT-Creation-Date: 2017-05-03 18:03+0100\n"
|
||||
"PO-Revision-Date: 2017-05-03 18:08+0300\n"
|
||||
"Last-Translator: Valdis Vītoliņš <valdis.vitolins@odo.lv>\n"
|
||||
"Language-Team: Bram Moolenaar <Bram@vim.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
Reference in New Issue
Block a user