amoffat / snake

Full Python Scripting in Vim
1.41k stars 56 forks source link

How to define a vim command? #19

Open ly0 opened 8 years ago

ly0 commented 8 years ago

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.

idbrii commented 4 years ago

Looks like #28 is a step towards doing this.