From d2be3412cc2f98dba510c28193b83e2168773f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Mon, 11 Nov 2024 12:57:16 +0100 Subject: [PATCH] keymap --- lazy-lock.json | 1 - lua/zak/plugins.lua | 2 +- lua/zak/remap.lua | 15 +++++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index a54f116..2a59325 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,7 +6,6 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" }, "go.nvim": { "branch": "master", "commit": "2153f9ee6178dfd625b1a874eab6399fd0a2d984" }, "guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" }, "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, diff --git a/lua/zak/plugins.lua b/lua/zak/plugins.lua index 1a03669..2f94531 100644 --- a/lua/zak/plugins.lua +++ b/lua/zak/plugins.lua @@ -19,7 +19,7 @@ return require('lazy').setup({ 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' } }, - 'github/copilot.vim', + -- 'github/copilot.vim', { 'numToStr/Comment.nvim', opts = { diff --git a/lua/zak/remap.lua b/lua/zak/remap.lua index 3e76bd1..9fa122e 100644 --- a/lua/zak/remap.lua +++ b/lua/zak/remap.lua @@ -78,13 +78,24 @@ vim.api.nvim_set_keymap('n', '', 'j', { noremap = true, silent = tr vim.api.nvim_set_keymap('n', '', 'k', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '', 'l', { noremap = true, silent = true }) +-- Resize splits with Ctrl+Shift+h/j/k/l +vim.api.nvim_set_keymap('n', '', ':vertical resize +2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', '', ':resize -2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', '', ':resize +2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', '', ':vertical resize -2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('t', '', ':vertical resize +2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('t', '', ':horizontal resize -2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('t', '', ':resize +2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('t', '', ':vertical resize -2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('v', '', ':vertical resize +2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('v', '', ':resize -2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('v', '', ':resize +2', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('v', '', ':vertical resize -2', { noremap = true, silent = true }) -- swap between windows vim.keymap.set("n", ";", "w") vim.keymap.set("v", ";", "w") -vim.keymap.set("i", ";", "w") vim.api.nvim_set_keymap("t", "", "w", { noremap = true, silent = true }) - -- greatest remap ever vim.keymap.set("x", "p", [["_dP]])