Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/winston0410/cmd-parser.nvim
A command-line parser for neovim for plugin authors.
https://github.com/winston0410/cmd-parser.nvim
neovim neovim-plugin nvim
Last synced: 21 days ago
JSON representation
A command-line parser for neovim for plugin authors.
- Host: GitHub
- URL: https://github.com/winston0410/cmd-parser.nvim
- Owner: winston0410
- Created: 2021-05-24T12:51:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-23T21:59:36.000Z (over 2 years ago)
- Last Synced: 2024-10-12T13:17:03.857Z (about 1 month ago)
- Topics: neovim, neovim-plugin, nvim
- Language: Lua
- Homepage:
- Size: 8.79 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cmd-parser.nvim
I built this plugin to help other plugin authors to easily parse the command inputted by users and do awesome tricks with it.
Input
```lua
local parse_cmd = require'cmd-parser'.parse_cmd
parse_cmd("10+2++,/hello/-3d")
```Output
```lua
{ ["start_increment_number"] = 4,["end_increment"] = -3,["command"] = d,["start_range"] = 10,["end_increment_number"] = -3,["start_increment"] = +2++,["end_range"] = /hello/,}
```## Installtion
### `Paq.nvim`
```lua
paq{'winston0410/cmd-parser.nvim'}
```## Testing
This plugin is well tested. To run the test case or help with testing, you need to install lester
```shell
luarocks install lester
```