From 2f5b8a009280eba995aecf67d1e8d99b7c72c51c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 4 Jun 2024 09:39:28 +0200 Subject: vim-patch:9.1.0464: no whitespace padding in commentstring option in ftplugins Problem: no whitespace padding in commentstring option in ftplugins Solution: Change default to include whitespace padding, update existing filetype plugins with the new default value (Riley Bruins) closes: vim/vim#14843 https://github.com/vim/vim/commit/0a0830624a260660c7fa692ecb7e6e5de09114ba Co-authored-by: Riley Bruins --- runtime/ftplugin/ps1.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/ftplugin/ps1.vim') diff --git a/runtime/ftplugin/ps1.vim b/runtime/ftplugin/ps1.vim index d6ab01016b..9d698f2423 100644 --- a/runtime/ftplugin/ps1.vim +++ b/runtime/ftplugin/ps1.vim @@ -3,6 +3,7 @@ " URL: https://github.com/PProvost/vim-ps1 " Last Change: 2021 Apr 02 " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 23 by Riley Bruins ('commentstring') " Only do this when not done yet for this buffer if exists("b:did_ftplugin") | finish | endif @@ -14,7 +15,7 @@ let s:cpo_save = &cpo set cpo&vim setlocal tw=0 -setlocal commentstring=#%s +setlocal commentstring=#\ %s setlocal formatoptions=tcqro " Enable autocompletion of hyphenated PowerShell commands, " e.g. Get-Content or Get-ADUser -- cgit From b40b22f426899d58c32bd7cb788464dc535b1eb9 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 19 Sep 2024 19:46:50 +0200 Subject: vim-patch:f86568f: runtime(misc): simplify keywordprg in various ftplugins closes: vim/vim#15696 https://github.com/vim/vim/commit/f86568f91848ece0c5da2178881b3ed858dae799 Co-authored-by: Konfekt --- runtime/ftplugin/ps1.vim | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'runtime/ftplugin/ps1.vim') diff --git a/runtime/ftplugin/ps1.vim b/runtime/ftplugin/ps1.vim index 9d698f2423..e09bbf86dc 100644 --- a/runtime/ftplugin/ps1.vim +++ b/runtime/ftplugin/ps1.vim @@ -4,6 +4,7 @@ " Last Change: 2021 Apr 02 " 2024 Jan 14 by Vim Project (browsefilter) " 2024 May 23 by Riley Bruins ('commentstring') +" 2024 Sep 19 by Konfekt (simplify keywordprg #15696) " Only do this when not done yet for this buffer if exists("b:did_ftplugin") | finish | endif @@ -35,6 +36,10 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") endif endif +" Undo the stuff we changed +let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword<" . + \ " | unlet! b:browsefilter" + " Look up keywords by Get-Help: " check for PowerShell Core in Windows, Linux or MacOS if executable('pwsh') | let s:pwsh_cmd = 'pwsh' @@ -45,21 +50,14 @@ elseif executable('powershell.exe') | let s:pwsh_cmd = 'powershell.exe' endif if exists('s:pwsh_cmd') - if !has('gui_running') && executable('less') && - \ !(exists('$ConEmuBuild') && &term =~? '^xterm') - " For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048 - command! -buffer -nargs=1 GetHelp silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw! - elseif has('terminal') + if exists(':terminal') == 2 command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full ""' . (executable('less') ? ' | less' : '') else command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full ') endif + setlocal keywordprg=:GetHelp + let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer GetHelp" endif -setlocal keywordprg=:GetHelp - -" Undo the stuff we changed -let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" . - \ " | unlet! b:browsefilter" let &cpo = s:cpo_save unlet s:cpo_save -- cgit