Sometimes I want Ultisnip not to expand a snippet because I need this word as it was typed, even though is mapped to a snippet(of course in a perfect world of perfect snippets this wouldn't have happened).

I need to press ESC and 2 times u and even so it doesn't work sometimes. Any other way?

  • 1
    Have you tried literally inserting the character that causes the expansion by using control-V? Doesnt Ultisnips require you to hit a « trigger » first?
    – D. Ben Knoble
    Oct 4, 2019 at 3:25
  • 1
    I assume the OP is talking about snippets with autotriggering (:h UltiSnips-autotrigger). Afaik, the answer is no. However, I could imagine a toggle function to disable autotrigger in UltiSnips snippets temporarily. There is a closed related issue #874 on github.
    – Hotschke
    Oct 5, 2019 at 8:40

1 Answer 1


I have made the following code, just in case:

nmap <D-I> :let @z=input('enter text: ') <bar> norm "zp<CR>

Simply, type new text to be inserted , where it is not effected by i-mappings or Ultisnip.

  • Simplified: :put =input(...)<CR>
    – D. Ben Knoble
    Nov 16, 2019 at 14:36
  • No, put doesn't work character wise the same way.
    – eyal karni
    Nov 16, 2019 at 15:13
  • Well sure but since youre hacking around a bizarre case anyway
    – D. Ben Knoble
    Nov 16, 2019 at 15:24
  • 1
    pressing Ctrl-V does not work? Nov 17, 2019 at 16:30
  • Maybe, but it is also useful for mapping such as jk. And it takes longer to do ctrlv.
    – eyal karni
    Nov 17, 2019 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.