dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit cf44d0ac49db1f121e4912ba1bb6cacb5b0bdc98
parent 2b77d6f337286faaebf0ef4bc388f043c4ca9705
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu,  4 Apr 2019 15:57:36 +0200

Modified ultisnippets


Former-commit-id: 63fb3ca840b40a028b99d0af93396a6ca62fb3e7
Diffstat:
Mvim/ultisnips/tex.snippets | 37++++++++++++++++++++++++++++++++++---
Avim/ultisnips/vimwiki.snippets | 0
2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/vim/ultisnips/tex.snippets b/vim/ultisnips/tex.snippets @@ -3,7 +3,8 @@ snippet beg "begin{} / end{}" bA $0 \end{$1} endsnippet -snippet mk "Math" wA + +snippet mk "Inline math" wA $${1}$`!p if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']: snip.rv = ' ' @@ -11,25 +12,55 @@ else: snip.rv = '' `$2 endsnippet -snippet dm "Math" wA + +snippet dm "Displayed math" wA \[ $1 .\] $0 endsnippet + snippet '([A-Za-z])(\d)' "auto subscript" wrA `!p snip.rv = match.group(1)`_`!p snip.rv = match.group(2)` endsnippet -snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA +snippet '([A-Za-z])_(\d\d)' "auto subscript" wrA `!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`} endsnippet + snippet // "Fraction" iA \\frac{$1}{$2}$0 endsnippet + snippet '((\d+)|(\d*)(\\)?([A-Za-z]+)((\^|_)(\{\d+\}|\d))*)/' "Fraction" wrA \\frac{`!p snip.rv = match.group(1)`}{$1}$0 endsnippet + snippet title "Title and author" \title{$1} \author{$2} endsnippet + +snippet / "Fraction" iA +\\frac{${VISUAL}}{$1}$0 +endsnippet + +priority 10 +snippet "bar" "bar" riA +\overline{$1}$0 +endsnippet + +priority 100 +snippet "([a-zA-Z])bar" "bar" riA +\overline{`!p snip.rv=match.group(1)`} +endsnippet + +priority 10 +snippet "hat" "hat" riA +\hat{$1}$0 +endsnippet + +priority 100 +snippet "([a-zA-Z])hat" "hat" riA +\hat{`!p snip.rv=match.group(1)`} +endsnippet + diff --git a/vim/ultisnips/vimwiki.snippets b/vim/ultisnips/vimwiki.snippets