Comments (3)
Hi!
I have a custom
\beforetext
command that adds text on the left side of an equation. Following #2755, I'd like to know how to setup a local syntax to tellvimtex
that what's inside is text. I looked up the commit you made forwitharrows
and could easily reproduce it, but my command is not attached to any package. Would you be able to point me in the right direction to do that?syntax match texMathCmdText "\\beforetext\>" \ contained skipwhite nextgroup=texMathTextArg
I believe you can solve this with the g:vimtex_syntax_custom_cmds
option. Specify it wherever you specify your other VimTeX options. Something like this:
let g:vimtex_syntax_custom_cmds = [
\ {'name': 'beforetext', 'mathmode': v:true,
\ 'nextgroup': 'texMathTextArg'},
\]
As always, thank you for this fantastic plugin and your maintenance of it :-).
Thanks for the kind words! <3
from vimtex.
Thank you! I must've missed it, I just started using the useful concealing tools and changed the highlighting groups, but didn't stumble on that.
I'll be the first to admit it's easy to miss things when the documentation has reached 7000 lines of text... in any case, no problem!
from vimtex.
Thank you! I must've missed it, I just started using the useful concealing tools and changed the highlighting groups, but didn't stumble on that.
Cheers! :-)
from vimtex.
Related Issues (20)
- Error detected while processing function callback HOT 1
- ClassWarning is not detected HOT 1
- Lag, (probably not related with known matchparen issue HOT 4
- Add conceal for corners HOT 1
- Poor error output in bibliography issue HOT 3
- Autocompletion using '\' instead of '/' in paths (Windows 10) HOT 7
- Cannot call zathura from vimtex HOT 4
- vimtex doesn't seem to recognise latexmkrc requesting lualatex HOT 4
- An option to deal with dot when toggling inline and displaymath with `ts$` HOT 1
- Real-time scrolling output of latexmk (or compiler) HOT 4
- Runtime compiler not using xelatex using `vimtex_compiler_latexmk`? HOT 2
- Highlight illegal characters HOT 10
- Implement a .lua configuration HOT 3
- how do I unmap just some mappings? HOT 4
- Inconsistent syntax highlighting in subscript and superscript HOT 1
- Help Add custom concealing rule for VimTeX on neovim HOT 3
- How do I get rid of a "latexmk is not executable" error? HOT 4
- supertab completion takes 20 seconds to complete a word when using many latex packages HOT 5
- Inverse search does not work with sioyek HOT 5
- Magic comment for compiler fails if there are trailing spaces HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimtex.