From 9f392c071aab2e80bc0264f0665d048786cd2e1c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 23 Oct 2021 22:29:17 +0200 Subject: vim-patch:partial 079ba76ae7a7 (#16126) Update runtime files https://github.com/vim/vim/commit/079ba76ae7a7d0ef404cb9b41dff2663ff41f51b skip optwin.vim (needs 8.2.3520) skip doc/options.txt (needs 8.2.1535) skip doc/insert.txt (needs 8.2.3528) --- runtime/ftplugin/changelog.vim | 26 ++++++++++++++++---------- runtime/ftplugin/nsis.vim | 4 ++-- 2 files changed, 18 insertions(+), 12 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/changelog.vim b/runtime/ftplugin/changelog.vim index 257e9cd9d4..e9df63f8c9 100644 --- a/runtime/ftplugin/changelog.vim +++ b/runtime/ftplugin/changelog.vim @@ -2,7 +2,7 @@ " Language: generic Changelog file " Maintainer: Martin Florian " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2015-10-25 +" Latest Revision: 2021-10-17 " Variables: " g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) - " description: the timeformat used in ChangeLog entries. @@ -55,7 +55,7 @@ if &filetype == 'changelog' elseif $EMAIL_ADDRESS != "" return $EMAIL_ADDRESS endif - + let login = s:login() return printf('%s <%s@%s>', s:name(login), login, s:hostname()) endfunction @@ -223,12 +223,6 @@ if &filetype == 'changelog' let &paste = save_paste endfunction - if exists(":NewChangelogEntry") != 2 - nnoremap o :call new_changelog_entry('') - xnoremap o :call new_changelog_entry('') - command! -nargs=0 NewChangelogEntry call s:new_changelog_entry('') - endif - let b:undo_ftplugin = "setl com< fo< et< ai<" setlocal comments= @@ -241,14 +235,26 @@ if &filetype == 'changelog' let b:undo_ftplugin .= " tw<" endif + if !exists("no_plugin_maps") && !exists("no_changelog_maps") && exists(":NewChangelogEntry") != 2 + nnoremap o :call new_changelog_entry('') + xnoremap o :call new_changelog_entry('') + command! -buffer -nargs=0 NewChangelogEntry call s:new_changelog_entry('') + let b:undo_ftplugin .= " | sil! exe 'nunmap o'" . + \ " | sil! exe 'vunmap o'" . + \ " | sil! delc NewChangelogEntry" + endif + let &cpo = s:cpo_save unlet s:cpo_save else let s:cpo_save = &cpo set cpo&vim - " Add the Changelog opening mapping - nnoremap o :call open_changelog() + if !exists("no_plugin_maps") && !exists("no_changelog_maps") + " Add the Changelog opening mapping + nnoremap o :call open_changelog() + let b:undo_ftplugin .= " | silent! exe 'nunmap o" + endif function! s:open_changelog() let path = expand('%:p:h') diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim index 1a35127c86..3dc0d6318a 100644 --- a/runtime/ftplugin/nsis.vim +++ b/runtime/ftplugin/nsis.vim @@ -3,7 +3,7 @@ " Maintainer: Ken Takata " URL: https://github.com/k-takata/vim-nsis " Previous Maintainer: Nikolai Weibull -" Last Change: 2018-01-26 +" Last Change: 2021-10-18 if exists("b:did_ftplugin") finish @@ -15,7 +15,6 @@ set cpo&vim let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo< def< inc<" - \ " | unlet! b:match_ignorecase b:match_words" setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s setlocal formatoptions-=t formatoptions+=croql @@ -37,6 +36,7 @@ if exists("loaded_matchit") \ '\${MementoSection}:\${MementoSectionEnd},' . \ '!if\%(\%(macro\)\?n\?def\)\?\>:!else\>:!endif\>,' . \ '!macro\>:!macroend\>' + let b:undo_ftplugin .= " | unlet! b:match_ignorecase b:match_words" endif let &cpo = s:cpo_save -- cgit