You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
506 B
Python
22 lines
506 B
Python
8 years ago
|
#!/usr/bin/env python
|
||
|
# encoding: utf-8
|
||
|
|
||
|
"""Implements `!v ` VimL interpolation."""
|
||
|
|
||
|
from UltiSnips import _vim
|
||
|
from UltiSnips.text_objects._base import NoneditableTextObject
|
||
|
|
||
|
|
||
|
class VimLCode(NoneditableTextObject):
|
||
|
|
||
|
"""See module docstring."""
|
||
|
|
||
|
def __init__(self, parent, token):
|
||
|
self._code = token.code.replace('\\`', '`').strip()
|
||
|
|
||
|
NoneditableTextObject.__init__(self, parent, token)
|
||
|
|
||
|
def _update(self, done):
|
||
|
self.overwrite(_vim.eval(self._code))
|
||
|
return True
|