#NEWLINE# def autocmd( name , pattern = '*' , sync = False , eval = None ) : #NEWLINE# #INDENT# 'Tag a function or plugin method as a Nvim autocommand handler.' #NEWLINE# def dec( f ) : #NEWLINE# #INDENT# f . _nvim_rpc_method_name = 'autocmd:{0}:{1}' . format ( name , pattern ) #NEWLINE# f . _nvim_rpc_sync = sync #NEWLINE# f . _nvim_bind = True #NEWLINE# f . _nvim_prefix_plugin_path = True #NEWLINE# opts = { #NEWLINE# #INDENT# 'pattern' : pattern , #NEWLINE# #UNINDENT# } #NEWLINE# if eval : #NEWLINE# #INDENT# opts [ 'eval' ] = eval #NEWLINE# #UNINDENT# f . _nvim_rpc_spec = { #NEWLINE# #INDENT# 'type' : 'autocmd' , #NEWLINE# 'name' : name , #NEWLINE# 'sync' : sync , #NEWLINE# 'opts' : opts , #NEWLINE# #UNINDENT# } #NEWLINE# return f #NEWLINE# #UNINDENT# return dec