https://github.com/ashish0kumar/snake.nvim
🐍 Snake game plugin for Neovim to practice Vim motions
https://github.com/ashish0kumar/snake.nvim
Last synced: 8 months ago
JSON representation
🐍 Snake game plugin for Neovim to practice Vim motions
- Host: GitHub
- URL: https://github.com/ashish0kumar/snake.nvim
- Owner: ashish0kumar
- License: mit
- Created: 2025-06-23T13:02:11.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-06-23T14:57:08.000Z (12 months ago)
- Last Synced: 2025-06-23T15:31:42.786Z (12 months ago)
- Language: Lua
- Homepage:
- Size: 473 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
snake.nvim
Minimal ASCII snake game for Neovim to train your hjkl motions and mode switching muscle memory
## Features
- **`hjkl` movement** - Practice Vim motions
- **Modal gameplay** - Switch between normal and insert mode to eat food
- **ASCII graphics** - Minimal, distraction-free visuals
- **Lightweight** - Zero dependencies, pure Lua
## How to Play
1. Use `hjkl` keys to move the snake (normal mode only)
2. Navigate to food (`*`) and press `i` to enter insert mode
3. Eat the food while in insert mode to grow
4. Press `Esc` to return to normal mode and continue moving
5. Avoid hitting yourself - Game over!
## Installation
### lazy.nvim
```lua
{
'ashish0kumar/snake.nvim',
cmd = 'Snake',
config = function()
require('snake').setup()
end
}
```
### packer.nvim
```lua
use {
'ashish0kumar/snake.nvim',
cmd = 'Snake',
config = function()
require('snake').setup()
end
}
```
### vim-plug
```
Plug 'ashish0kumar/snake.nvim'
```
## Usage
Start the game with:
```
:Snake
```
## Controls
| Key | Action |
|-----|--------|
| `h` `j` `k` `l` | Move snake (normal mode only) |
| `i` | Enter insert mode to eat food |
| `Esc` | Return to normal mode |
| `q` | Quit game |
| `r` | Restart game (when game over) |
## Contributing
Feel free to open issues or submit pull requests!
© 2025-present Ashish Kumar