Skip to content
This repository was archived by the owner on Jul 27, 2018. It is now read-only.
This repository was archived by the owner on Jul 27, 2018. It is now read-only.

UltiSnips in VISUAL #206

@luzik

Description

@luzik

With let g:UltiSnipsExpandTrigger = "<tab>" I can Shift+v, select lines, press TAB write tryTAB and I got python try except snip working with selected lines inside.

After using NCM documented:

let g:UltiSnipsExpandTrigger = "<Plug>(ultisnips_expand)"
let g:UltiSnipsJumpForwardTrigger = "<c-j>"
let g:UltiSnipsJumpBackwardTrigger = "<c-k>"
let g:UltiSnipsRemoveSelectModeMappings = 0
inoremap <silent> <c-u> <c-r>=cm#sources#ultisnips#trigger_or_popup("\<Plug>(ultisnips_expand)")<cr>
imap <expr> <CR>  (pumvisible() ?  "\<c-y>\<Plug>(expand_or_nl)" : "\<CR>")
imap <expr> <Plug>(expand_or_nl) (cm#completed_is_snippet() ? "\<C-U>":"\<CR>")

I am unable to do same thing with Ctrl-u. Am I missing something ?

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