• Stars
    star
    517
  • Rank 85,077 (Top 2 %)
  • Language
    Lua
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mouse gesture plugin for neovim

gesture.nvim

ci

gesture.nvim is a mouse gesture plugin for Neovim (nightly).

Example

vim.opt.mouse = "a"

vim.keymap.set("n", "<LeftDrag>", [[<Cmd>lua require("gesture").draw()<CR>]], { silent = true })
vim.keymap.set("n", "<LeftRelease>", [[<Cmd>lua require("gesture").finish()<CR>]], { silent = true })

-- or if you would like to use right click
vim.keymap.set("n", "<RightMouse>", [[<Nop>]])
vim.keymap.set("n", "<RightDrag>", [[<Cmd>lua require("gesture").draw()<CR>]], { silent = true })
vim.keymap.set("n", "<RightRelease>", [[<Cmd>lua require("gesture").finish()<CR>]], { silent = true })

local gesture = require("gesture")
gesture.register({
  name = "scroll to bottom",
  inputs = { gesture.up(), gesture.down() },
  action = "normal! G",
})
gesture.register({
  name = "next tab",
  inputs = { gesture.right() },
  action = "tabnext",
})
gesture.register({
  name = "previous tab",
  inputs = { gesture.left() },
  action = function(ctx) -- also can use callable
    vim.cmd.tabprevious()
  end,
})
gesture.register({
  name = "go back",
  inputs = { gesture.right(), gesture.left() },
  -- map to `<C-o>` keycode
  action = function()
    vim.api.nvim_feedkeys(vim.keycode("<C-o>"), "n", true)
  end,
})

More Repositories

1

cmdbuf.nvim

Alternative command-line window plugin for neovim
Lua
110
star
2

piemenu.nvim

Pie menu plugin for neovim
Lua
93
star
3

vusted

A busted wrapper for testing neovim plugin
Lua
75
star
4

promise.nvim

Promise implementation for neovim lua
Lua
50
star
5

ctrlb.nvim

Control web browsers with neovim
TypeScript
30
star
6

reacher.nvim

Displayed range search buffer
Lua
25
star
7

optpack.nvim

Neovim plugin manager that uses only opt packages
Lua
22
star
8

lreload.nvim

Hot-reloading manager for neovim lua plugin development
Lua
20
star
9

curstr.nvim

Lua
17
star
10

dotfiles

My configuration files
Lua
16
star
11

zebrazone.nvim

🦓 Make neovim buffer striped
Lua
15
star
12

waitevent.nvim

Neovim plugin to avoid nested nvim
Lua
13
star
13

cmp-neosnippet

nvim-cmp source for neosnippet
Lua
12
star
14

helpeek.vim

A plugin for peeking help 👀
Vim Script
9
star
15

action-setup-nvim-lua

Setup environments for neovim plugin written in lua
JavaScript
9
star
16

ctrlb

Web extension for controling web browsers
TypeScript
8
star
17

stlparts.nvim

Neovim lua statusline components
Lua
5
star
18

thetto.nvim

Lua
5
star
19

importgraph.nvim

Neovim plugin to generate import graph
Lua
5
star
20

assertlib.nvim

Lua
5
star
21

wintablib.nvim

Neovim lua window/tab functions
Lua
4
star
22

denite-autocmd

denite.nvim source for autocmd
Python
4
star
23

nvimtool

Lua
4
star
24

termnavi.nvim

Lua
4
star
25

kivi.nvim

Lua
4
star
26

cmdhndlr.nvim

Lua
4
star
27

hlmsg.nvim

Neovim plugin to get highlighted message history
Lua
4
star
28

tracebundler.nvim

Trace and bundle neovim lua for debugging
Lua
3
star
29

pandoc-vim-help

Lua
3
star
30

listdefined.nvim

Lua
3
star
31

flompt.nvim

Lua
3
star
32

requireall.nvim

Lua
3
star
33

vendorlib.nvim

Lua
2
star
34

pluginbuf.nvim

Lua
2
star
35

gettest.nvim

Neovim plugin to get test structures
Lua
2
star
36

unionbuf.nvim

Lua
2
star
37

mapemo

A map with memo web app
TypeScript
2
star
38

counteria.nvim

Go
2
star
39

genvdoc

Lua
2
star
40

runtimetable.nvim

Lua
2
star
41

suball.nvim

Neovim plugin to substitute with keeping cases
Lua
2
star
42

wsxhub

Go
2
star
43

misclib.nvim

Neovim lua misc
Lua
2
star
44

lsp-handler-intercept.nvim

Lua
1
star
45

virtes.nvim

Lua
1
star
46

docfilter.nvim

Lua
1
star
47

searcho.nvim

Lua
1
star
48

qaper

Go
1
star
49

gh-set-iteration

Go
1
star
50

ultramarine.nvim

color scheme
Lua
1
star
51

kiview

Vim Script
1
star
52

denite-keymap

denite.nvim source for keymap
Python
1
star
53

aliaser.nvim

A neovim plugin to defines aliases
Lua
1
star
54

filetypext.nvim

Neovim plugin to convert filetype to file name
Lua
1
star
55

vimonga

Rust
1
star
56

obhook.nvim

Lua
1
star
57

deno_sqlite_schema

TypeScript
1
star