garbas / vim-snipmate

snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim.
www.vim.org/scripts/script.php?script_id=2540
2.01k stars 181 forks source link

SnipMate is not clear when a snippet lacks a hard tab #284

Open ajzafar opened 3 years ago

ajzafar commented 3 years ago

from @sphuff in another issue, moved here as it is a separate issue:

I'm seeing the same error when I have a malformed snippet.

Minimal reproduction:

snippet cl
    console.log($1)

Open a javascript file, and type cl - works correctly. Now modify the snippet to the incorrect

snippet cl
console.log($1)

The open nvim window will have the following error after typing the snippet, even after the snippet is fixed: Error detected while processing function snipMate#TriggerSnippet[43]..<SNR>83_state_jump_stop[4]..<SNR>83_state_update_changes:

I had to fix the snippet and reopen a new nvim window to fix. This is obviously a case of user error, but a more detailed error message would be helpful