def vim_parser(start_chars, generic_repeat=True, is_motion=False):
    """Decorator for function that handle vim commands

    Command Handling functions must follow the signature:

        function( editor, repeat, cmd )

    These functions should never be called directly, but instead
    be called through the GetHandler and DoHandle functions.

    The handler functions should always decorate themselves with this
    decorator.

    The purpose of this decorator is to indicate:
        * What is the first char of commands that the handler can handle
            - So that GetHandler can find the correct handler for a vim command
        * Whether it's a motion
            - Some commands operate on motions
        * How to handle the repeat parameter
            - For most command, no repeat is the same as 1 repeat, but for
              some commands, this is not the case

    """
    def decorator(handler):
        handler.is_parser = True
        handler.start_chars = start_chars
        handler.generic_repeat = generic_repeat
        handler.is_motion = is_motion
        return handler
    return decorator