27 lines
		
	
	
		
			903 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			903 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| -- ~/.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-w", "<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 can’t 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)
 | ||
| 
 |