2

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?

eyal karni
  • 1,106
  • 9
  • 33
  • 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 04 '19 at 03: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 05 '19 at 08:40

1 Answers1

0

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.

eyal karni
  • 1,106
  • 9
  • 33