AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

This commit is contained in:
2025-09-08 13:29:33 +02:00
parent 704b664a25
commit d2f8546e00
14 changed files with 587 additions and 1 deletions

View File

@ -0,0 +1,25 @@
-- ~/.config/nvim/lua/config/keymaps.lua
local map = vim.keymap.set
local opts = { noremap = true, silent = true }
-- Alt+1 → Project view (NvimTree)
vim.keymap.set("n", "<A-1>", function ()
Snacks.explorer()
end, { noremap = true, silent = true })
-- Ctrl+Y → Delete current line
map("n", "<C-y>", "dd", opts)
-- Ctrl+Q → Close window / scope (like JetBrains splits default)
map("n", "<C-q>", "<C-w>q", opts)
-- Ctrl+W → Close buffer/file
map("n", "<C-w>", "<cmd>bd<cr>", opts)
-- Triple Shift (Shift+Shift+Shift) → "Search Everywhere"
-- Neovim cant detect triple-modifier presses, so we fake it.
-- Best workaround: map <leader><leader> to Telescope live_grep
map("n", "<leader><leader>", "<cmd>Telescope find_files<cr>", opts)
map("n", "<leader><leader><leader>", "<cmd>Telescope live_grep<cr>", opts)
map("n", "<A-Left>", "<C-w>h", opts)
map("n", "<A-Right>", "<C-w>l", opts)