diff --git a/.config/nvim/lua/core/keymaps.lua b/.config/nvim/lua/core/keymaps.lua index 8953d32..cba9c53 100644 --- a/.config/nvim/lua/core/keymaps.lua +++ b/.config/nvim/lua/core/keymaps.lua @@ -15,7 +15,6 @@ vim.g.mapleader = " " -- term_mode = "t", -- command_mode = "c", --- Normal -- -- Better window navigation keymap("n", "", "h", opts) keymap("n", "", "j", opts) @@ -23,22 +22,22 @@ keymap("n", "", "k", opts) keymap("n", "", "l", opts) -- Resize with arrows -keymap("n", "", ":resize -2", opts) -keymap("n", "", ":resize +2", opts) -keymap("n", "", ":vertical resize -2", opts) -keymap("n", "", ":vertical resize +2", opts) +keymap("n", "", ":resize -2", opts) +keymap("n", "", ":resize +2", opts) +keymap("n", "", ":vertical resize -2", opts) +keymap("n", "", ":vertical resize +2", opts) -- Navigate buffers -keymap("n", "", ":bnext", opts) -keymap("n", "", ":bnext", opts) -keymap("n", "", ":bprevious", opts) -keymap("n", "", ":bprevious", opts) +keymap("n", "", ":bnext", opts) +keymap("n", "", ":bnext", opts) +keymap("n", "", ":bprevious", opts) +keymap("n", "", ":bprevious", opts) -- Clear highlights -keymap("n", "h", "nohlsearch", opts) +keymap("n", "h", "nohlsearch", opts) -- Close buffers -keymap("n", "", "Bdelete!", opts) +keymap("n", "", "Bdelete!", opts) -- LSP / Diagnostics keymap("n", "xx", "TroubleToggle", opts) @@ -61,43 +60,34 @@ keymap("n", "ls", "lua vim.lsp.buf.signature_help()", opts) -- Better paste keymap("v", "p", '"_dP', opts) --- Insert -- -- Press jk fast to enter keymap("i", "jk", "", opts) --- Visual -- -- Stay in indent mode keymap("v", "<", "", ">gv", opts) -- NeoTree -keymap("n", "e", ":Neotree toggle", opts) -keymap("n", "gg", ":Neotree float git_status", opts) +keymap("n", "e", ":Neotree toggle", opts) +keymap("n", "gg", ":Neotree float git_status", opts) -- Telescope -keymap("n", "ff", ":Telescope find_files", opts) -keymap("n", "", ":Telescope find_files", opts) -keymap("n", "fg", ":Telescope live_grep", opts) -keymap("n", "fb", ":Telescope buffers", opts) -keymap("n", "fc", ":Telescope commands", opts) +keymap("n", "ff", ":Telescope find_files", opts) +keymap("n", "", ":Telescope find_files", opts) +keymap("n", "fg", ":Telescope live_grep", opts) +keymap("n", "fb", ":Telescope buffers", opts) +keymap("n", "fc", ":Telescope commands", opts) -- Comment -keymap("n", "/", "lua require'Comment.api'.toggle.linewise.current()", opts) -keymap("x", "/", "lua require'Comment.api'.toggle.linewise(vim.fn.visualmode())", opts) +keymap("n", "/", "lua require'Comment.api'.toggle.linewise.current()", opts) +keymap("x", "/", "lua require'Comment.api'.toggle.linewise(vim.fn.visualmode())", opts) --- DAP -keymap("n", "db", "lua require'dap'.toggle_breakpoint()", opts) -keymap("n", "dc", "lua require'dap'.continue()", opts) -keymap("n", "di", "lua require'dap'.step_into()", opts) -keymap("n", "do", "lua require'dap'.step_over()", opts) -keymap("n", "dO", "lua require'dap'.step_out()", opts) -keymap("n", "dr", "lua require'dap'.repl.toggle()", opts) -keymap("n", "dl", "lua require'dap'.run_last()", opts) -keymap("n", "du", "lua require'dapui'.toggle()", opts) -keymap("n", "dt", "lua require'dap'.terminate()", opts) +-- Gitdiff +keymap("n", "df", ":DiffviewFileHistory %", opts) +keymap("n", "dc", ":DiffviewClose", opts) -- Projections -keymap("n", "fp", ":Telescope projections", opts) +keymap("n", "fp", ":Telescope projections", opts) -- Base64 keymap("v", "64e", ":lua require'b64'.encode()", opts)