Compare commits

...

40 Commits

Author SHA1 Message Date
Christian Brabandt
ee2cbcd99c patch 8.2.3441: MS-Windows: vimtutor can't handle path with spaces
Problem:    MS-Windows: vimtutor can't handle path with spaces.
Solution:   Add double quotes. (Christian Brabandt, closes #8871)
2021-09-15 12:53:40 +02:00
Bram Moolenaar
f2a8bafa4b patch 8.2.3440: recover test fails if there is an old swap file
Problem:    Recover test fails if there is an old swap file.
Solution:   Delete old swap files.
2021-09-14 22:58:23 +02:00
Christian Brabandt
78eb9cce91 patch 8.2.3439: deleted lines go to wrong yank register
Problem:    Deleted lines go to wrong yank register.
Solution:   Reset y_append when not calling get_yank_register(). (Christian
            Brabandt, closes #8872)
2021-09-14 18:55:51 +02:00
Yegappan Lakshmanan
5dfe467432 patch 8.2.3438: cannot manipulate blobs
Problem:    Cannot manipulate blobs.
Solution:   Add blob2list() and list2blob(). (Yegappan Lakshmanan,
            closes #8868)
2021-09-14 17:54:30 +02:00
Mike Williams
f5785cf059 patch 8.2.3437: compiler warnings for 32/64 bit usage
Problem:    Compiler warnings for 32/64 bit usage.
Solution:   Add type casts. (Mike Williams, closes #8870)
2021-09-13 22:17:38 +02:00
Bram Moolenaar
a29856fcdc patch 8.2.3436: check for optional bool type has confusing return type
Problem:    Check for optional bool type has confusing return type.
Solution:   Explicitly return OK.
2021-09-13 21:36:27 +02:00
Bram Moolenaar
b1b6f4de2b patch 8.2.3435: Vim9: dict is not passed to dict function
Problem:    Vim9: dict is not passed to dict function.
Solution:   Keep the dict used until a function call.
2021-09-13 18:25:54 +02:00
Bram Moolenaar
28e591dd50 patch 8.2.3434: function prototype for trigger_modechanged() is incomplete
Problem:    Function prototype for trigger_modechanged() is incomplete.
Solution:   Add "void".
2021-09-12 21:00:14 +02:00
Bram Moolenaar
bdcba24d85 patch 8.2.3433: :delcommand does not take a -buffer option
Problem:    :delcommand does not take a -buffer option.
Solution:   Add the -buffer option.
2021-09-12 20:58:02 +02:00
Bram Moolenaar
ca0627df69 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Problem:    Octave/Matlab filetype detection does not work properly.
Solution:   Update the patterns used for matching. (Doug Kearns)
2021-09-12 17:03:08 +02:00
naohiro ono
dfe04dbff5 patch 8.2.3431: completion for :disas sorts local functions first
Problem:    Completion for :disas sorts local functions first.
Solution:   Sort local functions last, like with :delfunc. (Naohiro Ono,
            closes #8860)
2021-09-12 15:45:10 +02:00
=?UTF-8?q?Magnus=20Gro=C3=9F?=
f1e8876fa2 patch 8.2.3430: no generic way to trigger an autocommand on mode change
Problem:    No generic way to trigger an autocommand on mode change.
Solution:   Add the ModeChanged autocommand event. (Magnus Gross, closes #8856)
2021-09-12 13:39:55 +02:00
Bram Moolenaar
464393a696 patch 8.2.3429: leaking memory when assigning to list or dict
Problem:    Leaking memory when assigning to list or dict.
Solution:   Free the list or dict type before overwriting it.
2021-09-11 23:07:44 +02:00
Bram Moolenaar
35a9a00afc patch 8.2.3428: using freed memory when replacing
Problem:    Using freed memory when replacing. (Dhiraj Mishra)
Solution:   Get the line pointer after calling ins_copychar().
2021-09-11 21:14:20 +02:00
Bram Moolenaar
b3bf33a7b2 patch 8.2.3427: double free when list is copied
Problem:    Double free when list is copied.
Solution:   Allocate the type when making a copy. (closes #8862)
            Clear the type for flattennew().  Avoid a memory leak when
            flattennew() fails.
2021-09-11 20:20:38 +02:00
Bram Moolenaar
4b4b1b84ee patch 8.2.3426: crash when deleting a listener in a listener callback
Problem:    Crash when deleting a listener in a listener callback. (Naohiro
            Ono)
Solution:   Mark the listener and delete it later.
2021-09-11 15:06:44 +02:00
Bram Moolenaar
56e14698b4 patch 8.2.3425: warning for using uninitialized variable
Problem:    Warning for using uninitialized variable.
Solution:   Initialize it. (John Marriott)
2021-09-11 12:15:09 +02:00
zeertzjq
f14b8ba137 patch 8.2.3424: a sequence of spaces is hard to see in list mode
Problem:    A sequence of spaces is hard to see in list mode.
Solution:   Add the "multispace" option to 'listchars'. (closes #8834)
2021-09-10 16:58:30 +02:00
Bram Moolenaar
07802044b9 patch 8.2.3423: Vim9: list += list creates a new list in :def function
Problem:    Vim9: list += list creates a new list in :def function.
Solution:   Append to the existing list.
2021-09-09 23:01:14 +02:00
Bram Moolenaar
efc084e335 patch 8.2.3422: Vim9: no failure if return type differs from returned var
Problem:    Vim9: no failure if return type differs from returned variable.
Solution:   Copy type when copying a list. (closes #8847)
2021-09-09 22:30:52 +02:00
Bram Moolenaar
6c391a74fe Update runtime files 2021-09-09 21:55:11 +02:00
Dominique Pelle
d176ca3dde patch 8.2.3421: a bit of code is not covered by tests
Problem:    A bit of code is not covered by tests.
Solution:   Add a few more test cases. (Dominique Pellé, closes #8857)
2021-09-09 20:45:34 +02:00
Christian Brabandt
6b9efdde78 patch 8.2.3420: _REENTRANT defined more than once
Problem:    _REENTRANT defined more than once.
Solution:   Fix configure script. (Christian Brabandt, closes #8852)
2021-09-09 17:14:50 +02:00
Bram Moolenaar
0325d3967c patch 8.2.3419: a failing debug expression may make Vim unusable
Problem:    A failing debug expression may make Vim unusable.
Solution:   Suppress error messages. (closes #8848)
2021-09-09 12:34:19 +02:00
Christian Brabandt
070ac3433b patch 8.2.3418: garbage collection while evaluating may cause trouble
Problem:    Garbage collection while evaluating may cause trouble.
Solution:   Disable garbage collection while evaluating an expression.
            (Christian Brabandt, issue #8848)
2021-09-09 12:12:03 +02:00
Bram Moolenaar
072f1c6888 patch 8.2.3417: Vim9: a failing debug expression aborts script sourcing
Problem:    Vim9: a failing debug expression aborts script sourcing.
Solution:   Do not let expression failure abort script sourcing. (closes #8848)
2021-09-08 20:40:34 +02:00
Bram Moolenaar
36f691f5f1 patch 8.2.3416: second error is reported while exception is being thrown
Problem:    Second error is reported while exception is being thrown.
Solution:   Do not check for trailing characters when already aborting.
            (closes #8842)
2021-09-08 15:33:30 +02:00
Yegappan Lakshmanan
fc3b775055 patch 8.2.3415: Vim9: not all function argument types are properly checked
Problem:    Vim9: Not all function argument types are properly checked.
Solution:   Add and improve argument type checks. (Yegappan Lakshmanan,
            closes #8839)
2021-09-08 14:57:42 +02:00
Bram Moolenaar
80c88eac5a patch 8.2.3414: fullcommand() gives wrong name with buffer-local user command
Problem:    fullcommand() gives the wrong name if there is a buffer-local user
            command. (Naohiro Ono)
Solution:   Use a separate function to get the user command name.
            (closes #8840)
2021-09-08 14:29:46 +02:00
Bram Moolenaar
a9e3d56087 patch 8.2.3413: Vim9: too many characters are allowed in import name
Problem:    Vim9: too many characters are allowed in import name.
Solution:   Disallow ':' and '#', check for white space. (closes #8845)
2021-09-08 12:31:35 +02:00
Bram Moolenaar
af2d5d2ce2 patch 8.2.3412: Vim9: importing the wrong file
Problem:    Vim9: importing the wrong file.
Solution:   Correct the file name.  Delete the file afterwards.
2021-09-07 22:35:34 +02:00
Bram Moolenaar
6853c38b78 patch 8.2.3411: Vim9: crash when using base name of import
Problem:    Vim9: crash when using base name of import. (Naohiro Ono)
Solution:   Check the import flags. (closes #8843)
2021-09-07 22:12:19 +02:00
Bram Moolenaar
89a54b413a patch 8.2.3410: crash with linebreak, listchars and large tabstop
Problem:    Crash with linebreak, listchars and large tabstop.
Solution:   Account for different size listchars for a tab. (closes #8841)
2021-09-07 20:45:31 +02:00
Bram Moolenaar
65b6056659 patch 8.2.3409: reading beyond end of line with invalid utf-8 character
Problem:    Reading beyond end of line with invalid utf-8 character.
Solution:   Check for NUL when advancing.
2021-09-07 19:26:53 +02:00
Bram Moolenaar
ddfc05100a patch 8.2.3408: can delete a numbered function
Problem:    Can delete a numbered function. (Naohiro Ono)
Solution:   Disallow deleting a numbered function. (closes #8760)
2021-09-06 20:56:56 +02:00
Bram Moolenaar
3b31851356 patch 8.2.3407: using uninitialized memory with "let g:['bar'] = 2"
Problem:    Using uninitialized memory with "let g:['bar'] = 2".
Solution:   Initialize v_type of a new dict item.
2021-09-06 19:19:45 +02:00
Bram Moolenaar
3ae5fc9a6a patch 8.2.3406: on some systems tests fail without _REENTRANT
Problem:    On some systems tests fail without _REENTRANT. (Elimar
            Riesebieter)
Solution:   Add -D_REENTRANT in configure. (closes #7402)
2021-09-06 18:57:30 +02:00
Bram Moolenaar
ec1b0968aa patch 8.2.3405: cannot have a comment line in a {} block of a user command
Problem:    Cannot have a comment line in a {} block of a user command.
Solution:   Continue after the line break. (closes #8837)
2021-09-06 17:10:59 +02:00
Bram Moolenaar
01dd6c3732 patch 8.2.3404: Vim9: no error for white space before "("
Problem:    Vim9: no error for white space before "(".
Solution:   Give an error, like in a compiled function.
2021-09-05 16:36:23 +02:00
Bram Moolenaar
2ddb89f8a9 patch 8.2.3403: memory leak for :retab with invalid argument
Problem:    Memory leak for :retab with invalid argument.
Solution:   Free the memory.  Make error messages consistent.
2021-09-04 21:20:41 +02:00
156 changed files with 1846 additions and 358 deletions

1
.github/CODEOWNERS vendored
View File

@@ -99,6 +99,7 @@ runtime/ftplugin/meson.vim @Liambeguin
runtime/ftplugin/modula3.vim @dkearns
runtime/ftplugin/nroff.vim @a-vrma
runtime/ftplugin/nsis.vim @k-takata
runtime/ftplugin/octave.vim @dkearns
runtime/ftplugin/pascal.vim @dkearns
runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope

View File

@@ -67,13 +67,13 @@ if exists ('g:ada_with_gnat_project_files')
endfor
endif
" Section: add standart exception {{{2
" Section: add standard exception {{{2
"
for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'exception',
\ 'info': 'Ada standart exception.',
\ 'info': 'Ada standard exception.',
\ 'kind': 'x',
\ 'icase': 1}]
endfor
@@ -210,7 +210,7 @@ function ada#Word (...)
let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
" Cope with tag searching for items in comments; if we are, don't loop
" backards looking for previous lines
" backwards looking for previous lines
if l:Column_Nr > strlen(l:Line)
" We were in a comment
let l:Line = getline(l:Line_Nr)

View File

@@ -14,7 +14,7 @@
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc
" 05.11.2006 MK Bram suggested against using setlocal omnifunc
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: ft-ada-omni
"------------------------------------------------------------------------------

View File

@@ -311,7 +311,7 @@ function! csscomplete#CompleteCSS(findstart, base)
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
elseif prop =~ '^\%(height\|width\)$'
let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"]
elseif prop =~ '^\%(left\|rigth\)$'
elseif prop =~ '^\%(left\|right\)$'
let values = ["auto"]
elseif prop == 'image-rendering'
let values = ["auto", "crisp-edges", "pixelated"]

View File

@@ -23,7 +23,7 @@ endif
function decada#Unit_Name () dict " {{{1
" Convert filename into acs unit:
" 1: remove the file extenstion.
" 1: remove the file extension.
" 2: replace all double '_' or '-' with an dot (which denotes a separate)
" 3: remove a trailing '_' (which denotes a specification)
return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')

View File

@@ -269,7 +269,8 @@ func dist#ft#FTm()
return
endif
let octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|for\|function\|if\|methods\|parfor\|properties\|switch\|while\)\>'
" excluding end(for|function|if|switch|while) common to Murphi
let octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|methods\|parfor\|properties\)\>'
let n = 1
let saw_comment = 0 " Whether we've seen a multiline comment leader.
@@ -285,8 +286,7 @@ func dist#ft#FTm()
setf objc
return
endif
if line =~ '^\s*\%(#\|%!\|[#%]{\=\s*$\)' ||
\ line =~ '^\s*unwind_protect\>' ||
if line =~ '^\s*\%(#\|%!\)' || line =~ '^\s*unwind_protect\>' ||
\ line =~ '\%(^\|;\)\s*' .. octave_block_terminators
setf octave
return

View File

@@ -129,7 +129,7 @@ fun! getscript#GetLatestVimScripts()
" insure that wget is executable
if executable(g:GetLatestVimScripts_wget) != 1
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
" call Dret("GetLatestVimScripts : wget not executable/availble")
" call Dret("GetLatestVimScripts : wget not executable/available")
return
endif
@@ -347,7 +347,7 @@ fun! s:GetOneScript(...)
set t_ti= t_te= nors
" put current line on top-of-screen and interpret it into
" a script identifer : used to obtain webpage
" a script identifier : used to obtain webpage
" source identifier : used to identify current version
" and an associated comment: used to report on what's being considered
if a:0 >= 3

View File

@@ -54,7 +54,7 @@ function! haskellcomplete#Complete(findstart, base)
if b:completingLangExtension
if a:base ==? ""
" Return all posible Lang extensions
" Return all possible Lang extensions
return s:langExtensions
else
let l:matches = []
@@ -70,7 +70,7 @@ function! haskellcomplete#Complete(findstart, base)
elseif b:completingOptionsGHC
if a:base ==? ""
" Return all posible GHC options
" Return all possible GHC options
return s:optionsGHC
else
let l:matches = []
@@ -86,7 +86,7 @@ function! haskellcomplete#Complete(findstart, base)
elseif b:completingModule
if a:base ==? ""
" Return all posible modules
" Return all possible modules
return s:commonModules
else
let l:matches = []

View File

@@ -486,7 +486,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
endif
endif
" Value of attribute completion {{{
" If attr contains =\s*[\"'] we catched value of attribute
" If attr contains =\s*[\"'] we match value of attribute
if attr =~ "=\s*[\"']" || attr =~ "=\s*$"
" Let do attribute specific completion
let attrname = matchstr(attr, '.*\ze\s*=')

View File

@@ -4267,7 +4267,7 @@ fun! s:NetrwGetBuffer(islocal,dirname)
endif
" call Decho(" bufnum#".bufnum,'~'.expand("<slnum>"))
" highjack the current buffer
" hijack the current buffer
" IF the buffer already has the desired name
" AND it is empty
let curbuf = bufname("%")
@@ -4275,7 +4275,7 @@ fun! s:NetrwGetBuffer(islocal,dirname)
let curbuf = getcwd()
endif
" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)")
" call Decho("deciding if netrw may highjack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("<slnum>"))
" call Decho("deciding if netrw may hijack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("<slnum>"))
" call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("<slnum>"))
" call Decho("..curbuf<".curbuf.">",'~'.expand("<slnum>"))
" call Decho("..line($)=".line("$")." AND this is 1",'~'.expand("<slnum>"))
@@ -4284,7 +4284,7 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" call Dret("s:NetrwGetBuffer 0<cleared buffer> : highjacking buffer#".bufnr("%"))
return 0
else " DEBUG
" call Decho("..did NOT highjack buffer",'~'.expand("<slnum>"))
" call Decho("..did NOT hijack buffer",'~'.expand("<slnum>"))
endif
" Aug 14, 2021: was thinking about looking for a [No Name] buffer here and using it, but that might cause problems
@@ -6845,7 +6845,7 @@ fun! s:NetrwMarkFile(islocal,fname)
" sanity check
if empty(a:fname)
" call Dret("s:NetrwMarkFile : emtpy fname")
" call Dret("s:NetrwMarkFile : empty fname")
return
endif
let curdir = s:NetrwGetCurdir(a:islocal)

View File

@@ -9,7 +9,7 @@
"
" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
" Enables completion for non-static methods when completing for static context (::).
" This generates E_STRICT level warning, but php calls these methods nontheless.
" This generates E_STRICT level warning, but php calls these methods nonetheless.
"
" let g:phpcomplete_complete_for_unknown_classes = 1/0 [default 0]
" Enables completion of variables and functions in "everything under the sun" fashion
@@ -28,7 +28,7 @@
" This option controls the number of characters the user needs to type before
" the tags will be searched for namespaces and classes in typed out namespaces in
" "use ..." context. Setting this to 0 is not recommended because that means the code
" have to scan every tag, and vim's taglist() function runs extremly slow with a
" have to scan every tag, and vim's taglist() function runs extremely slow with a
" "match everything" pattern.
"
" let g:phpcomplete_parse_docblock_comments = 1/0 [default 0]
@@ -263,7 +263,7 @@ function! phpcomplete#CompleteUse(base) " {{{
call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
endif
endfor
" if it seems that the tags file have namespace informations we can safely throw
" if it seems that the tags file have namespace information we can safely throw
" away namespaceless tag matches since we can be sure they are invalid
if patched_ctags_detected
no_namespace_matches = []
@@ -805,7 +805,7 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
endif
endfor
" resolve the typed in part with namespaces (if theres a \ in it)
" resolve the typed in part with namespaces (if there's a \ in it)
let [tag_match_pattern, namespace_for_class] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports)
let tags = []
@@ -921,11 +921,11 @@ function! s:getNextCharWithPos(filelines, current_pos) " {{{
endfunction " }}}
function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{
" if theres no modifier, and no modifier is allowed and no modifier is required
" if there's no modifier, and no modifier is allowed and no modifier is required
if len(a:modifiers) == 0 && len(a:required_modifiers) == 0
return 1
else
" check if every requred modifier is present
" check if every required modifier is present
for required_modifier in a:required_modifiers
if index(a:modifiers, required_modifier) == -1
return 0
@@ -1253,7 +1253,7 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) "
endif
endif
" save the coma position for later use if theres a "naked" , possibly separating a parameter and it is not in a parented part
" save the coma position for later use if there's a "naked" , possibly separating a parameter and it is not in a parented part
if first_coma_break_pos == -1 && current_char == ','
let first_coma_break_pos = len(instruction)
endif
@@ -1299,7 +1299,7 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) "
" there were a "naked" coma in the instruction
if first_coma_break_pos != -1
if instruction !~? '^use' && instruction !~? '^class' " use ... statements and class delcarations should not be broken up by comas
if instruction !~? '^use' && instruction !~? '^class' " use ... statements and class declarations should not be broken up by comas
let pos = (-1 * first_coma_break_pos) + 1
let instruction = instruction[pos :]
endif
@@ -1311,7 +1311,7 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) "
" clear everything up until the first (
let instruction = substitute(instruction, '^\(if\|while\|foreach\|for\)\s*(\s*', '', '')
" lets iterate trough the instruction until we can find the pair for the opening (
" lets iterate through the instruction until we can find the pair for the opening (
let i = 0
let depth = 1
while i < len(instruction)
@@ -1419,7 +1419,7 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
let parts = split(substitute(type, '^\\', '', ''), '\')
let class_candidate_namespace = join(parts[0:-2], '\')
let classname_candidate = parts[-1]
" check for renamed namepsace in imports
" check for renamed namespace in imports
if has_key(classstructure.imports, class_candidate_namespace)
let class_candidate_namespace = classstructure.imports[class_candidate_namespace].name
endif
@@ -2018,7 +2018,7 @@ function! phpcomplete#GetCachedClassContents(classlocation, class_name) " {{{
if getftime(classstructure.file) != classstructure.mtime
let valid = 0
" we could break here, but the time required for checking probably worth
" the the memory we can free by checking every file in the cached hirearchy
" the the memory we can free by checking every file in the cached hierarchy
call phpcomplete#ClearCachedClassContents(classstructure.file)
endif
endfor
@@ -2032,7 +2032,7 @@ function! phpcomplete#GetCachedClassContents(classlocation, class_name) " {{{
call remove(s:cache_classstructures, cache_key)
call phpcomplete#ClearCachedClassContents(full_file_path)
" fall trough for the read from files path
" fall through for the read from files path
endif
else
call phpcomplete#ClearCachedClassContents(full_file_path)
@@ -2141,7 +2141,7 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
let l = lnum
let search_line = trait_line
" add lines from the file until theres no ';' in them
" add lines from the file until there's no ';' in them
while search_line !~? ';' && l > 0
" file lines are reversed so we need to go backwards
let l += 1
@@ -2573,7 +2573,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
let search_line = line
let use_line = line
" add lines from the file until theres no ';' in them
" add lines from the file until there's no ';' in them
while search_line !~? ';' && l > 0
" file lines are reversed so we need to go backwards
let l -= 1
@@ -2605,7 +2605,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
" find kind flags from tags or built in methods for the objects we extracted
" they can be either classes, interfaces or namespaces, no other thing is importable in php
for [key, import] in items(imports)
" if theres a \ in the name we have it's definitely not a built in thing, look for tags
" if there's a \ in the name we have it's definitely not a built in thing, look for tags
if import.name =~ '\\'
let patched_ctags_detected = 0
let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {})
@@ -2662,10 +2662,10 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
let import['kind'] = 'i'
let import['builtin'] = 1
else
" or can be a tag with exactly matchign name
" or can be a tag with exactly matching name
let tags = phpcomplete#GetTaglist('^'.import['name'].'$')
for tag in tags
" search for the first matchin namespace, class, interface with no namespace
" search for the first matching namespace, class, interface with no namespace
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't')
call extend(import, tag)
let import['builtin'] = 0
@@ -2883,7 +2883,7 @@ for [ext, data] in items(php_builtin['functions'])
call extend(g:php_builtin_functions, data)
endfor
" Built in classs
" Built in class
let g:php_builtin_classes = {}
for [ext, data] in items(php_builtin['classes'])
call extend(g:php_builtin_classes, data)
@@ -2901,10 +2901,10 @@ for [ext, data] in items(php_builtin['constants'])
call extend(g:php_constants, data)
endfor
" When the classname not found or found but the tags dosen't contain that
" class we will try to complate any method of any builtin class. To speed up
" When the classname not found or found but the tags doesn't contain that
" class we will try to complete any method of any builtin class. To speed up
" that lookup we compile a 'ClassName::MethodName':'info' dictionary from the
" builtin class informations
" builtin class information
let g:php_builtin_object_functions = {}
" When completing for 'everyting imaginable' (no class context, not a

View File

@@ -173,7 +173,7 @@ class Completer(object):
pass
if len(arg_text) == 0:
# The doc string sometimes contains the function signature
# this works for alot of C modules that are part of the
# this works for a lot of C modules that are part of the
# standard library
doc = func_obj.__doc__
if doc:

View File

@@ -191,7 +191,7 @@ class Completer(object):
pass
if len(arg_text) == 0:
# The doc string sometimes contains the function signature
# this works for alot of C modules that are part of the
# this works for a lot of C modules that are part of the
# standard library
doc = func_obj.__doc__
if doc:

View File

@@ -17,7 +17,7 @@
" and complete it.
"
" Version 16.0 (Dec 2015)
" - NF: If reseting the cache and table, procedure or view completion
" - NF: If resetting the cache and table, procedure or view completion
" had been used via dbext, have dbext delete or recreate the
" dictionary so that new objects are picked up for the
" next completion.
@@ -554,7 +554,7 @@ function! sqlcomplete#PreCacheSyntax(...)
let syn_group_arr = g:omni_sql_precache_syntax_groups
endif
" For each group specified in the list, precache all
" the sytnax items.
" the syntax items.
if !empty(syn_group_arr)
for group_name in syn_group_arr
let syn_items = extend( syn_items, s:SQLCGetSyntaxList(group_name) )
@@ -577,7 +577,7 @@ function! sqlcomplete#ResetCacheSyntax(...)
let syn_group_arr = g:omni_sql_precache_syntax_groups
endif
" For each group specified in the list, precache all
" the sytnax items.
" the syntax items.
if !empty(syn_group_arr)
for group_name in syn_group_arr
let list_idx = index(s:syn_list, group_name, 0, &ignorecase)
@@ -617,7 +617,7 @@ function! sqlcomplete#DrillIntoTable()
else
" If the popup is not visible, simple perform the normal
" key behaviour.
" Must use exec since they key must be preceeded by "\"
" Must use exec since the key must be preceded by "\"
" or feedkeys will simply push each character of the string
" rather than the "key press".
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")'
@@ -634,7 +634,7 @@ function! sqlcomplete#DrillOutOfColumns()
else
" If the popup is not visible, simple perform the normal
" key behaviour.
" Must use exec since they key must be preceeded by "\"
" Must use exec since the key must be preceded by "\"
" or feedkeys will simply push each character of the string
" rather than the "key press".
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")'
@@ -843,7 +843,7 @@ function! s:SQLCGetColumns(table_name, list_type)
let curline = line(".")
let curcol = col(".")
" Do not let searchs wrap
" Do not let searches wrap
setlocal nowrapscan
" If . was entered, look at the word just before the .
" We are looking for something like this:
@@ -863,7 +863,7 @@ function! s:SQLCGetColumns(table_name, list_type)
" Search forward until one of the following:
" 1. Another select/update/delete statement
" 2. A ; at the end of a line (the delimiter)
" 3. The end of the file (incase no delimiter)
" 3. The end of the file (in case no delimiter)
" Yank the visually selected text into the "y register.
exec 'silent! normal! vl/\c\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy'

View File

@@ -778,7 +778,7 @@ fun! tar#Vimuntar(...)
elseif executable("gzip")
silent exe "!gzip -d ".shellescape(tartail)
else
echoerr "unable to decompress<".tartail."> on this sytem"
echoerr "unable to decompress<".tartail."> on this system"
if simplify(curdir) != simplify(tarhome)
" remove decompressed tarball, restore directory
" call Decho("delete(".tartail.".tar)")

View File

@@ -693,7 +693,7 @@ func! tohtml#GetUserSettings() "{{{
let user_settings = {}
" Define the correct option if the old option name exists and we haven't
" already defined the correct one. Maybe I'll put out a warnig message about
" already defined the correct one. Maybe I'll put out a warning message about
" this sometime and remove the old option entirely at some even later time,
" but for now just silently accept the old option.
if exists('g:use_xhtml') && !exists("g:html_use_xhtml")

View File

@@ -199,7 +199,7 @@ function! xmlcomplete#CompleteTags(findstart, base)
" 1. Events attributes
if context =~ '\s'
" If attr contains =\s*[\"'] we catched value of attribute
" If attr contains =\s*[\"'] we catch value of attribute
if attr =~ "=\s*[\"']" || attr =~ "=\s*$"
" Let do attribute specific completion
let attrname = matchstr(attr, '.*\ze\s*=')

View File

@@ -81,7 +81,7 @@ fun! zip#Browse(zipfile)
" sanity checks
if !exists("*fnameescape")
if &verbose > 1
echoerr "the zip plugin is not available (your vim doens't support fnameescape())"
echoerr "the zip plugin is not available (your vim doesn't support fnameescape())"
endif
return
endif

View File

@@ -12,6 +12,6 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
" NOTE: compiler must be runned with -vb to write whole source path, not only file
" NOTE: compiler must be run with -vb to write whole source path, not only file
" name.
CompilerSet errorformat=%f(%l\\,%c)\ %m

View File

@@ -18,7 +18,7 @@ endif
if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') ||
\(!filereadable('Makefile') && !filereadable('makefile'))
" If buffer-local variable 'tex_flavor' exists, it defines TeX flavor,
" otherwize the same for global variable with same name, else it will be
" otherwise the same for global variable with same name, else it will be
" LaTeX
if exists("b:tex_flavor")
let current_compiler = b:tex_flavor

View File

@@ -366,6 +366,8 @@ Name triggered by ~
|InsertCharPre| when a character was typed in Insert mode, before
inserting it
|ModeChanged| after changing the mode
|TextChanged| after a change was made to the text in Normal mode
|TextChangedI| after a change was made to the text in Insert mode
when popup menu is not visible
@@ -925,7 +927,22 @@ MenuPopup Just before showing the popup menu (under the
i Insert
c Command line
tl Terminal
*OptionSet*
*ModeChanged*
ModeChanged After changing the mode. The pattern is
matched against `'old_mode:new_mode'`, for
example match against `i:*` to simulate
|InsertLeave|.
The following values of |v:event| are set:
old_mode The mode before it changed.
new_mode The new mode as also returned
by |mode()|.
When ModeChanged is triggered, old_mode will
have the value of new_mode when the event was
last triggered.
Usage example to use relative line numbers
when entering visual mode: >
:autocmd ModeChanged *:v set relativenumber
< *OptionSet*
OptionSet After setting an option. The pattern is
matched against the long option name.
|<amatch>| indicates what option has been set.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2021 Aug 16
*eval.txt* For Vim version 8.2. Last change: 2021 Sep 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2469,6 +2469,7 @@ atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
balloon_gettext() String current text in the balloon
balloon_show({expr}) none show {expr} inside the balloon
balloon_split({msg}) List split {msg} as used for a balloon
blob2list({blob}) List convert {blob} into a list of numbers
browse({save}, {title}, {initdir}, {default})
String put up a file requester
browsedir({title}, {initdir}) String put up a directory requester
@@ -2721,7 +2722,8 @@ libcallnr({lib}, {func}, {arg}) Number idem, but return a Number
line({expr} [, {winid}]) Number line nr of cursor, last line or mark
line2byte({lnum}) Number byte count of line {lnum}
lispindent({lnum}) Number Lisp indent for line {lnum}
list2str({list} [, {utf8}]) String turn numbers in {list} into a String
list2blob({list}) Blob turn {list} of numbers into a Blob
list2str({list} [, {utf8}]) String turn {list} of numbers into a String
listener_add({callback} [, {buf}])
Number add a callback to listen to changes
listener_flush([{buf}]) none invoke listener callbacks
@@ -3355,6 +3357,17 @@ balloon_split({msg}) *balloon_split()*
< {only available when compiled with the |+balloon_eval_term|
feature}
blob2list({blob}) *blob2list()*
Return a List containing the number value of each byte in Blob
{blob}. Examples: >
blob2list(0z0102.0304) returns [1, 2, 3, 4]
blob2list(0z) returns []
< Returns an empty List on error. |list2blob()| does the
opposite.
Can also be used as a |method|: >
GetBlob()->blob2list()
*browse()*
browse({save}, {title}, {initdir}, {default})
Put up a file requester. This only works when "has("browse")"
@@ -4864,14 +4877,17 @@ finddir({name} [, {path} [, {count}]]) *finddir()*
Find directory {name} in {path}. Supports both downwards and
upwards recursive directory searches. See |file-searching|
for the syntax of {path}.
Returns the path of the first found match. When the found
directory is below the current directory a relative path is
returned. Otherwise a full path is returned.
If {path} is omitted or empty then 'path' is used.
If the optional {count} is given, find {count}'s occurrence of
{name} in {path} instead of the first one.
When {count} is negative return all the matches in a |List|.
This is quite similar to the ex-command |:find|.
This is quite similar to the ex-command `:find`.
{only available when compiled with the |+file_in_path|
feature}
@@ -5094,7 +5110,7 @@ fullcommand({name}) *fullcommand()*
The string argument {name} may start with a `:` and can
include a [range], these are skipped and not returned.
Returns an empty string if a command doesn't exist or if it's
ambiguous (for user-defined functions).
ambiguous (for user-defined commands).
For example `fullcommand('s')`, `fullcommand('sub')`,
`fullcommand(':%substitute')` all return "substitute".
@@ -7205,6 +7221,19 @@ lispindent({lnum}) *lispindent()*
Can also be used as a |method|: >
GetLnum()->lispindent()
list2blob({list}) *list2blob()*
Return a Blob concatenating all the number values in {list}.
Examples: >
list2blob([1, 2, 3, 4]) returns 0z01020304
list2blob([]) returns 0z
< Returns an empty Blob on error. If one of the numbers is
negative or more than 255 error *E1239* is given.
|blob2list()| does the opposite.
Can also be used as a |method|: >
GetList()->list2blob()
list2str({list} [, {utf8}]) *list2str()*
Convert each number in {list} to a character string can
concatenate them all. Examples: >

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2021 Aug 27
*index.txt* For Vim version 8.2. Last change: 2021 Aug 31
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.2. Last change: 2021 Aug 27
*insert.txt* For Vim version 8.2. Last change: 2021 Aug 31
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1368,6 +1368,10 @@ See |:verbose-cmd| for more information.
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
Delete the user-defined command {cmd}.
:delc[ommand] -buffer {cmd} *E1237*
Delete the user-defined command {cmd} that was defined
for the current buffer.
:comc[lear] *:comc* *:comclear*
Delete all user-defined commands.

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2021 Aug 28
*options.txt* For Vim version 8.2. Last change: 2021 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4939,16 +4939,25 @@ A jump table for the options with a short description can be found at |Q_op|.
*lcs-space*
space:c Character to show for a space. When omitted, spaces
are left blank.
*lcs-multispace*
multispace:c...
One or more characters to use cyclically to show for
multiple consecutive spaces. Overrides the "space"
setting, except for single spaces. When omitted, the
"space" setting is used. For example,
`:set listchars=multispace:---+` shows ten consecutive
spaces as:
---+---+--
*lcs-lead*
lead:c Character to show for leading spaces. When omitted,
leading spaces are blank. Overrides the "space"
setting for leading spaces. You can combine it with
"tab:", for example: >
leading spaces are blank. Overrides the "space" and
"multispace" settings 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.
trailing spaces are blank. Overrides the "space" and
"multispace" settings for trailing spaces.
*lcs-extends*
extends:c Character to show in the last column, when 'wrap' is
off and the line continues beyond the right of the
@@ -7176,6 +7185,8 @@ A jump table for the options with a short description can be found at |Q_op|.
If the name "cjk" is included East Asian characters are excluded from
spell checking. This is useful when editing text that also has Asian
words.
Note that the "medical" dictionary does not exist, it is just an
example of a longer name.
*E757*
As a special case the name of a .spl file can be given as-is. The
first "_xx" in the name is removed and used as the region name

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2021 Jun 27
*repeat.txt* For Vim version 8.2. Last change: 2021 Sep 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -893,8 +893,12 @@ DEFINING BREAKPOINTS
Sets a breakpoint, that will break whenever the {expression}
evaluates to a different value. Example: >
:breakadd expr g:lnum
< Will break, whenever the global variable lnum changes.
Errors in evaluation are suppressed, you can use the name of a
variable that does not exist yet. This also means you will
not notice anything if the expression has a mistake.
Note if you watch a |script-variable| this will break
when switching scripts, since the script variable is only
valid in the script where it has been defined and if that

View File

@@ -2321,6 +2321,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:cope quickfix.txt /*:cope*
:copen quickfix.txt /*:copen*
:copy change.txt /*:copy*
:count_quit windows.txt /*:count_quit*
:cp quickfix.txt /*:cp*
:cpf quickfix.txt /*:cpf*
:cpfile quickfix.txt /*:cpfile*
@@ -3502,6 +3503,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:y change.txt /*:y*
:yank change.txt /*:yank*
:z various.txt /*:z*
:z! various.txt /*:z!*
:z# various.txt /*:z#*
:~ change.txt /*:~*
; motion.txt /*;*
@@ -5920,6 +5922,7 @@ compl-keyword insert.txt /*compl-keyword*
compl-omni insert.txt /*compl-omni*
compl-omni-filetypes insert.txt /*compl-omni-filetypes*
compl-spelling insert.txt /*compl-spelling*
compl-stop insert.txt /*compl-stop*
compl-tag insert.txt /*compl-tag*
compl-vim insert.txt /*compl-vim*
compl-whole-line insert.txt /*compl-whole-line*
@@ -7479,6 +7482,7 @@ i_CTRL-X_CTRL-T insert.txt /*i_CTRL-X_CTRL-T*
i_CTRL-X_CTRL-U insert.txt /*i_CTRL-X_CTRL-U*
i_CTRL-X_CTRL-V insert.txt /*i_CTRL-X_CTRL-V*
i_CTRL-X_CTRL-Y insert.txt /*i_CTRL-X_CTRL-Y*
i_CTRL-X_CTRL-Z insert.txt /*i_CTRL-X_CTRL-Z*
i_CTRL-X_CTRL-] insert.txt /*i_CTRL-X_CTRL-]*
i_CTRL-X_index index.txt /*i_CTRL-X_index*
i_CTRL-X_s insert.txt /*i_CTRL-X_s*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2021 Aug 25
*todo.txt* For Vim version 8.2. Last change: 2021 Sep 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,13 +38,15 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
:delcommand -buffer should work
Vim9 - Make everything work:
- Disallow using numbered function with "g:123" in Vim9 script? #8760
- use CheckLegacyAndVim9Success(lines) in many more places
- Check TODO items in vim9compile.c and vim9execute.c
- For builtin functions using tv_get_string*() use check_for_string() to be
more strict about the argument type (not a bool).
done: balloon_()
- Disallow using numbered function with "g:123" in Vim9 script? #8760
- Check many more builtin function arguments at compile time.
map() could check that the return type of the function argument matches
the type of the list or dict member. (#8092)
@@ -223,6 +225,9 @@ Need to handle extra bytes.
Test_communicate_ipv6(): is flaky on many systems
Fails in line 64 of Ch_communicate, no exception is thrown.
Patch for Template string: #4634
Have another look at the implementation.
Rename getdigraphlist -> digraph_getlist() etc.
Valgrind reports memory leaks in test_options.
@@ -259,9 +264,6 @@ Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Also see #8487 for an example.
Patch for Template string: #4634
Have another look at the implementation.
Patch to implement the vimtutor with a plugin: #6414
Was originally written by Felipe Morales.
@@ -1039,6 +1041,9 @@ matchit hasn't been maintained for a long time. #955.
Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
'delcombine' does not work for the command line. (Tony Mechelynck, 2009 Jul
20)
MS-Windows: buffer completion doesn't work when using backslash (or slash)
for a path separator. (xtal8, #2201)
@@ -2300,9 +2305,6 @@ for GTK clipboard. Avoid requirement for iconv.
Now that colnr_T is int instead of unsigned, more type casts can be removed.
'delcombine' does not work for the command line. (Tony Mechelynck, 2009 Jul
20)
Don't load macmap.vim on startup, turn it into a plugin. (Ron Aaron,
2009 Apr 7) Reminder Apr 14.

View File

@@ -723,6 +723,10 @@ Floating point computation: *float-functions*
isinf() check for infinity
isnan() check for not a number
Blob manipulation: *blob-functions*
blob2list() get a list of numbers from a blob
list2blob() get a blob from a list of numbers
Other computation: *bitwise-function*
and() bitwise AND
invert() bitwise invert
@@ -1449,6 +1453,8 @@ is a List with arguments.
Function references are most useful in combination with a Dictionary, as is
explained in the next section.
More information about defining your own functions here: |user-functions|.
==============================================================================
*41.8* Lists and Dictionaries

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2021 Mar 23
*various.txt* For Vim version 8.2. Last change: 2021 Sep 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -170,7 +170,7 @@ g8 Print the hex values of the bytes used in the
If the mark is "=", a line of dashes is printed
around the current line.
*:z!
*:z!*
:[range]z![+-^.=][count]
Like ":z:", but when [count] is not specified, it
defaults to the Vim window height minus one.

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2021 Aug 23
*vim9.txt* For Vim version 8.2. Last change: 2021 Sep 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1416,11 +1416,10 @@ In case the name is ambiguous, another name can be specified: >
To import all exported items under a specific identifier: >
import * as That from 'thatscript.vim'
{not implemented yet: using "This as That"}
Then you can use "That.EXPORTED_CONST", "That.someValue", etc. You are free
to choose the name "That", but it is highly recommended to use the name of the
script file to avoid confusion.
script file to avoid confusion. Also avoid command names, because the name
will shadow them.
`:import` can also be used in legacy Vim script. The imported items still
become script-local, even when the "s:" prefix is not given.

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.2. Last change: 2021 Apr 10
*windows.txt* For Vim version 8.2. Last change: 2021 Sep 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -296,7 +296,7 @@ Closing a window
----------------
:q[uit]
:{count}q[uit]
:{count}q[uit] *:count_quit*
CTRL-W q *CTRL-W_q*
CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
Without {count}: Quit the current window. If {count} is
@@ -390,7 +390,8 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
CTRL-W o *CTRL-W_o* *E445*
CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only*
Make the current window the only one on the screen. All other
windows are closed. For {count} see |:quit| command.
windows are closed. For {count} see the `:quit` command
above |:count_quit|.
When the 'hidden' option is set, all buffers in closed windows
become hidden.

View File

@@ -1400,7 +1400,7 @@ au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
" Radiance
au BufNewFile,BufRead *.rad,*.mat setf radiance
" Raku (formelly Perl6)
" Raku (formerly Perl6)
au BufNewFile,BufRead *.pm6,*.p6,*.t6,*.pod6,*.raku,*.rakumod,*.rakudoc,*.rakutest setf raku
" Ratpoison config/command files

View File

@@ -1,5 +1,5 @@
" Vim filetype plugin file
" Language: Configuration File (ini file) for MSDOS/MS Windows
" Language: Configuration File (ini file) for MS-DOS/MS Windows
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: matlab
" Maintainer: Jake Wasserman <jwasserman at gmail dot com>
" Last Change: 2019 Sep 27
" Update By: Gabriel Dupras
" Last Change: 2021 Aug 30
" Contributors:
" Charles Campbell
@@ -15,9 +16,9 @@ let s:save_cpo = &cpo
set cpo-=C
if exists("loaded_matchit")
let s:conditionalEnd = '\%(([^()]*\)\@!\<end\>\%([^()]*)\)\@!'
let s:conditionalEnd = '\%(\%(^\|;\)\s*\)\@<=end\>'
let b:match_words=
\ '\<\%(if\|switch\|for\|while\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\)\>:'.s:conditionalEnd.','.
\ '\<\%(if\|switch\|for\|while\|try\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\|catch\)\>:' . s:conditionalEnd . ',' .
\ '\<function\>:\<return\>:\<endfunction\>'
unlet s:conditionalEnd
endif

View File

@@ -371,7 +371,7 @@ endfunction
endif
else
let annot_file_name = ''
"(Pierre Vittet: I have commented 4b because this was chrashing
"(Pierre Vittet: I have commented 4b because this was crashing
"my vim (it produced infinite loop))
"
" 4b. anarchy : the renamed _build directory may be higher in the hierarchy
@@ -462,8 +462,8 @@ endfunction
"b. 'search' and 'match' work to find the type information
"In: - lin1,col1: postion of expression first char
" - lin2,col2: postion of expression last char
"In: - lin1,col1: position of expression first char
" - lin2,col2: position of expression last char
"Out: - the pattern to be looked for to find the block
" Must be called in the source buffer (use of line2byte)
function! s:Block_pattern(lin1,lin2,col1,col2)
@@ -581,7 +581,7 @@ endfunction
let res = substitute (a:res, "\n", "", "g" )
"remove double space
let res =substitute(res , " ", " ", "g")
"remove space at begining of string.
"remove space at beginning of string.
let res = substitute(res, "^ *", "", "g")
return res
endfunction

View File

@@ -0,0 +1,63 @@
" Vim filetype plugin file
" Language: GNU Octave
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Sep 02
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
" TODO: update Matlab ftplugin and source it as the base file?
setlocal comments=s:%{,m:\ ,e:%},s:#{,m:\ ,e:#},:%,:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal keywordprg=info\ octave\ --vi-keys\ --index-search
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words = '\<unwind_protect\>:\<unwind_protect_cleanup\>:\<end_unwind_protect\>'
if exists("octave_use_matlab_end")
let b:match_words ..= ',' ..
\ '\<\%(classdef\|enumeration\|events\|for\|function\|if\|methods\|parfor\|properties\|switch\|while\|try\)\>' ..
\ ':' ..
\ '\<\%(elseif\|else\|case\|otherwise\|break\|continue\|catch\)\>' ..
\ ':' ..
\ '\<end\>'
else
let b:match_words ..= ',' ..
\ '\<classdef\>:\<endclassdef\>,' ..
\ '\<enumeration\>:\<endenumeration\>,' ..
\ '\<events\>:\<endevents\>,' ..
\ '\<do\>:\<\%(break\|continue\)\>:\<until\>' ..
\ '\<for\>:\<\%(break\|continue\)\>:\<endfor\>,' ..
\ '\<function\>:\<return\>:\<endfunction\>,' ..
\ '\<if\>:\<\%(elseif\|else\)\>:\<endif\>,' ..
\ '\<methods\>:\<endmethods\>,' ..
\ '\<parfor\>:\<endparfor\>,' ..
\ '\<properties\>:\<endproperties\>,' ..
\ '\<switch\>:\<\%(case\|otherwise\)\>:\<endswitch\>,' ..
\ '\<while\>:\<\%(break\|continue\)\>:\<endwhile\>,' ..
\ '\<try\>:\<catch\>:\<end_try_catch\>'
endif
" only match in statement position
let s:statement_start = escape('\%(\%(^\|;\)\s*\)\@<=', '\')
let b:match_words = substitute(b:match_words, '\\<', s:statement_start, 'g')
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "GNU Octave Source Files (*.m)\t*.m\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl com< cms< fo< kp< " ..
\ "| unlet! b:browsefilter b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@@ -32,7 +32,7 @@ if exists("loaded_matchit")
\ '\<checker\>:\<endchecker\>,' .
\ '\<class\>:\<endclass\>,' .
\ '\<clocking\>:\<endclocking\>,' .
\ '\<gruop\>:\<endgruop\>,' .
\ '\<group\>:\<endgroup\>,' .
\ '\<interface\>:\<endinterface\>,' .
\ '\<package\>:\<endpackage\>,' .
\ '\<program\>:\<endprogram\>,' .

View File

@@ -28,7 +28,7 @@ let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font'
" Tell Vim how to recognize LaTeX \include{foo} and plain \input bar :
let &l:include .= '\|\\include{'
" On some file systems, "{" and "}" are inluded in 'isfname'. In case the
" On some file systems, "{" and "}" are included in 'isfname'. In case the
" TeX file has \include{fname} (LaTeX only), strip everything except "fname".
let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')"

View File

@@ -219,7 +219,7 @@ function GetAdaIndent()
" Move indent in twice (next 'when' will move back)
let ind = ind + 2 * shiftwidth()
elseif line =~ '^\s*end\s*record\>'
" Move indent back to tallying 'type' preceeding the 'record'.
" Move indent back to tallying 'type' preceding the 'record'.
" Allow indent to be equal to 'end record's.
let ind = s:MainBlockIndent( ind+shiftwidth(), lnum, 'type\>', '' )
elseif line =~ '\(^\s*new\>.*\)\@<!)\s*[;,]\s*$'

View File

@@ -16,8 +16,8 @@ if exists("*CdlGetIndent")
"finish
endif
" find out if an "...=..." expresion is an assignment (or a conditional)
" it scans 'line' first, and then the previos lines
" find out if an "...=..." expression is an assignment (or a conditional)
" it scans 'line' first, and then the previous lines
fun! CdlAsignment(lnum, line)
let f = -1
let lnum = a:lnum
@@ -33,7 +33,7 @@ fun! CdlAsignment(lnum, line)
endif
" it's formula if there's a ';', 'elsE', 'theN', 'enDif' or 'expr'
" conditional if there's a '<', '>', 'elseif', 'if', 'and', 'or', 'not',
" 'memberis', 'childrenof' and other \k\+of funcions
" 'memberis', 'childrenof' and other \k\+of functions
let f = line[inicio-1] =~? '[en;]' || strpart(line, inicio-4, 4) =~? 'ndif\|expr'
endw
let lnum = prevnonblank(lnum-1)
@@ -106,7 +106,7 @@ fun! CdlGetIndent(lnum)
elseif c == '(' || c ==? 'f' " '(' or 'if'
let ind = ind + shiftwidth()
else " c == '='
" if it is an asignment increase indent
" if it is an assignment increase indent
if f == -1 " we don't know yet, find out
let f = CdlAsignment(lnum, strpart(line, 0, inicio))
end
@@ -117,11 +117,11 @@ fun! CdlGetIndent(lnum)
endw
" CURRENT LINE, if it starts with a closing element, decrease indent
" or if it starts with '=' (asignment), increase indent
" or if it starts with '=' (assignment), increase indent
if match(thisline, '^\c\s*\(else\|then\|endif\|[);]\)') >= 0
let ind = ind - shiftwidth()
elseif match(thisline, '^\s*=') >= 0
if f == -1 " we don't know yet if is an asignment, find out
if f == -1 " we don't know yet if is an assignment, find out
let f = CdlAsignment(lnum, "")
end
if f == 1 " formula increase it

View File

@@ -62,8 +62,8 @@ function GetConfigIndent()
let ind = s:GetOffsetOf(line, '\[')
endif
" if previous line had an unmatched closing parantheses,
" indent to the matching opening parantheses
" if previous line had an unmatched closing parentheses,
" indent to the matching opening parentheses
if line =~ '[^(]\+\\\@<!)$'
call search(')', 'bW')
let lnum = searchpair('\\\@<!(', '', ')', 'bWn')

View File

@@ -119,16 +119,16 @@ function GetDTDIndent()
" Next comes the content model. If the token weve found isnt a
" parenthesis it must be either ANY, EMPTY or some random junk. Either
" way, were done indenting this element, so set it to that of the first
" line so that the terminating “>” winds up having the same indention.
" line so that the terminating “>” winds up having the same indentation.
if token != '('
return indent
endif
" Now go through the content model. We need to keep track of the nesting
" of parentheses. As soon as we hit 0 were done. If that happens we must
" have a complete content model. Thus set indention to be the same as that
" have a complete content model. Thus set indentation to be the same as that
" of the first line so that the terminating “>” winds up having the same
" indention. Otherwise, well indent to the innermost parentheses not yet
" indentation. Otherwise, well indent to the innermost parentheses not yet
" matched.
let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end)
if indent_of_innermost != -1

View File

@@ -57,7 +57,7 @@ endfunction
" ======================
" Indtokens are "indentation tokens". See their exact format in the
" documentaiton of the s:GetTokensFromLine function.
" documentation of the s:GetTokensFromLine function.
" Purpose:
" Calculate the new virtual column after the given segment of a line.
@@ -75,7 +75,7 @@ endfunction
" s:CalcVCol("\t'\tx', b", 1, 4, 4) -> 10
function! s:CalcVCol(line, first_index, last_index, vcol, tabstop)
" We copy the relevent segment of the line, otherwise if the line were
" We copy the relevant segment of the line, otherwise if the line were
" e.g. `"\t", term` then the else branch below would consume the `", term`
" part at once.
let line = a:line[a:first_index : a:last_index]
@@ -604,7 +604,7 @@ endfunction
function! s:BeginElementFoundIfEmpty(stack, token, curr_vcol, stored_vcol, sw)
if empty(a:stack)
if a:stored_vcol ==# -1
call s:Log(' "' . a:token . '" directly preceeds LTI -> return')
call s:Log(' "' . a:token . '" directly precedes LTI -> return')
return [1, a:curr_vcol + a:sw]
else
call s:Log(' "' . a:token .
@@ -825,7 +825,7 @@ function! s:ErlangCalcIndent2(lnum, stack)
if ret | return res | endif
if stored_vcol ==# -1
call s:Log(' End of clause directly preceeds LTI -> return')
call s:Log(' End of clause directly precedes LTI -> return')
return 0
else
call s:Log(' End of clause (but not end of line) -> return')

View File

@@ -1,6 +1,6 @@
" Vim indent file
" Language: JSON
" Mantainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json
" Maintainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json
" Last Change: 2020 Aug 30
" https://github.com/jakar/vim-json/commit/20b650e22aa750c4ab6a66aa646bdd95d7cd548a#diff-e81fc111b2052e306d126bd9989f7b7c
" Original Author: Rogerz Zhang <rogerz.zhang at gmail.com> http://github.com/rogerz/vim-json

View File

@@ -11,7 +11,7 @@ endif
let b:did_indent = 1
" LifeLines uses cindent without ; line terminator, C functions
" declarations, C keywords, C++ formating
" declarations, C keywords, C++ formatting
setlocal cindent
setlocal cinwords=""
setlocal cinoptions+=+0

View File

@@ -15,7 +15,7 @@ setlocal cindent
" Set the function to do the work.
setlocal indentexpr=GetObjCIndent()
" To make a colon (:) suggest an indentation other than a goto/swich label,
" To make a colon (:) suggest an indentation other than a goto/switch label,
setlocal indentkeys-=:
setlocal indentkeys+=<:>

View File

@@ -44,7 +44,7 @@ function GetPoVRayIndent()
return -1
endif
" Search backwards for the frist non-empty, non-comment line.
" Search backwards for the first non-empty, non-comment line.
let plnum = prevnonblank(v:lnum - 1)
let plind = indent(plnum)
while plnum > 0 && synIDattr(synID(plnum, plind+1, 0), "name") =~? "comment"

View File

@@ -265,7 +265,7 @@ function! GetRubyIndent(...) abort
\ ]
" Most Significant line based on the previous one -- in case it's a
" contination of something above
" continuation of something above
let indent_info.plnum_msl = s:GetMSL(indent_info.plnum)
for callback_name in indent_callback_names

View File

@@ -9,7 +9,7 @@
" Notes:
" Indenting keywords are based on Oracle and Sybase Adaptive Server
" Anywhere (ASA). Test indenting was done with ASA stored procedures and
" fuctions and Oracle packages which contain stored procedures and
" functions and Oracle packages which contain stored procedures and
" functions.
" This has not been tested against Microsoft SQL Server or
" Sybase Adaptive Server Enterprise (ASE) which use the Transact-SQL

View File

@@ -64,7 +64,7 @@ function SystemVerilogIndent()
let vverb = 0
endif
" Indent accoding to last line
" Indent according to last line
" End of multiple-line comment
if last_line =~ '\*/\s*$' && last_line !~ '/\*.\{-}\*/'
let ind = ind - offset_comment1
@@ -220,7 +220,7 @@ function SystemVerilogIndent()
endif
" Return the indention
" Return the indentation
return ind
endfunction

View File

@@ -288,7 +288,7 @@ function! GetTeXIndent() " {{{
let ind = ind - shiftwidth()
let stay = 0
endif
" lines following to '\item' are intented once again:
" lines following to '\item' are indented once again:
if line =~ g:tex_items
let ind = ind + shiftwidth()
let stay = 0

View File

@@ -34,5 +34,5 @@ function GetTreetopIndent()
let ind -= shiftwidth()
end
retur ind
return ind
endfunction

View File

@@ -460,7 +460,7 @@ function! Fixedgq(lnum, count)
return 1
endif
" Put all the lines on one line and do normal spliting after that
" Put all the lines on one line and do normal splitting after that
if l:count > 1
while l:count > 1
let l:count -= 1

View File

@@ -76,7 +76,7 @@ function GetVerilogIndent()
let vverb = 0
endif
" Indent accoding to last line
" Indent according to last line
" End of multiple-line comment
if last_line =~ '\*/\s*$' && last_line !~ '/\*.\{-}\*/'
let ind = ind - offset_comment1
@@ -219,7 +219,7 @@ function GetVerilogIndent()
endif
" Return the indention
" Return the indentation
return ind
endfunction

View File

@@ -364,7 +364,7 @@ ppu っぷ
ppe っぺ
ppo っぽ
" Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo'
" Preceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo'
kkya っきゃ
kkyu っきゅ
kkyo っきょ
@@ -683,7 +683,7 @@ PPU ップ
PPE ッペ
PPO ッポ
" Proceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo'
" Preceded by a small `tu' and followed by a small 'ya', 'yu' or 'yo'
KKYA ッキャ
KKYU ッキュ
KKYO ッキョ

View File

@@ -10,7 +10,7 @@
" BUT, simply mapping each letter of Hangul with sequence of alphabet 1 by 1
" can fail to combine Hangul jamo (conconants and vowels) right.
" For example, sequentially pressing `ㅅㅓㅇㅜㄹㄷㅐㅎㅏㄱㅛ` can not only be
" combined as `서울대학교`, but alse `성ㅜㄹ댛ㅏㄱ교`, which is totally
" combined as `서울대학교`, but also `성ㅜㄹ댛ㅏㄱ교`, which is totally
" nonsense.
" Though combining Hangul is deterministic with law that each letter must be
" one of (consonant + vowel) or (consonant + vowel + consonant), there is no

View File

@@ -4,7 +4,7 @@
" Useful mainly with utf-8 but may work with other encodings
" Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru>
" Typewriter variant of standart russian layout
" Typewriter variant of standard russian layout
" Maintainer: Denis Proskurin <danwerspb@gmail.com>
" Last Changed: 2015 May 15

View File

@@ -106,7 +106,7 @@ loadkeymap
<char-0x005d> <char-0x044a> " CYRILLIC SMALL LETTER HARD SIGN
<char-0x007d> <char-0x042a> " CYRILLIC CAPITAL LETTER HARD SIGN
" ALPHABETIC 2st ROW
" ALPHABETIC 2nd ROW
<char-0x0061> <char-0x0444> " CYRILLIC SMALL LETTER EF
<char-0x0041> <char-0x0424> " CYRILLIC CAPITAL LETTER EF
@@ -131,7 +131,7 @@ loadkeymap
<char-0x0027> <char-0x044d> " CYRILLIC SMALL LETTER E
<char-0x0022> <char-0x042d> " CYRILLIC CAPITAL LETTER E
" ALPHABETIC 3st ROW
" ALPHABETIC 3rd ROW
<char-0x007a> <char-0x044f> " CYRILLIC SMALL LETTER YA
<char-0x005a> <char-0x042f> " CYRILLIC CAPITAL LETTER YA

View File

@@ -62,7 +62,7 @@ let g:loaded_2html_plugin = 'vim8.1_v2'
" 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using
" g:html_line_ids=0. Allow customizing
" important IDs (like line IDs and fold IDs) using
" g:html_id_expr evalutated when the buffer conversion
" g:html_id_expr evaluated when the buffer conversion
" is started.
" 7.3_v13 (Vim 7.3.1088): Keep foldmethod at manual in the generated file and
" insert modeline to set it to manual.

View File

@@ -499,7 +499,7 @@ if s:settings.prevent_copy =~# 'n'
endif
elseif s:settings.line_ids
" if lines are not being numbered the only reason this function gets called
" is to put the line IDs on each line; "text" will be emtpy but lnr will
" is to put the line IDs on each line; "text" will be empty but lnr will
" always be non-zero, however we don't want to use the <input> because that
" won't work as nice for empty text
function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr)
@@ -1034,7 +1034,7 @@ if !s:settings.no_progress
" ProgressBar Indicator
let s:progressbar={}
" Progessbar specific functions
" Progressbar specific functions
func! s:SetProgbarColor()
if hlID("TOhtmlProgress") != 0

View File

@@ -59,7 +59,7 @@ syn region abelSpecifier start='istype' end=';' contains=abelTypeIdChar,abelType
syn match abelTypeIdChar "[,']" contained
syn match abelTypeIdEnd ";" contained
" string contstants and special characters within them
" string constants and special characters within them
syn match abelSpecial contained "\\['\\]"
syn region abelString start=+'+ skip=+\\"+ end=+'+ contains=abelSpecial

View File

@@ -159,7 +159,7 @@ endif
" Section: end {{{1
" Unless special ("end loop", "end if", etc.), "end" marks the end of a
" begin, package, task etc. Assiging it to adaEnd.
" begin, package, task etc. Assigning it to adaEnd.
syntax match adaEnd /\<end\>/
syntax keyword adaPreproc pragma

View File

@@ -38,7 +38,7 @@ syn keyword ahdlMegafunction lpm_rom lpm_dff lpm_tff clklock pll ntsc
syn keyword ahdlTodo contained TODO
" String contstants
" String constants
syn region ahdlString start=+"+ skip=+\\"+ end=+"+
" valid integer number formats (decimal, binary, octal, hex)

View File

@@ -34,7 +34,7 @@ syn match AspVBSVariableComplex contained "\<\(arr\|ary\|obj\)\u\w*"
" Functions and methods that are in VB but will cause errors in an ASP page
" This is helpfull if your porting VB code to ASP
" This is helpful if your porting VB code to ASP
" I removed (Count, Item) because these are common variable names in AspVBScript
syn keyword AspVBSError contained Val Str CVar CVDate DoEvents GoSub Return GoTo
syn keyword AspVBSError contained Stop LinkExecute Add Type LinkPoke
@@ -56,7 +56,7 @@ syn match AspVBSError contained "\<Option\s\+\(Base\|Compare\|Private\s\+Module\
syn match AspVBSError contained "Respon\?ce\.\S*"
syn match AspVBSError contained "Respose\.\S*"
" When I looked up the VBScript syntax it mentioned that Property Get/Set/Let
" statements are illegal, however, I have recived reports that they do work.
" statements are illegal, however, I have received reports that they do work.
" So I commented it out for now.
" syn match AspVBSError contained "\<Property\s\+\(Get\|Let\|Set\)\>"
@@ -108,7 +108,7 @@ syn match AspVBSMethods contained "Response\.\w*"
" Colorize boolean constants:
syn keyword AspVBSMethods contained true false
" AspVBScript Number Contstants
" AspVBScript Number Constants
" Integer number, or floating point number without a dot.
syn match AspVBSNumber contained "\<\d\+\>"
" Floating point number, with dot
@@ -116,7 +116,7 @@ syn match AspVBSNumber contained "\<\d\+\.\d*\>"
" Floating point number, starting with a dot
syn match AspVBSNumber contained "\.\d\+\>"
" String and Character Contstants
" String and Character Constants
" removed (skip=+\\\\\|\\"+) because VB doesn't have backslash escaping in
" strings (or does it?)
syn region AspVBSString contained start=+"+ end=+"+ keepend
@@ -143,7 +143,7 @@ syn cluster AspVBScriptTop contains=AspVBSStatement,AspVBSFunction,AspVBSMethods
syn region AspVBSFold start="^\s*\(class\)\s\+.*$" end="^\s*end\s\+\(class\)\>.*$" fold contained transparent keepend
syn region AspVBSFold start="^\s*\(private\|public\)\=\(\s\+default\)\=\s\+\(sub\|function\)\s\+.*$" end="^\s*end\s\+\(function\|sub\)\>.*$" fold contained transparent keepend
" Define AspVBScript delimeters
" Define AspVBScript delimiters
" <%= func("string_with_%>_in_it") %> This is illegal in ASP syntax.
syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ end=+%>+ contains=@AspVBScriptTop, AspVBSFold
syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<script\s\+language="\=vbscript"\=[^>]*\s\+runatserver[^>]*>+ end=+</script>+ contains=@AspVBScriptTop

View File

@@ -32,7 +32,7 @@ syn match CfgComment "#.*"
syn match CfgComment ";.*"
syn match CfgComment "\/\/.*"
" Define the default hightlighting.
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link CfgOnOff Label
hi def link CfgComment Comment

View File

@@ -141,7 +141,7 @@ sy keyword cscBPMacro contained EndLoop AllMembers SelectedMembers If Else EndIf
sy match cscBPMacro contained "!"
sy match cscBPW "!\s*\a*" contains=cscBPmacro
" when wanted, highlighting lhs members or erros in asignments (may lag the editing)
" when wanted, highlighting lhs members or errors in assignments (may lag the editing)
if exists("csc_asignment")
sy match cscEqError '\("[^"]*"\s*\|[^][\t !%()*+,--/:;<=>{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)'
sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition

View File

@@ -23,7 +23,7 @@ syn keyword cuplTodo contained TODO XXX FIXME
" cuplHeaderContents uses default highlighting except for numbers
syn match cuplHeaderContents ".\+;"me=e-1 contains=cuplNumber contained
" String contstants
" String constants
syn region cuplString start=+'+ end=+'+
syn region cuplString start=+"+ end=+"+

View File

@@ -1,5 +1,5 @@
" Vim syntax file
" Language: MSDOS batch file (with NT command extensions)
" Language: MS-DOS batch file (with NT command extensions)
" Maintainer: Mike Williams <mrw@eandem.co.uk>
" Filenames: *.bat
" Last Change: 6th September 2009

View File

@@ -1,4 +1,4 @@
" DoxyGen syntax hilighting extension for c/c++/idl/java
" DoxyGen syntax highlighting extension for c/c++/idl/java
" Language: doxygen on top of c, cpp, idl, java, php
" Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net>
" Author: Michael Geddes
@@ -54,7 +54,7 @@ let s:cpo_save = &cpo
try
set cpo&vim
" Start of Doxygen syntax hilighting:
" Start of Doxygen syntax highlighting:
"
" C/C++ Style line comments
@@ -256,7 +256,7 @@ endif
syn match doxygenLinkRest +[^*@\\]\|\*/\@!\|[@\\]\(endlink\>\)\@!+ contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
syn match doxygenContinueLinkComment contained +^\s*\*\=[^/]+me=e-1 nextgroup=doxygenLinkRest
syn match doxygenLinkError "\*/" contained
" #Link hilighting.
" #Link highlighting.
syn match doxygenHashLink /\(\h\w*\)\?#\(\.\w\@=\|\w\+\|::\|()\)\+/ contained contains=doxygenHashSpecial
syn match doxygenHashSpecial /#/ contained
syn match doxygenHyperLink /\(\s\|^\s*\*\?\)\@<=\(http\|https\|ftp\):\/\/[-0-9a-zA-Z_?&=+#%/.!':;@~]\+/ contained
@@ -306,7 +306,7 @@ endif
syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\[+ end=+[@\\]f]+ contains=doxygenFormulaSpecial,doxygenFormulaOperator,doxygenAtom
syn region doxygenAtom contained transparent matchgroup=doxygenFormulaOperator start=+{+ end=+}+ contains=doxygenAtom,doxygenFormulaSpecial,doxygenFormulaOperator
" Add TODO hilighting.
" Add TODO highlighting.
syn keyword doxygenTODO contained TODO README XXX FIXME
" Supported HTML subset. Not perfect, but okay.

View File

@@ -8,7 +8,7 @@
" this is a very simple syntax file - I will be improving it
" one thing is how to do computes
" I don't like that &vars and FUSE() functions highlight to the same color
" I think some of these things should get different hilights -
" I think some of these things should get different highlights -
" should MODIFY commands look different than TABLE?
" quit when a syntax file was already loaded

View File

@@ -181,7 +181,7 @@ syn keyword forthMath DECIMAL HEX BASE
syn match forthInteger '\<-\=[0-9]\+.\=\>'
syn match forthInteger '\<&-\=[0-9]\+.\=\>'
" recognize hex and binary numbers, the '$' and '%' notation is for gforth
syn match forthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess
syn match forthInteger '\<\$\x*\x\+\>' " *1* --- don't mess
syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order!
syn match forthInteger '\<%[0-1]*[0-1]\+\>'
syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe]\d\+\>'

View File

@@ -9,7 +9,7 @@
" It allows the use of multiple news- and mailserver and combines them to one
" mail- and newsserver for the news/mail-client. It load faster than a normal
" newsreader because many threads can run simultaneous. It contains scorefile
" for news and mail, a build-in script language, the GUI allows translation to
" for news and mail, a built-in script language, the GUI allows translation to
" other languages, it can be used in a network and that's not all features...
"
" quit when a syntax file was already loaded

View File

@@ -7,7 +7,7 @@
" This is an experiment. IDL's structure is simple enough to permit a full
" grammar based approach to rather than using a few heuristics. The result
" is large and somewhat repetative but seems to work.
" is large and somewhat repetitive but seems to work.
" There are some Microsoft extensions to idl files that are here. Some of
" them are disabled by defining idl_no_ms_extensions.

View File

@@ -2,10 +2,10 @@
" Language: Inno Setup File (iss file) and My InnoSetup extension
" Maintainer: Jason Mills (jmills@cs.mun.ca)
" Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
" Last Change: 2019 Sep 27
" Last Change: 2021 Aug 30
"
" Todo:
" - The paramter String: is matched as flag string (because of case ignore).
" - The parameter String: is matched as flag string (because of case ignore).
" - Pascal scripting syntax is not recognized.
" - Embedded double quotes confuse string matches. e.g. "asfd""asfa"

View File

@@ -12,7 +12,7 @@
"
" let filetype_m="mma"
"
" I also recommend setting the default 'Comment' hilighting to something
" I also recommend setting the default 'Comment' highlighting to something
" other than the color used for 'Function', since both are plentiful in
" most mathematica files, and they are often the same color (when using
" background=dark).
@@ -109,7 +109,7 @@ syntax match mmaemPHAsis "\%(^\|\s\)(\@<!\*[a-zA-Z0-9]\+\%([- \t':]\+[a-zA-Z0-9]
syntax region mmaComment start=+(\*+ end=+\*)+ skipempty contains=@mmaNotes,mmaItem,@mmaCommentStrings,mmaemPHAsis,mmaComment
" Function Comments:
" just like a normal comment except the first sentance is Special ala Java
" just like a normal comment except the first sentence is Special ala Java
" (** *)
" TODO - fix this for nesting, or not...
syntax region mmaFunctionComment start="(\*\*\+" end="\*\+)" contains=@mmaNotes,mmaItem,mmaFunctionTitle,@mmaCommentStrings,mmaemPHAsis,mmaComment

View File

@@ -64,7 +64,7 @@ syn keyword objcStorageClass nullable nonnull null_unspecified
" ObjC type specifier
syn keyword objcTypeSpecifier __kindof __covariant
" ObjC Type Infomation Parameters
" ObjC Type Information Parameters
syn keyword objcTypeInfoParams ObjectType KeyType
" shorthand

View File

@@ -6,7 +6,7 @@
" URL: http://www.eandem.co.uk/mrw/vim
"
" Options Flags:
" postscr_level - language level to use for highligting (1, 2, or 3)
" postscr_level - language level to use for highlighting (1, 2, or 3)
" postscr_display - include display PS operators
" postscr_ghostscript - include GS extensions
" postscr_fonts - highlight standard font names (a lot for PS 3)
@@ -469,12 +469,12 @@ if postscr_level == 2 || postscr_level == 3
syn keyword postscrConstant contained SubsVector UnderlineThickness FamilyName FontBBox CurMID
syn keyword postscrConstant contained Weight
" PS2 User paramters
" PS2 User parameters
syn keyword postscrConstant contained MaxFontItem MinFontCompress MaxUPathItem MaxFormItem MaxPatternItem
syn keyword postscrConstant contained MaxScreenItem MaxOpStack MaxDictStack MaxExecStack MaxLocalVM
syn keyword postscrConstant contained VMReclaim VMThreshold
" PS2 System paramters
" PS2 System parameters
syn keyword postscrConstant contained SystemParamsPassword StartJobPassword BuildTime ByteOrder RealFormat
syn keyword postscrConstant contained MaxFontCache CurFontCache MaxOutlineCache CurOutlineCache
syn keyword postscrConstant contained MaxUPathCache CurUPathCache MaxFormCache CurFormCache
@@ -496,15 +496,15 @@ if postscr_level == 2 || postscr_level == 3
" Page duplexing operators
syn keyword postscrL2Operator duplexmode firstside newsheet setduplexmode settumble tumble
" Device compatability operators
" Device compatibility operators
syn keyword postscrL2Operator devdismount devformat devmount devstatus
syn keyword postscrL2Repeat devforall
" Imagesetter compatability operators
" Imagesetter compatibility operators
syn keyword postscrL2Operator accuratescreens checkscreen pagemargin pageparams setaccuratescreens setpage
syn keyword postscrL2Operator setpagemargin setpageparams
" Misc compatability operators
" Misc compatibility operators
syn keyword postscrL2Operator appletalktype buildtime byteorder checkpassword defaulttimeouts diskonline
syn keyword postscrL2Operator diskstatus manualfeed manualfeedtimeout margins mirrorprint pagecount
syn keyword postscrL2Operator pagestackorder printername processcolors sethardwareiomode setjobtimeout

View File

@@ -174,7 +174,7 @@ syn match sgmlAbbrEndTag +/+
" SGML specific
" abbreviated regions
"
" No highlighing, highlighing is done by contained elements.
" No highlighting, highlighting is done by contained elements.
"
" PROVIDES: @sgmlRegionHook
"
@@ -192,7 +192,7 @@ syn match sgmlAbbrRegion
" real (non-empty) elements. We cannot do syntax folding
" as in xml, because end tags may be optional in sgml depending
" on the dtd.
" No highlighing, highlighing is done by contained elements.
" No highlighting, highlighting is done by contained elements.
"
" PROVIDES: @sgmlRegionHook
"
@@ -225,7 +225,7 @@ syn region sgmlRegion
"
" <tag id="lola"/>
"
" TODO use sgmlEmptyTag intead of sgmlTag
" TODO use sgmlEmptyTag instead of sgmlTag
syn match sgmlEmptyRegion
\ +<[^ /!?>"']\(\_[^"'<>]\|"\_[^"]*"\|'\_[^']*'\)*/>+
\ contains=sgmlEmptyTag

View File

@@ -25,7 +25,7 @@ endif
let s:cpo_save = &cpo
set cpo&vim
" don't hightlight several keywords like subsections
" don't highlight several keywords like subsections
"let strict_subsections = 1
" highlight types usually found in DECLARE section
@@ -35,7 +35,7 @@ endif
" one line comment syntax (# comments)
" 1. allow appended code after comment, do not complain
" 2. show code beginnig with the second # as an error
" 2. show code beginning with the second # as an error
" 3. show whole lines with more than one # as an error
if !exists("oneline_comments")
let oneline_comments = 2
@@ -177,7 +177,7 @@ syn cluster spupOrdinary contains=spupNumber,spupIdentifier,spupSymbol
syn cluster spupOrdinary add=spupError,spupString,spupComment
syn cluster spupTextproc contains=spupTextprocGeneric,spupTextprocError
" define syncronizing; especially OPERATION sections can become very large
" define synchronizing; especially OPERATION sections can become very large
syn sync clear
syn sync minlines=100
syn sync maxlines=500

View File

@@ -44,7 +44,7 @@ syn match stCharacter "$."
syn case ignore
" the symols prefixed by a '#'
" the symbols prefixed by a '#'
syn match stSymbol "\(#\<[a-z_][a-z0-9_]*\>\)"
syn match stSymbol "\(#'[^']*'\)"
@@ -58,7 +58,7 @@ syn match stFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
syn case match
" a try to higlight paren mismatches
" a try to highlight paren mismatches
syn region stParen transparent start='(' end=')' contains=ALLBUT,stParenError
syn match stParenError ")"
syn region stBlock transparent start='\[' end='\]' contains=ALLBUT,stBlockError

View File

@@ -168,7 +168,7 @@ syn region tcltkCommand matchgroup=tcltkCommandColor start="\<format\>" matchgro
" PACK
" commands associated with pack
syn keyword tcltkPackSwitch contained forget info propogate slaves
syn keyword tcltkPackSwitch contained forget info propagate slaves
syn keyword tcltkPackConfSwitch contained after anchor before expand fill in ipadx ipady padx pady side
syn region tcltkCommand matchgroup=tcltkCommandColor start="\<pack\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkPackSwitch,tcltkPackConf,tcltkPackConfSwitch,tclNumber,tclVarRef,tclString,tcltkCommand keepend

View File

@@ -8,7 +8,7 @@ if exists("b:current_syntax")
finish
endif
" Explicitly change compatiblity options to Vim's defaults because this file
" Explicitly change compatibility options to Vim's defaults because this file
" uses line continuations.
let s:original_cpo = &cpo
set cpo&vim

8
src/auto/configure vendored
View File

@@ -12978,7 +12978,9 @@ if test "$enable_canberra" = "yes"; then
$as_echo_n "checking for libcanberra... " >&6; }
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $canberra_cflags"
if `echo "$CFLAGS" | grep -v "$canberra_cflags" >/dev/null`; then
CFLAGS="$CFLAGS $canberra_cflags"
fi
LIBS="$LIBS $canberra_lib"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14960,6 +14962,10 @@ $as_echo "no" >&6; }
fi
fi
if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
CFLAGS="$CFLAGS -D_REENTRANT"
fi
DEPEND_CFLAGS_FILTER=
if test "$GCC" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5

View File

@@ -150,6 +150,7 @@ static struct event_name
{"InsertLeavePre", EVENT_INSERTLEAVEPRE},
{"InsertCharPre", EVENT_INSERTCHARPRE},
{"MenuPopup", EVENT_MENUPOPUP},
{"ModeChanged", EVENT_MODECHANGED},
{"OptionSet", EVENT_OPTIONSET},
{"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST},
{"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE},
@@ -1817,6 +1818,17 @@ has_completechanged(void)
}
#endif
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Return TRUE when there is a ModeChanged autocommand defined.
*/
int
has_modechanged(void)
{
return (first_autopat[(int)EVENT_MODECHANGED] != NULL);
}
#endif
/*
* Execute autocommands for "event" and file name "fname".
* Return TRUE if some commands were executed.
@@ -1938,7 +1950,8 @@ apply_autocmds_group(
if (fname_io == NULL)
{
if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE
|| event == EVENT_OPTIONSET)
|| event == EVENT_OPTIONSET
|| event == EVENT_MODECHANGED)
autocmd_fname = NULL;
else if (fname != NULL && !ends_excmd(*fname))
autocmd_fname = fname;
@@ -2011,7 +2024,8 @@ apply_autocmds_group(
|| event == EVENT_COLORSCHEMEPRE
|| event == EVENT_OPTIONSET
|| event == EVENT_QUICKFIXCMDPOST
|| event == EVENT_DIRCHANGED)
|| event == EVENT_DIRCHANGED
|| event == EVENT_MODECHANGED)
{
fname = vim_strsave(fname);
autocmd_fname_full = TRUE; // don't expand it later

View File

@@ -483,4 +483,65 @@ blob_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
}
}
/*
* blob2list() function
*/
void
f_blob2list(typval_T *argvars, typval_T *rettv)
{
blob_T *blob;
list_T *l;
int i;
if (rettv_list_alloc(rettv) == FAIL)
return;
if (check_for_blob_arg(argvars, 0) == FAIL)
return;
blob = argvars->vval.v_blob;
l = rettv->vval.v_list;
for (i = 0; i < blob_len(blob); i++)
list_append_number(l, blob_get(blob, i));
}
/*
* list2blob() function
*/
void
f_list2blob(typval_T *argvars, typval_T *rettv)
{
list_T *l;
listitem_T *li;
blob_T *blob;
if (rettv_blob_alloc(rettv) == FAIL)
return;
blob = rettv->vval.v_blob;
if (check_for_list_arg(argvars, 0) == FAIL)
return;
l = argvars->vval.v_list;
if (l == NULL)
return;
FOR_ALL_LIST_ITEMS(l, li)
{
int error;
varnumber_T n;
error = FALSE;
n = tv_get_number_chk(&li->li_tv, &error);
if (error == TRUE || n < 0 || n > 255)
{
if (!error)
semsg(_(e_invalid_value_for_blob_nr), n);
ga_clear(&blob->bv_ga);
return;
}
ga_append(&blob->bv_ga, n);
}
}
#endif // defined(FEAT_EVAL)

View File

@@ -293,6 +293,18 @@ f_listener_flush(typval_T *argvars, typval_T *rettv UNUSED)
invoke_listeners(buf);
}
static void
remove_listener(buf_T *buf, listener_T *lnr, listener_T *prev)
{
if (prev != NULL)
prev->lr_next = lnr->lr_next;
else
buf->b_listener = lnr->lr_next;
free_callback(&lnr->lr_callback);
vim_free(lnr);
}
/*
* listener_remove() function
*/
@@ -317,12 +329,13 @@ f_listener_remove(typval_T *argvars, typval_T *rettv)
next = lnr->lr_next;
if (lnr->lr_id == id)
{
if (prev != NULL)
prev->lr_next = lnr->lr_next;
else
buf->b_listener = lnr->lr_next;
free_callback(&lnr->lr_callback);
vim_free(lnr);
if (textwinlock > 0)
{
// in invoke_listeners(), clear ID and delete later
lnr->lr_id = 0;
return;
}
remove_listener(buf, lnr, prev);
rettv->vval.v_number = 1;
return;
}
@@ -357,6 +370,7 @@ invoke_listeners(buf_T *buf)
linenr_T added = 0;
int save_updating_screen = updating_screen;
static int recursive = FALSE;
listener_T *next;
if (buf->b_recorded_changes == NULL // nothing changed
|| buf->b_listener == NULL // no listeners
@@ -400,6 +414,18 @@ invoke_listeners(buf_T *buf)
clear_tv(&rettv);
}
// If f_listener_remove() was called may have to remove a listener now.
for (lnr = buf->b_listener; lnr != NULL; lnr = next)
{
listener_T *prev = NULL;
next = lnr->lr_next;
if (lnr->lr_id == 0)
remove_listener(buf, lnr, prev);
else
prev = lnr;
}
--textwinlock;
list_unref(buf->b_recorded_changes);
buf->b_recorded_changes = NULL;

View File

@@ -1309,7 +1309,7 @@ channel_open_func(typval_T *argvars)
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
|| check_for_dict_arg(argvars, 1) == FAIL))
|| check_for_opt_dict_arg(argvars, 1) == FAIL))
return NULL;
address = tv_get_string(&argvars[0]);

View File

@@ -2262,7 +2262,8 @@ ExpandGeneric(
{
if (xp->xp_context == EXPAND_EXPRESSION
|| xp->xp_context == EXPAND_FUNCTIONS
|| xp->xp_context == EXPAND_USER_FUNC)
|| xp->xp_context == EXPAND_USER_FUNC
|| xp->xp_context == EXPAND_DISASSEMBLE)
// <SNR> functions should be sorted to the end.
qsort((void *)*file, (size_t)*num_file, sizeof(char_u *),
sort_func_compare);

View File

@@ -3756,7 +3756,9 @@ if test "$enable_canberra" = "yes"; then
AC_MSG_CHECKING(for libcanberra)
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $canberra_cflags"
if `echo "$CFLAGS" | grep -v "$canberra_cflags" >/dev/null`; then
CFLAGS="$CFLAGS $canberra_cflags"
fi
LIBS="$LIBS $canberra_lib"
AC_TRY_LINK([
# include <canberra.h>
@@ -4504,6 +4506,12 @@ if test "$MACOS_X" = "yes"; then
fi
fi
dnl On some systems REENTRANT needs to be defined. It should not hurt to use
dnl it everywhere.
if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
CFLAGS="$CFLAGS -D_REENTRANT"
fi
dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to
dnl use "-isystem" instead of "-I" for all non-Vim include dirs.
dnl But only when making dependencies, cproto and lint don't take "-isystem".

View File

@@ -530,6 +530,23 @@ static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL};
static linenr_T debuggy_find(int file,char_u *fname, linenr_T after, garray_T *gap, int *fp);
/*
* Evaluate the "bp->dbg_name" expression and return the result.
* Disables error messages.
*/
static typval_T *
eval_expr_no_emsg(struct debuggy *bp)
{
typval_T *tv;
// Disable error messages, a bad expression would make Vim unusable.
++emsg_off;
tv = eval_expr(bp->dbg_name, NULL);
--emsg_off;
return tv;
}
/*
* Parse the arguments of ":profile", ":breakadd" or ":breakdel" and put them
* in the entry just after the last one in dbg_breakp. Note that "dbg_name"
@@ -614,7 +631,7 @@ dbg_parsearg(
{
bp->dbg_name = vim_strsave(p);
if (bp->dbg_name != NULL)
bp->dbg_val = eval_expr(bp->dbg_name, NULL);
bp->dbg_val = eval_expr_no_emsg(bp);
}
else
{
@@ -960,10 +977,7 @@ debuggy_find(
typval_T *tv;
int line = FALSE;
prev_got_int = got_int;
got_int = FALSE;
tv = eval_expr(bp->dbg_name, NULL);
tv = eval_expr_no_emsg(bp);
if (tv != NULL)
{
if (bp->dbg_val == NULL)
@@ -984,7 +998,7 @@ debuggy_find(
debug_oldval = typval_tostring(bp->dbg_val, TRUE);
// Need to evaluate again, typval_compare() overwrites
// "tv".
v = eval_expr(bp->dbg_name, NULL);
v = eval_expr_no_emsg(bp);
debug_newval = typval_tostring(v, TRUE);
free_tv(bp->dbg_val);
bp->dbg_val = v;
@@ -1006,8 +1020,6 @@ debuggy_find(
lnum = after > 0 ? after : 1;
break;
}
got_int |= prev_got_int;
}
#endif
}

View File

@@ -229,6 +229,7 @@ dictitem_alloc(char_u *key)
STRCPY(di->di_key, key);
di->di_flags = DI_FLAGS_ALLOC;
di->di_tv.v_lock = 0;
di->di_tv.v_type = VAR_UNKNOWN;
}
return di;
}

View File

@@ -2443,7 +2443,7 @@ f_digraph_getlist(typval_T *argvars, typval_T *rettv)
# ifdef FEAT_DIGRAPHS
int flag_list_all;
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)
if (in_vim9script() && check_for_opt_bool_arg(argvars, 0) == FAIL)
return;
if (argvars[0].v_type == VAR_UNKNOWN)
@@ -2475,7 +2475,7 @@ f_digraph_set(typval_T *argvars, typval_T *rettv)
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
|| check_for_number_arg(argvars, 1) == FAIL))
|| check_for_string_arg(argvars, 1) == FAIL))
return;
if (!digraph_set_common(&argvars[0], &argvars[1]))

View File

@@ -340,6 +340,8 @@ win_line(
#endif
colnr_T trailcol = MAXCOL; // start of trailing spaces
colnr_T leadcol = 0; // start of leading spaces
int in_multispace = FALSE; // in multiple consecutive spaces
int multispace_pos = 0; // position in lcs-multispace string
#ifdef FEAT_LINEBREAK
int need_showbreak = FALSE; // overlong line, skipping first x
// chars
@@ -736,6 +738,7 @@ win_line(
if (wp->w_p_list)
{
if (wp->w_lcs_chars.space
|| wp->w_lcs_chars.multispace != NULL
|| wp->w_lcs_chars.trail
|| wp->w_lcs_chars.lead
|| wp->w_lcs_chars.nbsp)
@@ -2011,6 +2014,11 @@ win_line(
}
#endif
in_multispace = c == ' '
&& ((ptr > line + 1 && ptr[-2] == ' ') || *ptr == ' ');
if (!in_multispace)
multispace_pos = 0;
// 'list': Change char 160 to 'nbsp' and space to 'space'
// setting in 'listchars'. But not when the character is
// followed by a composing character (use mb_l to check that).
@@ -2022,12 +2030,21 @@ win_line(
&& wp->w_lcs_chars.nbsp)
|| (c == ' '
&& mb_l == 1
&& wp->w_lcs_chars.space
&& (wp->w_lcs_chars.space
|| (in_multispace
&& wp->w_lcs_chars.multispace != NULL))
&& ptr - line >= leadcol
&& ptr - line <= trailcol)))
{
c = (c == ' ') ? wp->w_lcs_chars.space :
wp->w_lcs_chars.nbsp;
if (in_multispace && wp->w_lcs_chars.multispace != NULL)
{
c = wp->w_lcs_chars.multispace[multispace_pos++];
if (wp->w_lcs_chars.multispace[multispace_pos] == NUL)
multispace_pos = 0;
}
else
c = (c == ' ') ? wp->w_lcs_chars.space
: wp->w_lcs_chars.nbsp;
if (area_attr == 0 && search_attr == 0)
{
n_attr = 1;
@@ -2109,55 +2126,60 @@ win_line(
int i;
int saved_nextra = n_extra;
#ifdef FEAT_CONCEAL
# ifdef FEAT_CONCEAL
if (vcol_off > 0)
// there are characters to conceal
tab_len += vcol_off;
// boguscols before FIX_FOR_BOGUSCOLS macro from above
if (wp->w_p_list && wp->w_lcs_chars.tab1
&& old_boguscols > 0
&& n_extra > tab_len)
tab_len += n_extra - tab_len;
#endif
// if n_extra > 0, it gives the number of chars, to
# endif
// If n_extra > 0, it gives the number of chars, to
// use for a tab, else we need to calculate the width
// for a tab
// for a tab.
len = (tab_len * mb_char2len(wp->w_lcs_chars.tab2));
if (wp->w_lcs_chars.tab3)
len += mb_char2len(wp->w_lcs_chars.tab3);
if (n_extra > 0)
len += n_extra - tab_len;
c = wp->w_lcs_chars.tab1;
p = alloc(len + 1);
vim_memset(p, ' ', len);
p[len] = NUL;
vim_free(p_extra_free);
p_extra_free = p;
for (i = 0; i < tab_len; i++)
if (p == NULL)
n_extra = 0;
else
{
int lcs = wp->w_lcs_chars.tab2;
if (*p == NUL)
vim_memset(p, ' ', len);
p[len] = NUL;
vim_free(p_extra_free);
p_extra_free = p;
for (i = 0; i < tab_len; i++)
{
tab_len = i;
break;
}
int lcs = wp->w_lcs_chars.tab2;
// if tab3 is given, need to change the char
// for tab
if (wp->w_lcs_chars.tab3 && i == tab_len - 1)
lcs = wp->w_lcs_chars.tab3;
mb_char2bytes(lcs, p);
p += mb_char2len(lcs);
n_extra += mb_char2len(lcs)
if (*p == NUL)
{
tab_len = i;
break;
}
// if tab3 is given, use it for the last char
if (wp->w_lcs_chars.tab3 && i == tab_len - 1)
lcs = wp->w_lcs_chars.tab3;
p += mb_char2bytes(lcs, p);
n_extra += mb_char2len(lcs)
- (saved_nextra > 0 ? 1 : 0);
}
p_extra = p_extra_free;
# ifdef FEAT_CONCEAL
// n_extra will be increased by FIX_FOX_BOGUSCOLS
// macro below, so need to adjust for that here
if (vcol_off > 0)
n_extra -= vcol_off;
# endif
}
p_extra = p_extra_free;
#ifdef FEAT_CONCEAL
// n_extra will be increased by FIX_FOX_BOGUSCOLS
// macro below, so need to adjust for that here
if (vcol_off > 0)
n_extra -= vcol_off;
#endif
}
#endif
#ifdef FEAT_CONCEAL

View File

@@ -284,6 +284,7 @@ edit(
else
State = INSERT;
trigger_modechanged();
stop_insert_mode = FALSE;
#ifdef FEAT_CONCEAL
@@ -3681,6 +3682,7 @@ ins_esc(
#endif
State = NORMAL;
trigger_modechanged();
// need to position cursor again (e.g. when on a TAB )
changed_cline_bef_curs();
@@ -3811,6 +3813,7 @@ ins_insert(int replaceState)
State = INSERT | (State & LANGMAP);
else
State = replaceState | (State & LANGMAP);
trigger_modechanged();
AppendCharToRedobuff(K_INS);
showmode();
#ifdef CURSOR_SHAPE

View File

@@ -141,6 +141,8 @@ EXTERN char e_undefined_variable_str[]
EXTERN char e_undefined_variable_char_str[]
INIT(= N_("E121: Undefined variable: %c:%s"));
#endif
EXTERN char e_no_such_user_defined_command_str[]
INIT(= N_("E184: No such user-defined command: %s"));
#ifndef FEAT_DIGRAPHS
EXTERN char e_no_digraphs_version[]
INIT(= N_("E196: No digraphs in this version"));
@@ -270,8 +272,8 @@ EXTERN char e_missing_as_after_star[]
INIT(= N_("E1045: Missing \"as\" after *"));
EXTERN char e_missing_comma_in_import[]
INIT(= N_("E1046: Missing comma in import"));
EXTERN char e_syntax_error_in_import[]
INIT(= N_("E1047: Syntax error in import"));
EXTERN char e_syntax_error_in_import_str[]
INIT(= N_("E1047: Syntax error in import: %s"));
EXTERN char e_item_not_found_in_script_str[]
INIT(= N_("E1048: Item not found in script: %s"));
EXTERN char e_item_not_exported_in_script_str[]
@@ -654,3 +656,11 @@ EXTERN char e_legacy_must_be_followed_by_command[]
INIT(= N_("E1234: legacy must be followed by a command"));
EXTERN char e_function_reference_is_not_set[]
INIT(= N_("E1235: Function reference is not set"));
EXTERN char e_cannot_use_str_itself_it_is_imported_with_star[]
INIT(= N_("E1236: Cannot use %s itself, it is imported with '*'"));
EXTERN char e_no_such_user_defined_command_in_current_buffer_str[]
INIT(= N_("E1237: No such user-defined command in current buffer: %s"));
EXTERN char e_blob_required_for_argument_nr[]
INIT(= N_("E1238: Blob required for argument %d"));
EXTERN char e_invalid_value_for_blob_nr[]
INIT(= N_("E1239: Invalid value for blob: %d"));

View File

@@ -561,16 +561,19 @@ eval_to_string_safe(
char_u *retval;
funccal_entry_T funccal_entry;
int save_sc_version = current_sctx.sc_version;
int save_garbage = may_garbage_collect;
current_sctx.sc_version = 1;
save_funccal(&funccal_entry);
if (use_sandbox)
++sandbox;
++textwinlock;
may_garbage_collect = FALSE;
retval = eval_to_string(arg, FALSE);
if (use_sandbox)
--sandbox;
--textwinlock;
may_garbage_collect = save_garbage;
restore_funccal();
current_sctx.sc_version = save_sc_version;
return retval;

View File

@@ -288,6 +288,15 @@ arg_string(type_T *type, argcontext_T *context)
return check_arg_type(&t_string, type, context);
}
/*
* Check "type" is a blob
*/
static int
arg_blob(type_T *type, argcontext_T *context)
{
return check_arg_type(&t_blob, type, context);
}
/*
* Check "type" is a bool or number 0 or 1.
*/
@@ -680,6 +689,7 @@ arg_cursor1(type_T *type, argcontext_T *context)
/*
* Lists of functions that check the argument types of a builtin function.
*/
static argcheck_T arg1_blob[] = {arg_blob};
static argcheck_T arg1_bool[] = {arg_bool};
static argcheck_T arg1_buffer[] = {arg_buffer};
static argcheck_T arg1_buffer_or_dict_any[] = {arg_buffer_or_dict_any};
@@ -1169,6 +1179,8 @@ static funcentry_T global_functions[] =
NULL
#endif
},
{"blob2list", 1, 1, FEARG_1, arg1_blob,
ret_list_number, f_blob2list},
{"browse", 4, 4, 0, arg4_browse,
ret_string, f_browse},
{"browsedir", 2, 2, 0, arg2_string,
@@ -1305,9 +1317,9 @@ static funcentry_T global_functions[] =
ret_number, f_diff_hlID},
{"digraph_get", 1, 1, FEARG_1, arg1_string,
ret_string, f_digraph_get},
{"digraph_getlist",0, 1, FEARG_1, arg1_number,
{"digraph_getlist",0, 1, FEARG_1, arg1_bool,
ret_list_string_items, f_digraph_getlist},
{"digraph_set", 2, 2, FEARG_1, arg2_string_number,
{"digraph_set", 2, 2, FEARG_1, arg2_string,
ret_bool, f_digraph_set},
{"digraph_setlist",1, 1, FEARG_1, arg1_list_string,
ret_bool, f_digraph_setlist},
@@ -1589,6 +1601,8 @@ static funcentry_T global_functions[] =
ret_number, f_line2byte},
{"lispindent", 1, 1, FEARG_1, arg1_lnum,
ret_number, f_lispindent},
{"list2blob", 1, 1, FEARG_1, arg1_list_number,
ret_blob, f_list2blob},
{"list2str", 1, 2, FEARG_1, arg2_list_number_bool,
ret_string, f_list2str},
{"listener_add", 1, 2, FEARG_2, arg2_any_buffer,
@@ -2954,8 +2968,6 @@ f_confirm(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
error = TRUE;
if (argvars[1].v_type != VAR_UNKNOWN)
{
if (in_vim9script() && check_for_string_arg(argvars, 1) == FAIL)
return;
buttons = tv_get_string_buf_chk(&argvars[1], buf);
if (buttons == NULL)
error = TRUE;
@@ -2964,8 +2976,6 @@ f_confirm(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
def = (int)tv_get_number_chk(&argvars[2], &error);
if (argvars[3].v_type != VAR_UNKNOWN)
{
if (in_vim9script() && check_for_string_arg(argvars, 3) == FAIL)
return;
typestr = tv_get_string_buf_chk(&argvars[3], buf2);
if (typestr == NULL)
error = TRUE;

View File

@@ -3260,6 +3260,12 @@ set_var_const(
semsg(_(e_redefining_imported_item_str), name);
goto failed;
}
if (import->imp_flags & IMP_FLAGS_STAR)
{
semsg(_(e_cannot_use_str_itself_it_is_imported_with_star),
name);
goto failed;
}
sv = ((svar_T *)si->sn_var_vals.ga_data) + import->imp_var_vals_idx;
where.wt_variable = TRUE;
@@ -3456,9 +3462,21 @@ set_var_const(
if (vim9script && type != NULL)
{
if (type->tt_type == VAR_DICT && dest_tv->vval.v_dict != NULL)
dest_tv->vval.v_dict->dv_type = alloc_type(type);
{
if (dest_tv->vval.v_dict->dv_type != type)
{
free_type(dest_tv->vval.v_dict->dv_type);
dest_tv->vval.v_dict->dv_type = alloc_type(type);
}
}
else if (type->tt_type == VAR_LIST && dest_tv->vval.v_list != NULL)
dest_tv->vval.v_list->lv_type = alloc_type(type);
{
if (dest_tv->vval.v_list->lv_type != type)
{
free_type(dest_tv->vval.v_list->lv_type);
dest_tv->vval.v_list->lv_type = alloc_type(type);
}
}
}
// ":const var = value" locks the value

Some files were not shown because too many files have changed in this diff Show More