File: snipmate.py

package info (click to toggle)
vim-ultisnips 3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,924 kB
  • sloc: python: 8,353; sh: 64; makefile: 38
file content (31 lines) | stat: -rw-r--r-- 798 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
# encoding: utf-8

"""A snipMate snippet after parsing."""

from UltiSnips.snippet.definition.base import SnippetDefinition
from UltiSnips.snippet.parsing.snipmate import parse_and_instantiate


class SnipMateSnippetDefinition(SnippetDefinition):

    """See module doc."""

    SNIPMATE_SNIPPET_PRIORITY = -1000

    def __init__(self, trigger, value, description, location):
        SnippetDefinition.__init__(
            self,
            self.SNIPMATE_SNIPPET_PRIORITY,
            trigger,
            value,
            description,
            "",
            {},
            location,
            None,
            {},
        )

    def instantiate(self, snippet_instance, initial_text, indent):
        parse_and_instantiate(snippet_instance, initial_text, indent)