forked from hrsh7th/vim-vsnip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.themisrc
46 lines (37 loc) · 1.43 KB
/
.themisrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
call themis#option('recursive', 1)
call themis#option('exclude', '\.vim$')
set shiftwidth=2
set expandtab
if get(environ(), 'VIRTUALEDIT', '0') == '1'
set virtualedit=all
else
set virtualedit=
endif
let g:vsnip_test_mode = v:true
let g:vsnip_snippet_dir = fnamemodify(expand('<sfile>'), ':h') . '/misc'
let &runtimepath .= ',' . g:vsnip_snippet_dir . '/source_spec_vscode'
let g:vsnip_filetypes = {}
let g:vsnip_filetypes.source_spec_enhanced = ['source_spec']
imap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
smap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
imap <expr> <Tab> vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : '<Tab>'
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
imap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
smap <expr> <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>'
imap <Plug>(vsnip-assert) <C-r>=<SID>assert()<CR>
nmap <expr><Plug>(vsnip-assert) <SID>assert()
smap <expr><Plug>(vsnip-assert) <SID>assert()
function! s:assert() abort
let l:keys = sort(keys(g:vsnip_assert))
if len(l:keys) > 0
let l:session = vsnip#get_session()
if !empty(l:session)
call l:session.on_text_changed()
endif
let l:key = l:keys[0]
let l:Fn = g:vsnip_assert[l:key]
unlet! g:vsnip_assert[l:key]
call l:Fn()
endif
return ''
endfunction