Others ⇒ vim in terminal and syntax highlight
-
- Posts: 17
- Joined: Mon Aug 20, 2018 3:27 pm
vim in terminal and syntax highlight
I'm currently porting some man pages to LaTeX for the appendix of another documentation project I'm working on.
The color syntax works well enough but one issue -
When I use \begin{Verbatim} it can figure out that $ within are not the start of math.
however I'm actually using \begin{ManVerbatim} where I've defined ManVerbatim via \newtcblisting{ManVerbatim} {}
The vim syntax highlighting no longer figures out that $ within are not related to math mode.
Anyone know of a way to tell the vim syntax highlighting to treat my custom ManVerbatim as if it was verbatim or Verbatim?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Posts: 17
- Joined: Mon Aug 20, 2018 3:27 pm
vim in terminal and syntax highlight
https://gitlab.com/Pipfrosch/librelampd ... .cnf.5.tex
Line 326 (line number may change as I work on it) in the gitlab rendering shows where start of issue is - I don't care about gitlab getting it right, but it's annoying in vim where I am editing the file.
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
vim in terminal and syntax highlight
Code: Select all
syntax region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>"
Code: Select all
:syntax region texZone start="\\begin{ManVerbatim}" end="\\end{ManVerbatim}\|%stopzone\>"
-
- Posts: 17
- Joined: Mon Aug 20, 2018 3:27 pm
vim in terminal and syntax highlight
-
- Posts: 17
- Joined: Mon Aug 20, 2018 3:27 pm
vim in terminal and syntax highlight
Also discovered (while reading the tex.vim file) that adding
%stopzone
to the LaTeX file also tells vim to restore normal syntax highlight when a custom Verbatim environment causes a problem.
Adding note here in case search engines send people here.