Open
Description
- NVIM: v0.5.0-dev+nightly-709-g554468cc0
- vsnip: 395d200
Consider the following vim snippet that contains foldmarkers:
{
"function with foldmarker": {
"prefix": "function",
"body": [
"function ${1:Foo}(${2}) \"{{{",
"\t${3}",
"endfunction \"}}}"
]
}
}
If expanded, the body is folded, and selected instead of the first marker:
vimrc:
set foldmethod=marker
set runtimepath+=/path/to/vim-vsnip
let g:vsnip_snippet_dir='/path/to/vsnip'
" Expand
imap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
smap <expr> <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>'
" Jump forward or backward
imap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
smap <expr> <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>'
Metadata
Metadata
Assignees
Labels
No labels