2
I got it to work:
global !p
def mycontext(char):
x = vim.current.window.buffer
y = vim.current.window.cursor[0]
z = vim.current.window.cursor[1]
try:
return x[y-1][z-1] + x[y-1][z] != char
except:
return True
endglobal
context "mycontext('()')"
snippet ( &...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
plugin-ultisnips × 93snippets × 14
filetype-tex × 11
key-bindings × 10
vimscript × 10
vimrc × 9
autocompletion × 6
plugin-vimtex × 6
neovim × 5
plugin-you-complete-me × 4
gvim × 3
vimscript-python × 3
plugin-supertab × 3
regular-expression × 2
macvim × 2
filetype-markdown × 2
plugin-vimwiki × 2
python × 2
buffers × 1
indentation × 1
autocmd × 1
insert-mode × 1
normal-mode × 1
plugin-system × 1
macos × 1