aboutsummaryrefslogtreecommitdiffstats
path: root/after/plugin/hydra.lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2022-07-15 22:49:28 +0200
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2022-07-15 22:49:28 +0200
commitf3692dd749a6215ccbbcca04c8346186fe0359cf (patch)
tree3937be61a7bebeb3ebf53ed19547c43b335697eb /after/plugin/hydra.lua
parent9aea96f6f267c9924462a7ff88e7361ccf736ce7 (diff)
downloadnvim-conf-f3692dd749a6215ccbbcca04c8346186fe0359cf.tar.gz
nvim-conf-f3692dd749a6215ccbbcca04c8346186fe0359cf.zip
Add hydra and replace movements keybingins
Diffstat (limited to 'after/plugin/hydra.lua')
-rw-r--r--after/plugin/hydra.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/after/plugin/hydra.lua b/after/plugin/hydra.lua
new file mode 100644
index 0000000..10c3ddb
--- /dev/null
+++ b/after/plugin/hydra.lua
@@ -0,0 +1,21 @@
+local ok, hydra = pcall(require, "hydra")
+if not ok then
+ return
+end
+
+-- Windows management, move and resize
+hydra({
+ name = "windows",
+ mode = "n",
+ body = "<C-w>",
+ heads = {
+ { '<C-l>', '<C-w>l' },
+ { '<C-h>', '<C-w>h' },
+ { '<C-j>', '<C-w>j' },
+ { '<C-k>', '<C-w>k' },
+ { 'L', '<C-w>2>' },
+ { 'H', '<C-w>2<' },
+ { 'J', '<C-w>2-' },
+ { 'K', '<C-w>2+' },
+ },
+})