mirror of
https://github.com/neovim/neovim.git
synced 2026-08-25 16:41:52 +00:00
vim-patch:e0b8113: 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: vim/vim#20977
e0b81136c7
Co-authored-by: Bogdan Barbu <l4b.bogdan.barbu@gmail.com>
This commit is contained in:
@@ -923,18 +923,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 *ft-dosbatch-syntax*
|
||||
|
||||
Reference in New Issue
Block a user