Vim Command Parser
Vim's commands are powerful. This library is meant to parse those that fit a general syntax of:
[count][operator][count][motion]
As defined in vim docs
Usage
var Parser = require('vim-command-parser'), parser = new Parser();
Format
Input: command string
parser
Output: object
description: '{operator}{count}{motion}' value: 'c' 3 'fa'
Why is this useful? Imagine implementing the actual commands like so:
//Define command handlersvar commands = { whilect-- this; };
//Use the parser to map keystrokes to handlersvar keyBuffer = '';vim
TODO:
- Registers