Add snippets support
This commit is contained in:
parent
c2a403a7d5
commit
f2b7cf493e
5 changed files with 37 additions and 0 deletions
9
_config/nvim/UltiSnips/c.snippets
Normal file
9
_config/nvim/UltiSnips/c.snippets
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
snippet main
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
endsnippet
|
9
_config/nvim/UltiSnips/make.snippets
Normal file
9
_config/nvim/UltiSnips/make.snippets
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
snippet latex
|
||||||
|
TEX := $(wildcard *.tex)
|
||||||
|
|
||||||
|
$1.pdf: ${TEX}
|
||||||
|
pdflatex -jobname=$1 $^
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf *.aux *.log *.pdf
|
||||||
|
endsnippet
|
16
_config/nvim/UltiSnips/plaintex.snippets
Normal file
16
_config/nvim/UltiSnips/plaintex.snippets
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
snippet doc
|
||||||
|
\documentclass[a4paper]{article}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||||
|
$0
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet begin
|
||||||
|
\begin{$1}
|
||||||
|
$0
|
||||||
|
\end{$1}
|
||||||
|
endsnippet
|
0
_config/nvim/UltiSnips/snippets.snippets
Normal file
0
_config/nvim/UltiSnips/snippets.snippets
Normal file
|
@ -16,6 +16,7 @@ Plug 'terryma/vim-multiple-cursors'
|
||||||
" Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' }
|
" Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' }
|
||||||
Plug 'luochen1990/rainbow'
|
Plug 'luochen1990/rainbow'
|
||||||
" Plug 'wlangstroth/vim-racket'
|
" Plug 'wlangstroth/vim-racket'
|
||||||
|
Plug 'sirver/ultisnips'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
let g:deoplete#enable_at_startup = 1
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
@ -45,6 +46,7 @@ endfunction
|
||||||
|
|
||||||
let g:rainbow_active = 1
|
let g:rainbow_active = 1
|
||||||
let g:syntastic_enable_racket_racket_checker = 1
|
let g:syntastic_enable_racket_racket_checker = 1
|
||||||
|
let g:syntastic_nasm_nasm_args = '-f elf64'
|
||||||
let g:syntastic_python_checkers = ['python']
|
let g:syntastic_python_checkers = ['python']
|
||||||
let g:lsc_auto_map = {
|
let g:lsc_auto_map = {
|
||||||
\ 'GoToDefinition': '<C-]>',
|
\ 'GoToDefinition': '<C-]>',
|
||||||
|
@ -82,6 +84,7 @@ autocmd FileType gitcommit setlocal spell spelllang=en
|
||||||
autocmd TermOpen,TermEnter * setlocal nonumber norelativenumber nospell nohlsearch
|
autocmd TermOpen,TermEnter * setlocal nonumber norelativenumber nospell nohlsearch
|
||||||
autocmd Filetype tex,markdown,mail setlocal linebreak spell spelllang=de
|
autocmd Filetype tex,markdown,mail setlocal linebreak spell spelllang=de
|
||||||
autocmd BufNewFile *.{h,hpp} call <SID>insert_gates()
|
autocmd BufNewFile *.{h,hpp} call <SID>insert_gates()
|
||||||
|
autocmd BufNewFile,BufRead *.asm set filetype=nasm
|
||||||
|
|
||||||
set spelllang=de,en
|
set spelllang=de,en
|
||||||
set complete+=kspell
|
set complete+=kspell
|
||||||
|
|
Loading…
Add table
Reference in a new issue