@contextmanager
def suspend_proxy_edits():
 if (not isinstance(_vim.buf, VimBufferProxy)):
  (yield)
 else:
  try:
   _vim.buf._disable_edits()
   (yield)
  finally:
   _vim.buf._enable_edits()

@ contextmanager def suspend_proxy_edits ( ) : if ( not isinstance ( _vim . buf , VimBufferProxy ) ) : ( yield ) else : try : _vim . buf . _disable_edits ( ) ( yield ) finally : _vim . buf . _enable_edits ( )
prevents changes being applied to the snippet stack while function call .