https://github.com/pinbraerts/swipe.nvim
jump between buffers on horizontal swipes
https://github.com/pinbraerts/swipe.nvim
horizontal-scrolling lua mousewheel neovim neovim-plugin scrolling
Last synced: 2 months ago
JSON representation
jump between buffers on horizontal swipes
- Host: GitHub
- URL: https://github.com/pinbraerts/swipe.nvim
- Owner: pinbraerts
- Created: 2024-08-11T19:04:51.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T12:10:28.000Z (8 months ago)
- Last Synced: 2025-01-03T09:12:35.210Z (4 months ago)
- Topics: horizontal-scrolling, lua, mousewheel, neovim, neovim-plugin, scrolling
- Language: Lua
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# swipe.nvim
A simple plugin for jumping between buffers on horizontal swipes in
[NeoVim](https://github.com/neovim/neovim)## Installation
Use your favorite plugin manager
## Configuration
```lua
require('swipe').setup {
-- how many MouseScroll keypresses trigger jump
threshold = 20,
-- how fast the arrow window moves (characters per keypress)
speed = 1,
-- how fast the arrow window disappears (ms till backwards motion)
timeout = 50,
-- custom mappings
keymap = {
left = "1gg", -- custom keys
right = function() end, -- custom function
up = { "n", "", "1gg", { silent = true } }, -- custom spec
down = true, -- default mapping
-- down = false, -- disable default mapping
},
-- keymap = false, -- to disable all default mappings
-- actions on swipes
action = {
horizontal = require("swipe.jump").to_different_buffer,
vertical = function(direction) end, -- custom function
},
}
```## Demonstration
[](https://asciinema.org/a/XppWVRGAc3lT9LD1xznzdEA9r)