add ultisnips plugin
This commit is contained in:
parent
1bbdd00847
commit
69aacb55e5
6 changed files with 78 additions and 2 deletions
21
.vim/snipps/blade.snippets
Normal file
21
.vim/snipps/blade.snippets
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
extends php, html
|
||||||
|
snippet var "Display Variable"
|
||||||
|
{{ $1 }} $0
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet each "For Each Loop"
|
||||||
|
@foreach ($1 as $2)
|
||||||
|
$0
|
||||||
|
@endforeach
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet sec "Section"
|
||||||
|
@section('$1')
|
||||||
|
$0
|
||||||
|
@endsection
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ext "extends statement"
|
||||||
|
@extends('$1')
|
||||||
|
$0
|
||||||
|
endsnippet
|
5
.vim/snipps/css.snippets
Normal file
5
.vim/snipps/css.snippets
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
snippet id "rule for id"
|
||||||
|
#$1 {
|
||||||
|
$0
|
||||||
|
}
|
||||||
|
endsnippet
|
22
.vim/snipps/html.snippets
Normal file
22
.vim/snipps/html.snippets
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
extends css
|
||||||
|
snippet div "Div container"
|
||||||
|
<div class="$1">
|
||||||
|
$0
|
||||||
|
</div>
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet tag "generic Element"
|
||||||
|
<${1:tag}${2: class="$3"}>
|
||||||
|
$0
|
||||||
|
</$1>
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet tagi "generic inline Element"
|
||||||
|
<${1:tag}${2: class="$3"}>$4</$1>$0
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet lin "link element"
|
||||||
|
<a href="$1"${2: class="$3"}>
|
||||||
|
$0
|
||||||
|
</a>
|
||||||
|
endsnippet
|
13
.vim/snipps/php.snippets
Normal file
13
.vim/snipps/php.snippets
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
extends html
|
||||||
|
snippet pubf "Public Function"
|
||||||
|
public function $1($2) {
|
||||||
|
$0
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet prif "Private Function"
|
||||||
|
private function $1($2) {
|
||||||
|
$0
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
4
.vim/snipps/vim.snippets
Normal file
4
.vim/snipps/vim.snippets
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
snippet plug "Plugin Snippet"
|
||||||
|
" $1
|
||||||
|
Plugin '$0'
|
||||||
|
endsnippet
|
15
.vimrc
15
.vimrc
|
@ -21,6 +21,9 @@ Plugin 'docunext/closetag.vim'
|
||||||
" brackets management
|
" brackets management
|
||||||
Plugin 'machakann/vim-sandwich'
|
Plugin 'machakann/vim-sandwich'
|
||||||
|
|
||||||
|
" snippets
|
||||||
|
Plugin 'SirVer/ultisnips'
|
||||||
|
|
||||||
" WINDOW MANAGEMENT
|
" WINDOW MANAGEMENT
|
||||||
" tmux navigator
|
" tmux navigator
|
||||||
Plugin 'christoomey/vim-tmux-navigator'
|
Plugin 'christoomey/vim-tmux-navigator'
|
||||||
|
@ -242,8 +245,6 @@ let g:gitgutter_sign_added = '∙'
|
||||||
let g:gitgutter_sign_modified = '∙'
|
let g:gitgutter_sign_modified = '∙'
|
||||||
let g:gitgutter_sign_removed = '∙'
|
let g:gitgutter_sign_removed = '∙'
|
||||||
let g:gitgutter_sign_modified_removed = '∙'
|
let g:gitgutter_sign_modified_removed = '∙'
|
||||||
nmap ]g :GitGutterNextHunk<CR>
|
|
||||||
nmap [g :GitGutterPrevHunk<CR>
|
|
||||||
augroup VimDiff
|
augroup VimDiff
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd VimEnter,FilterWritePre * if &diff | GitGutterDisable | endif
|
autocmd VimEnter,FilterWritePre * if &diff | GitGutterDisable | endif
|
||||||
|
@ -267,3 +268,13 @@ nmap <Leader>b :ALEFix<CR>
|
||||||
nnoremap <space>l :lnext<CR>
|
nnoremap <space>l :lnext<CR>
|
||||||
nnoremap <space>p :lprevious<CR>
|
nnoremap <space>p :lprevious<CR>
|
||||||
|
|
||||||
|
" UltiSnip setup
|
||||||
|
|
||||||
|
" Trigger configuration
|
||||||
|
let g:UltiSnipsExpandTrigger="<tab>"
|
||||||
|
let g:UltiSnipsJumpForwardTrigger="<tab>"
|
||||||
|
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
||||||
|
|
||||||
|
" If you want :UltiSnipsEdit to split your window.
|
||||||
|
let g:UltiSnipsEditSplit="vertical"
|
||||||
|
let g:UltiSnipsSnippetDirectories=[$HOME."/.vim/snipps"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue