Skip to content

Commit

Permalink
feat(keymaps)!: move to window now uses ctrl hjkl
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jan 6, 2023
1 parent 92c22d7 commit 00ec5a9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lua/lazyvim/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ local util = require("lazyvim.util")
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })

-- Move to window using the <meta> movement keys
vim.keymap.set("n", "<A-left>", "<C-w>h")
vim.keymap.set("n", "<A-down>", "<C-w>j")
vim.keymap.set("n", "<A-up>", "<C-w>k")
vim.keymap.set("n", "<A-right>", "<C-w>l")

-- Resize window using <shift> arrow keys
vim.keymap.set("n", "<S-Up>", "<cmd>resize +2<CR>")
vim.keymap.set("n", "<S-Down>", "<cmd>resize -2<CR>")
vim.keymap.set("n", "<S-Left>", "<cmd>vertical resize -2<CR>")
vim.keymap.set("n", "<S-Right>", "<cmd>vertical resize +2<CR>")
-- Move to window using the <ctrl> hjkl keys
vim.keymap.set("n", "<C-h>", "<C-w>h")
vim.keymap.set("n", "<C-j>", "<C-w>j")
vim.keymap.set("n", "<C-k>", "<C-w>k")
vim.keymap.set("n", "<C-l>", "<C-w>l")

-- Move Lines
vim.keymap.set("n", "<A-j>", ":m .+1<CR>==")
Expand Down

0 comments on commit 00ec5a9

Please sign in to comment.