Commit: runtime(c): only set keywordprg when there has 'man'

2 views
Skip to first unread message

Christian Brabandt

unread,
Feb 3, 2026, 10:01:33 AM (17 hours ago) Feb 3
to vim...@googlegroups.com
runtime(c): only set keywordprg when there has 'man'

Commit: https://github.com/vim/vim/commit/a2e76bb8feaa91c5653267180f139cba1bfeec9a
Author: Mao-Yining <101858210+...@users.noreply.github.com>
Date: Tue Feb 3 14:51:24 2026 +0000

runtime(c): only set keywordprg when there has 'man'

closes: https://github.com/vim/vim/issues/19319

Signed-off-by: Mao-Yining <mao.y...@outlook.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim
index 2793c5d46..97111121c 100644
--- a/runtime/ftplugin/c.vim
+++ b/runtime/ftplugin/c.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2026 Jan 26
+" Last Change: 2026 Feb 3
" Former Maintainer: Bram Moolenaar <Br...@vim.org>

" Only do this when not done yet for this buffer
@@ -41,7 +41,7 @@ if has("vms")
endif

" Use terminal window for gui
-if has('gui_running') && exists(':terminal') == 2
+if has('gui_running') && exists(':terminal') == 2 && executable("man")
setlocal keywordprg=:CKeywordPrg

command! -buffer -nargs=1 -count CKeywordPrg call s:CKeywordPrg(<q-args>, <count>)
Reply all
Reply to author
Forward
0 new messages