]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(compiler): add vimdoc
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Thu, 11 Apr 2024 19:25:39 +0000 (21:25 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 11 Apr 2024 19:25:39 +0000 (21:25 +0200)
closes: #14459

https://github.com/google/vimdoc generates vim help files from vimscript files

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/compiler/vimdoc.vim [new file with mode: 0644]
runtime/ftplugin/vim.vim

diff --git a/runtime/compiler/vimdoc.vim b/runtime/compiler/vimdoc.vim
new file mode 100644 (file)
index 0000000..d83b924
--- /dev/null
@@ -0,0 +1,19 @@
+" Vim Compiler File
+" Language:             vimdoc
+" Maintainer:           Wu, Zhenyu <wuzhenyu@ustc.edu>
+" Latest Revision:      2024-04-09
+"
+" you can get it by `pip install vimdoc` or the package manager of your distribution.
+
+if exists('b:current_compiler')
+  finish
+endif
+let b:current_compiler = 'vimdoc'
+
+let s:save_cpoptions = &cpoptions
+set cpoptions&vim
+
+CompilerSet makeprg=vimdoc
+
+let &cpoptions = s:save_cpoptions
+unlet s:save_cpoptions
index a8636f4c81db9999d1b4af292b838231832e7238..e28beb9848abf920037f33304a0feea46e3ae640 100644 (file)
@@ -15,6 +15,8 @@ let b:did_ftplugin = 1
 let s:cpo_save = &cpo
 set cpo&vim
 
+compiler vimdoc
+
 if !exists('*VimFtpluginUndo')
   func VimFtpluginUndo()
     setl fo< isk< com< tw< commentstring< include< define<