diff options
author | Yigit Sever | 2021-11-14 23:53:41 +0300 |
---|---|---|
committer | Yigit Sever | 2021-11-14 23:53:41 +0300 |
commit | 0513efb0c155264ac8f31105d3edade87acc6b88 (patch) | |
tree | 37ba57233ab5411d9172d99fa2713ef143eecbfc | |
parent | 07fd9c5f4f905fd1335846eb8acfe815f9261504 (diff) | |
download | dotfiles-0513efb0c155264ac8f31105d3edade87acc6b88.tar.gz dotfiles-0513efb0c155264ac8f31105d3edade87acc6b88.tar.bz2 dotfiles-0513efb0c155264ac8f31105d3edade87acc6b88.zip |
nvim: latex snippet math context
-rw-r--r-- | .config/nvim/my_snippets/tex.snippets | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.config/nvim/my_snippets/tex.snippets b/.config/nvim/my_snippets/tex.snippets index ea34781..f81ad94 100644 --- a/.config/nvim/my_snippets/tex.snippets +++ b/.config/nvim/my_snippets/tex.snippets | |||
@@ -116,6 +116,7 @@ snippet // "Fraction" iA | |||
116 | \\frac{$1}{$2}$0 | 116 | \\frac{$1}{$2}$0 |
117 | endsnippet | 117 | endsnippet |
118 | 118 | ||
119 | context "math()" | ||
119 | snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "Fraction" wrA | 120 | snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "Fraction" wrA |
120 | \\frac{`!p snip.rv = match.group(1)`}{$1}$0 | 121 | \\frac{`!p snip.rv = match.group(1)`}{$1}$0 |
121 | endsnippet | 122 | endsnippet |