Search code examples
vimultisnips

How do I configure an ultisnip to override an existing snippet?


I use rails.vim but would like to override one or two snippets with my own using ultisnips.

I've created the snippets but since they're already defined by rails.vim a menu now appears when triggered. I'd like my snippets to override the existing one to avoid the menu.


Solution

  • The solution is to use priority directive. All snippets default to a priority of 0. Therefore, adding this to the top of my custom snippets solved the issue:

    # top of custom snippets file
    priority 1