amoffat/snake

How to define a vim command?

ly0 opened this issue · 1 comments

ly0 commented

I can't find how to define a vim command in docs.
codes should like following

@vim_command("reverse")
def reverse():
    replace_word(get_word()[::-1])

and reverse() invokes when I run :reverse.

Looks like #28 is a step towards doing this.