Commit: runtime(doc): DocBook syntax variable scopes are not clearly documented
Christian Brabandt <[email protected]> Sat, 8 Aug 2026 19:15:05 +0200
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <[email protected]> |
runtime(doc): DocBook syntax variable scopes are not clearly documented Commit: https://github.com/vim/vim/commit/e0b81136c76a5ab2203eb6f6ece0225f2565e42e Author: Bogdan Barbu <[email protected]> Date: Sat Aug 8 17:11:42 2026 +0000 runtime(doc): DocBook syntax variable scopes are not clearly documented Problem: DocBook syntax variable scopes of docbk_type and docbk_ver are not clearly documented: docbk_type uses the wrong scope (it should be buffer-local) and docbk_ver also has an undocumented buffer-local version. Solution: Correct the docbk_type examples and describe the docbk_ver precedence. closes: #20977 Signed-off-by: Bogdan Barbu <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 80f9baa4a..577229ae3 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.2. Last change: 2026 Aug 02 +*syntax.txt* For Vim version 9.2. Last change: 2026 Aug 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1407,18 +1407,20 @@ are using the "b:docbk_type" variable should be set. Vim does this for you automatically if it can recognize the type. When Vim can't guess it the type defaults to XML. You can set the type manually: > - :let docbk_type = "sgml" + :let b:docbk_type = "sgml" or: > - :let docbk_type = "xml" + :let b:docbk_type = "xml" You need to do this before loading the syntax file, which is complicated. Simpler is setting the filetype to "docbkxml" or "docbksgml": > :set filetype=docbksgml or: > :set filetype=docbkxml -You can specify the DocBook version: > - :let docbk_ver = 3 -When not set 4 is used. +You can specify the DocBook version for the current buffer: > + :let b:docbk_ver = 3 +When "b:docbk_ver" is not set, "g:docbk_ver" is used as a global fallback: > + :let g:docbk_ver = 3 +When neither variable is set, version 4 is used. DOSBATCH *dosbatch.vim* *ft-dosbatch-syntax* -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wskdV-002Fin-E0%40256bit.org.