diff options
29 files changed, 365 insertions, 141 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 27c49e17ec..b2941ec28a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -93,6 +93,7 @@ runtime/ftplugin/javascript.vim @dkearns runtime/ftplugin/javascriptreact.vim @dkearns runtime/ftplugin/kconfig.vim @chrisbra runtime/ftplugin/liquid.vim @tpope +runtime/ftplugin/lua.vim @dkearns runtime/ftplugin/m3build.vim @dkearns runtime/ftplugin/m3quake.vim @dkearns runtime/ftplugin/markdown.vim @tpope @@ -108,6 +109,7 @@ runtime/ftplugin/pbtxt.vim @lakshayg runtime/ftplugin/pdf.vim @tpope runtime/ftplugin/ps1.vim @heaths runtime/ftplugin/ps1xml.vim @heaths +runtime/ftplugin/routeros.vim @zainin runtime/ftplugin/ruby.vim @tpope @dkearns runtime/ftplugin/sass.vim @tpope runtime/ftplugin/scss.vim @tpope @@ -233,6 +235,7 @@ runtime/syntax/ps1.vim @heaths runtime/syntax/ps1xml.vim @heaths runtime/syntax/psl.vim @danielkho runtime/syntax/rc.vim @chrisbra +runtime/syntax/routeros.vim @zainin runtime/syntax/rpcgen.vim @cecamp runtime/syntax/ruby.vim @dkearns runtime/syntax/sass.vim @tpope diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index 9588bbf4a2..bc9b62ddb0 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,7 +1,7 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Jan 07, 2020 -" Version: 31 +" Date: Nov 08, 2021 +" Version: 32 " Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1 @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_zip") finish endif -let g:loaded_zip= "v31" +let g:loaded_zip= "v32" if v:version < 702 echohl WarningMsg echo "***warning*** this version of zip needs vim 7.2 or later" @@ -115,7 +115,13 @@ fun! zip#Browse(zipfile) setlocal bufhidden=hide setlocal nobuflisted setlocal nowrap - set ft=tar + + " Oct 12, 2021: need to re-use Bram's syntax/tar.vim. + " Setting the filetype to zip doesn't do anything (currently), + " but it is perhaps less confusing to curious perusers who do + " a :echo &ft + setf zip + run! syntax/tar.vim " give header call append(0, ['" zip.vim version '.g:loaded_zip, @@ -187,8 +193,8 @@ fun! s:ZipBrowseSelect() wincmd _ endif let s:zipfile_{winnr()}= curfile -" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname)) - exe "noswapfile e ".fnameescape("zipfile:".zipfile.'::'.fname) +" call Decho("exe e ".fnameescape("zipfile://".zipfile.'::'.fname)) + exe "noswapfile e ".fnameescape("zipfile://".zipfile.'::'.fname) filetype detect let &report= repkeep @@ -203,11 +209,11 @@ fun! zip#Read(fname,mode) set report=10 if has("unix") - let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','') else - let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','') let fname = substitute(fname, '[', '[[]', 'g') endif " call Decho("zipfile<".zipfile.">") @@ -224,7 +230,7 @@ fun! zip#Read(fname,mode) " the following code does much the same thing as " exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1) - " but allows zipfile:... entries in quickfix lists + " but allows zipfile://... entries in quickfix lists let temp = tempname() " call Decho("using temp file<".temp.">") let fn = expand('%:p') @@ -296,11 +302,11 @@ fun! zip#Write(fname) " call Decho("current directory now: ".getcwd()) if has("unix") - let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','') else - let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','') - let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','') + let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','') + let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','') endif " call Decho("zipfile<".zipfile.">") " call Decho("fname <".fname.">") diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index acbcd7182a..e29b56411b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2021 Nov 07 +*eval.txt* For Vim version 8.2. Last change: 2021 Nov 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -11900,9 +11900,9 @@ wildmenumode() *wildmenumode()* win_execute({id}, {command} [, {silent}]) *win_execute()* Like `execute()` but in the context of window {id}. The window will temporarily be made the current window, - without triggering autocommands. When executing {command} - autocommands will be triggered, this may have unexpected side - effects. Use |:noautocmd| if needed. + without triggering autocommands or changing directory. When + executing {command} autocommands will be triggered, this may + have unexpected side effects. Use |:noautocmd| if needed. Example: > call win_execute(winid, 'set syntax=python') < Doing the same with `setwinvar()` would not trigger diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index 3a06baf66b..d1a5b2be87 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 29 +*helphelp.txt* For Vim version 8.2. Last change: 2021 Nov 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -323,21 +323,25 @@ Hints for translators: 3. Writing help files *help-writing* For ease of use, a Vim help file for a plugin should follow the format of the -standard Vim help files. If you are writing a new help file it's best to copy -one of the existing files and use it as a template. +standard Vim help files, except fot the fist line. If you are writing a new +help file it's best to copy one of the existing files and use it as a +template. The first line in a help file should have the following format: -*helpfile_name.txt* For Vim version 7.3 Last change: 2010 June 4 +*plugin_name.txt* {short description of the plugin} -The first field is a link to the help file name. The second field describes -the applicable Vim version. The last field specifies the last modification -date of the file. Each field is separated by a tab. +The first field is a help tag where ":help plugin_name" will jump to. The +remainder of the line, after a Tab, describes the plugin purpose in a short +way. This will show up in the "LOCAL ADDITIONS" section of the main help +file. Check there that it shows up properly: |local-additions|. + +If you want to add a version number of last modification date, put it in the +second line, right aligned. At the bottom of the help file, place a Vim modeline to set the 'textwidth' and 'tabstop' options and the 'filetype' to "help". Never set a global option -in such a modeline, that can have consequences undesired by whoever reads that -help. +in such a modeline, that can have undesired consequences. TAGS diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 572e6bf7bf..79b1716425 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 8.2. Last change: 2019 Dec 07 +*if_pyth.txt* For Vim version 8.2. Last change: 2021 Nov 12 VIM REFERENCE MANUAL by Paul Moore @@ -63,6 +63,11 @@ To see what version of Python you have: > There is no need to import sys, it's done by default. + *python-environment* +Environment variables set in Vim are not always available in Python. This +depends on how Vim and Python were build. Also see +https://docs.python.org/3/library/os.html#os.environ + Note: Python is very sensitive to the indenting. Make sure the "class" line and "EOF" do not have any indent. diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index f50377b4ef..4b5dd63305 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 8.2. Last change: 2021 Oct 19 +*map.txt* For Vim version 8.2. Last change: 2021 Nov 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -61,6 +61,8 @@ modes. where the map command applies. The result, including {rhs}, is then further scanned for mappings. This allows for nested and recursive use of mappings. + Note: Trailing spaces are included in the {rhs}, + because space is a valid Normal mode command. *:nore* *:norem* :no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap* *:nor* @@ -1560,6 +1562,7 @@ Possible values are (second column is the short name used in listing): Special cases ~ *:command-bang* *:command-bar* *:command-register* *:command-buffer* + *:command-keepscript* There are some special cases as well: -bang The command can take a ! modifier (like :q or :w) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 7fe371b521..a0bbd3babb 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2021 Nov 06 +*options.txt* For Vim version 8.2. Last change: 2021 Nov 15 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index 2f9fe1eff2..787ca4d2db 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -1,4 +1,4 @@ -*pi_zip.txt* For Vim version 8.2. Last change: 2020 Jan 07 +*pi_zip.txt* For Vim version 8.2. Last change: 2021 Nov 08 +====================+ | Zip File Interface | @@ -102,6 +102,9 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright* ============================================================================== 4. History *zip-history* {{{1 + v32 Oct 22, 2021 * to avoid an issue with a vim 8.2 patch, zipfile: has + been changed to zipfile:// . This often shows up + as zipfile:/// with zipped files that are root-based. v29 Apr 02, 2017 * (Klartext) reported that an encrypted zip file could opened but the swapfile held unencrypted contents. The solution is to edit the contents of a zip file diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 0e8547588a..5811cf2aa5 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4880,7 +4880,7 @@ in their own color. :hi[ghlight] [default] {group-name} {key}={arg} .. Add a highlight group, or change the highlighting for an existing group. If a given color name is not - receognized, each `colors/lists/default.vim` found on + recognized, each `colors/lists/default.vim` found on |'runtimepath'| will be loaded. See |highlight-args| for the {key}={arg} arguments. See |:highlight-default| for the optional [default] diff --git a/runtime/doc/tags b/runtime/doc/tags index 442f6a26d4..49500cb0f4 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2307,6 +2307,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* :command-completion-custom map.txt /*:command-completion-custom* :command-completion-customlist map.txt /*:command-completion-customlist* :command-count map.txt /*:command-count* +:command-keepscript map.txt /*:command-keepscript* :command-modifiers map.txt /*:command-modifiers* :command-nargs map.txt /*:command-nargs* :command-range map.txt /*:command-range* @@ -5036,7 +5037,6 @@ N: cmdline.txt /*N:* N<Del> various.txt /*N<Del>* NFA pattern.txt /*NFA* NL-used-for-Nul pattern.txt /*NL-used-for-Nul* -NOT eval.txt /*NOT* Neovim intro.txt /*Neovim* NetBSD-backspace options.txt /*NetBSD-backspace* NetBeans netbeans.txt /*NetBeans* @@ -5243,6 +5243,7 @@ WORD motion.txt /*WORD* WWW intro.txt /*WWW* Win32 os_win32.txt /*Win32* WinBar gui.txt /*WinBar* +WinClosed autocmd.txt /*WinClosed* WinEnter autocmd.txt /*WinEnter* WinLeave autocmd.txt /*WinLeave* WinNew autocmd.txt /*WinNew* @@ -7273,7 +7274,6 @@ help-translated helphelp.txt /*help-translated* help-writing helphelp.txt /*help-writing* help-xterm-window helphelp.txt /*help-xterm-window* help.txt help.txt /*help.txt* -helpfile_name.txt helphelp.txt /*helpfile_name.txt* helphelp helphelp.txt /*helphelp* helphelp.txt helphelp.txt /*helphelp.txt* hex-editing tips.txt /*hex-editing* @@ -8543,6 +8543,7 @@ plugin usr_05.txt /*plugin* plugin-details filetype.txt /*plugin-details* plugin-filetype usr_41.txt /*plugin-filetype* plugin-special usr_41.txt /*plugin-special* +plugin_name.txt helphelp.txt /*plugin_name.txt* pmbcs-option print.txt /*pmbcs-option* pmbfn-option print.txt /*pmbfn-option* popt-option print.txt /*popt-option* @@ -8695,6 +8696,7 @@ python-command if_pyth.txt /*python-command* python-commands if_pyth.txt /*python-commands* python-current if_pyth.txt /*python-current* python-dynamic if_pyth.txt /*python-dynamic* +python-environment if_pyth.txt /*python-environment* python-error if_pyth.txt /*python-error* python-eval if_pyth.txt /*python-eval* python-examples if_pyth.txt /*python-examples* diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt index 47b04df2fc..d75015a3f0 100644 --- a/runtime/doc/terminal.txt +++ b/runtime/doc/terminal.txt @@ -1,4 +1,4 @@ -*terminal.txt* For Vim version 8.2. Last change: 2021 Aug 15 +*terminal.txt* For Vim version 8.2. Last change: 2021 Nov 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -240,7 +240,7 @@ Command syntax ~ ++shell Instead of executing {command} directly, use a shell, like with `:!command` *E279* - {only works on Unix currently} + {only works on Unix and MS-Windows} ++kill={how} When trying to close the terminal window kill the job with {how}. See |term_setkill()| for the values. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 9e73d3730c..05af932de8 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.2. Last change: 2021 Nov 04 +*todo.txt* For Vim version 8.2. Last change: 2021 Nov 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -277,6 +277,9 @@ Request to use "." for the cursor column in search pattern \%<.c and \%<.v. Remove SPACE_IN_FILENAME ? It is only used for completion. +When 'term' starts with "foot" then default t_TI and t_TE to the values used +for the builtin xterm termcap. + Adding "10" to 'spellsuggest' causes spell suggestions to become very slow. (#4087) Did patch 8.2.2379 help? Also, z= in German on a long word can take a very long time, but CTRL-C to @@ -658,14 +661,6 @@ http://vimawesome.com/?q=tag:color-scheme Bug: "vipgw" does not put cursor back where it belongs. (Jason Franklin, 2019 Mar 5) -Many users don't like 'thesaurus' to match so many words. (#4667, #1611) -- when the match with the first word is partial, don't add other words on that - line. -- support other file formats, such as comma separated. Indicate by a prefix - to the file in the 'thesaurus' option. -- 'threglookexp' option: only match with first word in thesaurus file. - (Jakson A. Aquino, 2006 Jun 14) - Some composing characters actually add a cell width to the character they are on top off, making the whole thing two characters wide. (#4526) diff --git a/runtime/doc/usr_20.txt b/runtime/doc/usr_20.txt index ebad3c517f..a94195d99a 100644 --- a/runtime/doc/usr_20.txt +++ b/runtime/doc/usr_20.txt @@ -1,4 +1,4 @@ -*usr_20.txt* For Vim version 8.2. Last change: 2006 Apr 24 +*usr_20.txt* For Vim version 8.2. Last change: 2021 Nov 13 VIM USER MANUAL - by Bram Moolenaar @@ -289,11 +289,11 @@ In chapter 3 we briefly mentioned the history. The basics are that you can use the <Up> key to recall an older command line. <Down> then takes you back to newer commands. -There are actually four histories. The ones we will mention here are for ":" +There are actually five histories. The ones we will mention here are for ":" commands and for "/" and "?" search commands. The "/" and "?" commands share -the same history, because they are both search commands. The two other -histories are for expressions and input lines for the input() function. -|cmdline-history| +the same history, because they are both search commands. The three other +histories are for expressions, debug more commands and input lines for the +input() function. |cmdline-history| Suppose you have done a ":set" command, typed ten more colon commands and then want to repeat that ":set" command again. You could press ":" and then ten diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 2a75126e4d..c4c9cb9048 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2021 Oct 03 +" Last Change: 2021 Nov 16 " Listen very carefully, I will say this only once if exists("did_load_filetypes") diff --git a/runtime/ftplugin/aap.vim b/runtime/ftplugin/aap.vim index 9b20ec4766..b5065e5157 100644 --- a/runtime/ftplugin/aap.vim +++ b/runtime/ftplugin/aap.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Aap recipe " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2013 Apr 05 +" Last Change: 2021 Nov 14 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -11,8 +11,9 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 -" Reset 'formatoptions', 'comments' and 'expandtab' to undo this plugin. -let b:undo_ftplugin = "setl fo< com< et<" +" Reset 'formatoptions', 'comments', 'commentstring' and 'expandtab' to undo +" this plugin. +let b:undo_ftplugin = "setl fo< com< cms< et<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". @@ -20,6 +21,12 @@ setlocal fo-=t fo+=croql " Set 'comments' to format dashed lists in comments. setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:- +setlocal commentstring=#\ %s " Expand tabs to spaces to avoid trouble. setlocal expandtab + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Aap Recipe Files (*.aap)\t*.aap\nAll Files (*.*)\t*.*\n" + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif diff --git a/runtime/ftplugin/diff.vim b/runtime/ftplugin/diff.vim index 0464290475..bf37d464c0 100644 --- a/runtime/ftplugin/diff.vim +++ b/runtime/ftplugin/diff.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Diff " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2020 Jul 18 +" Last Change: 2021 Nov 14 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -9,10 +9,15 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl modeline<" +let b:undo_ftplugin = "setl modeline< commentstring<" " Don't use modelines in a diff, they apply to the diffed file setlocal nomodeline " If there are comments they start with # -let &commentstring = "# %s" +let &l:commentstring = "# %s" + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Diff Files (*.diff)\t*.diff\nPatch Files (*.patch)\t*.h\nAll Files (*.*)\t*.*\n" + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif diff --git a/runtime/ftplugin/lua.vim b/runtime/ftplugin/lua.vim index 3454a4d694..2604257594 100644 --- a/runtime/ftplugin/lua.vim +++ b/runtime/ftplugin/lua.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file. -" Language: Lua 4.0+ -" Maintainer: Max Ischenko <mfi@ukr.net> -" Last Change: 2012 Mar 07 +" Language: Lua +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Previous Maintainer: Max Ischenko <mfi@ukr.net> +" Last Change: 2021 Nov 15 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -16,27 +17,30 @@ set cpo&vim " Set 'formatoptions' to break comment lines but not other lines, and insert " the comment leader when hitting <CR> or using "o". -setlocal fo-=t fo+=croql +setlocal formatoptions-=t formatoptions+=croql -setlocal com=:-- -setlocal cms=--%s +setlocal comments=:-- +setlocal commentstring=--%s setlocal suffixesadd=.lua +let b:undo_ftplugin = "setlocal fo< com< cms< sua<" -" The following lines enable the macros/matchit.vim plugin for -" extended matching with the % key. -if exists("loaded_matchit") - +if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 0 let b:match_words = - \ '\<\%(do\|function\|if\)\>:' . - \ '\<\%(return\|else\|elseif\)\>:' . - \ '\<end\>,' . - \ '\<repeat\>:\<until\>' + \ '\<\%(do\|function\|if\)\>:' . + \ '\<\%(return\|else\|elseif\)\>:' . + \ '\<end\>,' . + \ '\<repeat\>:\<until\>,' . + \ '\%(--\)\=\[\(=*\)\[:]\1]' + let b:undo_ftplugin .= " | unlet! b:match_words b:match_ignorecase" +endif -endif " exists("loaded_matchit") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n" . + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin .= " | unlet! b:browsefilter" +endif let &cpo = s:cpo_save unlet s:cpo_save - -let b:undo_ftplugin = "setlocal fo< com< cms< suffixesadd<" diff --git a/runtime/ftplugin/routeros.vim b/runtime/ftplugin/routeros.vim new file mode 100644 index 0000000000..c6e4799aa2 --- /dev/null +++ b/runtime/ftplugin/routeros.vim @@ -0,0 +1,29 @@ +" Vim filetype plugin file +" Language: MikroTik RouterOS Script +" Maintainer: zainin <z@wintr.dev> +" Last Change: 2021 Nov 14 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpo = &cpo +set cpo-=C + +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal formatoptions-=t formatoptions+=croql + +let b:undo_ftplugin = "setlocal com< cms< fo<" + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "RouterOS Script Files (*.rsc)\t*.rsc\n" .. + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif + +let &cpo = s:save_cpo +unlet! s:save_cpo + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/ftplugin/zimbu.vim b/runtime/ftplugin/zimbu.vim index 2e3138edf8..c966498c90 100644 --- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Dec 05 +" Last Change: 2021 Nov 12 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -34,9 +34,11 @@ setlocal errorformat^=%f\ line\ %l\ col\ %c:\ %m,ERROR:\ %m " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments. -let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)' - -let b:match_skip = 's:comment\|string\|zimbuchar' +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_words = '\(^\s*\)\@<=\(MODULE\|CLASS\|INTERFACE\|BITS\|ENUM\|SHARED\|FUNC\|REPLACE\|DEFINE\|PROC\|EQUAL\|MAIN\|IF\|GENERATE_IF\|WHILE\|REPEAT\|WITH\|DO\|FOR\|SWITCH\|TRY\)\>\|{\s*$:\(^\s*\)\@<=\(ELSE\|ELSEIF\|GENERATE_ELSE\|GENERATE_ELSEIF\|CATCH\|FINALLY\)\>:\(^\s*\)\@<=\(}\|\<UNTIL\>\)' + let b:match_skip = 's:comment\|string\|zimbuchar' + let b:undo_ftplugin ..= " | unlet! b:match_words b:match_skip" +endif setlocal tw=78 setlocal et sts=2 sw=2 @@ -135,9 +137,60 @@ iabbr <buffer> <expr> until GCUpperSpace("until") iabbr <buffer> <expr> while GCUpperSpace("while") iabbr <buffer> <expr> repeat GCUpper("repeat") +let b:undo_ftplugin ..= + \ " | iunabbr <buffer> alias" .. + \ " | iunabbr <buffer> arg" .. + \ " | iunabbr <buffer> break" .. + \ " | iunabbr <buffer> case" .. + \ " | iunabbr <buffer> catch" .. + \ " | iunabbr <buffer> check" .. + \ " | iunabbr <buffer> class" .. + \ " | iunabbr <buffer> interface" .. + \ " | iunabbr <buffer> implements" .. + \ " | iunabbr <buffer> shared" .. + \ " | iunabbr <buffer> continue" .. + \ " | iunabbr <buffer> default" .. + \ " | iunabbr <buffer> extends" .. + \ " | iunabbr <buffer> do" .. + \ " | iunabbr <buffer> else" .. + \ " | iunabbr <buffer> elseif" .. + \ " | iunabbr <buffer> enum" .. + \ " | iunabbr <buffer> exit" .. + \ " | iunabbr <buffer> false" .. + \ " | iunabbr <buffer> fail" .. + \ " | iunabbr <buffer> finally" .. + \ " | iunabbr <buffer> for" .. + \ " | iunabbr <buffer> func" .. + \ " | iunabbr <buffer> if" .. + \ " | iunabbr <buffer> import" .. + \ " | iunabbr <buffer> in" .. + \ " | iunabbr <buffer> io" .. + \ " | iunabbr <buffer> main" .. + \ " | iunabbr <buffer> module" .. + \ " | iunabbr <buffer> new" .. + \ " | iunabbr <buffer> nil" .. + \ " | iunabbr <buffer> ok" .. + \ " | iunabbr <buffer> proc" .. + \ " | iunabbr <buffer> proceed" .. + \ " | iunabbr <buffer> return" .. + \ " | iunabbr <buffer> step" .. + \ " | iunabbr <buffer> switch" .. + \ " | iunabbr <buffer> sys" .. + \ " | iunabbr <buffer> this" .. + \ " | iunabbr <buffer> throw" .. + \ " | iunabbr <buffer> try" .. + \ " | iunabbr <buffer> to" .. + \ " | iunabbr <buffer> true" .. + \ " | iunabbr <buffer> until" .. + \ " | iunabbr <buffer> while" .. + \ " | iunabbr <buffer> repeat" + if !exists("no_plugin_maps") && !exists("no_zimbu_maps") nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> + let b:undo_ftplugin ..= + \ " | silent! exe 'nunmap <buffer> [['" .. + \ " | silent! exe 'nunmap <buffer> ]]'" endif " Using a function makes sure the search pattern is restored diff --git a/runtime/pack/dist/opt/matchit/doc/matchit.txt b/runtime/pack/dist/opt/matchit/doc/matchit.txt index ce8e7046fa..7b2b921111 100644 --- a/runtime/pack/dist/opt/matchit/doc/matchit.txt +++ b/runtime/pack/dist/opt/matchit/doc/matchit.txt @@ -1,10 +1,10 @@ -*matchit.txt* Extended "%" matching +*matchit.txt* Extended "%" matching For instructions on installing this file, type `:help matchit-install` inside Vim. -For Vim version 8.1. Last change: 2021 May 17 +For Vim version 8.1. Last change: 2021 Nov 13 VIM REFERENCE MANUAL by Benji Fisher et al diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index b549d4ee05..b8007e053d 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -2,7 +2,7 @@ " " Author: Bram Moolenaar " Copyright: Vim license applies, see ":help license" -" Last Change: 2021 Oct 26 +" Last Change: 2021 Nov 14 " " WORK IN PROGRESS - Only the basics work " Note: On MS-Windows you need a recent version of gdb. The one included with @@ -1098,6 +1098,7 @@ func s:GotoAsmwinOrCreateIt() setlocal number setlocal noswapfile setlocal buftype=nofile + setlocal modifiable let asmbuf = bufnr('Termdebug-asm-listing') if asmbuf > 0 @@ -1180,6 +1181,7 @@ func s:HandleCursor(msg) endif endif exe lnum + normal! zv exe 'sign unplace ' . s:pc_id exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC priority=110 file=' . fname if !exists('b:save_signcolumn') diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim index b9e334fb98..edc52713a8 100644 --- a/runtime/plugin/zipPlugin.vim +++ b/runtime/plugin/zipPlugin.vim @@ -20,7 +20,7 @@ if &cp |