Skip to content

Does not work for snippet with folding #192

Open
@e-kwsm

Description

@e-kwsm
  • 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:

snippet-w-fmr

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions