snippet today "Today" w
`date +"%A, %B %d"`
endsnippet
+
+snippet '([0-9]+)->([0-9]+)' "enumerate list" rw
+`!p
+start = int(match.group(1))
+end = int(match.group(2))
+for i in range(start, end+1):
+ snip.rv += str(i)+"\n"
+`
+endsnippet
# Enviros
-snippet \begin "enviroment" bA
+snippet beg "enviroment" w
\begin{$1}
$0
\end{$1}
\end{proof}
endsnippet
+snippet ibeg "inline enviroment" w
+\begin{$1} $2 \end{$1} $0
+endsnippet
+
+snippet ibmat "inline bmatrix" w
+\begin{bmatrix} $1 \end{bmatrix} $0
+endsnippet
+
+snippet ibsmat "inline small bmatrix" w
+\begin{bsmallmatrix} $1 \end{bsmallmatrix} $0
+endsnippet
+
# FRACTIONS
snippet // "frac" iA
\\frac{$1}{$2}$0
set tabstop=4
set shiftwidth=4
set expandtab
+set hidden
" spell check
setlocal spell
autocmd BufNewFile *.tex 0r ~/.vim/templates/skeleton.tex
autocmd BufNewFile *.html 0r ~/.vim/templates/skeleton.html
autocmd BufNewFile *.rkt 0r ~/.vim/templates/skeleton.rkt
+ autocmd BufNewFile *.xml 0r ~/.vim/templates/skeleton.xml
augroup END
" vim plug
call plug#end()
+" leader for plugins
+let maplocalleader = "\\"
+
" Ultisnips
let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<tab>'
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
let g:UltiSnipsSnippetDirectories=["UltiSnips", "mysnippets"]
+map <localleader>sr :call UltiSnips#RefreshSnippets()<cr>
+
" Vimtex
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'