From 643e43e30f01cd9c7ded92f8574867c6dd90defc Mon Sep 17 00:00:00 2001 From: Jidbo Date: Sat, 23 May 2020 20:12:36 +0200 Subject: [PATCH] readd ultisnipps --- nvim/init.vim | 14 ++++++++++++++ vim/vim/snipps/tex.snippets | 12 ++++-------- vim/vim/snipps/vim.snippets | 5 +++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 6ff9127..0fddcf5 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -9,6 +9,9 @@ Plug 'tpope/vim-commentary' " brackets management Plug 'tpope/vim-surround' +" Snippets +Plug 'SirVer/ultisnips' + " WINDOW MANAGEMENT " tmux navigator @@ -304,3 +307,14 @@ augroup lsp_install " call s:on_lsp_buffer_enabled only for languages that has the server registered. autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() augroup END + +" UltiSnips setup + +" Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. +let g:UltiSnipsExpandTrigger="" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" +let g:UltiSnipsSnippetDirectories=[$HOME."/.vim/snipps"] + +" If you want :UltiSnipsEdit to split your window. +let g:UltiSnipsEditSplit="vertical" diff --git a/vim/vim/snipps/tex.snippets b/vim/vim/snipps/tex.snippets index a9b8af7..21f5884 100644 --- a/vim/vim/snipps/tex.snippets +++ b/vim/vim/snipps/tex.snippets @@ -1,11 +1,3 @@ -snippet s "symbol" -\\$0 -endsnippet - -snippet mb "Math Braces" -\\{ $1 \\}$0 -endsnippet - snippet mal "Math inline" $ $1 $$0 endsnippet @@ -30,6 +22,10 @@ snippet abs "Absolute" i \\lvert $1 \\rvert$0 endsnippet +snippet mb "Math Braces" +\\{ $1 \\}$0 +endsnippet + snippet fra "Fraction" i \frac\{${1:numerator}\}\{${2:demoninator}\}$0 endsnippet diff --git a/vim/vim/snipps/vim.snippets b/vim/vim/snipps/vim.snippets index ad2afcc..82dfd1e 100644 --- a/vim/vim/snipps/vim.snippets +++ b/vim/vim/snipps/vim.snippets @@ -1,4 +1,5 @@ snippet plug "Plugin Snippet" -" $1 -Plugin '$0' +" $2 +Plug '$1' +$0 endsnippet