summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/context/third/vim/vim.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/context/third/vim/vim.txt')
-rw-r--r--Master/texmf-dist/doc/context/third/vim/vim.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/context/third/vim/vim.txt b/Master/texmf-dist/doc/context/third/vim/vim.txt
index 8bdf5ea0afb..962495811ec 100644
--- a/Master/texmf-dist/doc/context/third/vim/vim.txt
+++ b/Master/texmf-dist/doc/context/third/vim/vim.txt
@@ -478,6 +478,30 @@ To disable loading of vimrc file, use
The default is not to use any vimrc file.
+A vimrc file gets loaded before syntax highlighting is enabled. If you want to
+override the default syntax highlighting scheme, add the appropriate `syn ...`
+commands to a vimrc file, and source that usign
+
+ \definevimtyping
+ [...]
+ [...
+ extras=<name of vimrc file>,
+ ...]
+
+For example, suppose you are using a C++ library that defines `uDouble` as a
+keyword, so you want to highlight it in your code. Use
+
+ \startvimrc[name=cpp_extras]
+ syn keyword Type uDouble
+ \stopvimrc
+
+ \definevimtyping
+ [cpp]
+ [
+ syntax=cpp,
+ extras=cpp_extras,
+ ]
+
Messages and Tracing
--------------------