mirror of
https://github.com/harish2704/dotFiles.git
synced 2026-09-10 15:21:09 +00:00
Update comment uncommet
This commit is contained in:
@@ -63,12 +63,6 @@ vim.api.nvim_create_user_command("Code", function()
|
||||
vim.cmd("!code ./ -g %:" .. (vim.fn.line(".") + 1))
|
||||
end, { desc = "Open in VS Code at current line" })
|
||||
|
||||
--- @section keymaps-grep (defined as keymap in vim.cmd, moved here for clarity)
|
||||
-- <C-/>: Search word under cursor with custom Gr command
|
||||
vim.keymap.set("n", "<C-/>", function()
|
||||
vim.cmd("Gr " .. vim.fn.expand("<cword>"))
|
||||
end, { desc = "Grep word under cursor (custom Gr)" })
|
||||
|
||||
-- <C-G>: Live grep word under cursor via Snacks picker
|
||||
vim.keymap.set("n", "<C-G>", function()
|
||||
LazyVim.pick("live_grep", { default_text = vim.fn.expand("<cword>") })()
|
||||
|
||||
@@ -11,15 +11,15 @@ local map = vim.keymap.set
|
||||
-- LazyVim provides <leader>bj for BufferLinePick (interactive pick).
|
||||
-- These direct-access keys are preserved from your LunarVim config.
|
||||
for i = 1, 9 do
|
||||
map("n", "<M-" .. i .. ">", function()
|
||||
vim.cmd("BufferLineGoToBuffer " .. i)
|
||||
end, { desc = "Go to buffer " .. i })
|
||||
map("n", "<M-" .. i .. ">", function()
|
||||
vim.cmd("BufferLineGoToBuffer " .. i)
|
||||
end, { desc = "Go to buffer " .. i })
|
||||
end
|
||||
|
||||
--- @section keymaps-picker
|
||||
-- <C-p>: Quick file find (Snacks picker replaces your Telescope "fd" picker)
|
||||
map("n", "<C-p>", function()
|
||||
LazyVim.pick("files")()
|
||||
LazyVim.pick("files")()
|
||||
end, { desc = "Find Files" })
|
||||
|
||||
--- @section keymaps-external
|
||||
@@ -31,10 +31,16 @@ map("n", "<Leader><Leader>g", ":!git gui &<CR>", { desc = "Open Git GUI" })
|
||||
-- File-level operations
|
||||
map("n", "<M-r>", ":e!<CR>", { desc = "Reload current file (discard changes)" })
|
||||
map("n", "<M-q>", function()
|
||||
Snacks.bufdelete()
|
||||
Snacks.bufdelete()
|
||||
end, { desc = "Delete current buffer (preserves window layout)" })
|
||||
map("n", "<M-Q>", ":bd!<CR>", { desc = "Force delete buffer and close window" })
|
||||
|
||||
--- @section keymaps-comment
|
||||
-- Toggle comment with Space+/ (normal and visual)
|
||||
map("n", "c<Space>", "gcc", { desc = "Toggle comment", remap = true })
|
||||
map("n", "<Space>/", "gcc", { desc = "Toggle comment", remap = true })
|
||||
-- map("v", "<Space>/", "gc", { desc = "Toggle comment" })
|
||||
|
||||
--- @section keymaps-visual
|
||||
-- Visual mode operations
|
||||
map("v", "<C-h>", '"fy:%s#<C-r>f#', { desc = "Replace all occurrences of selected text" })
|
||||
@@ -84,14 +90,14 @@ map("n", "<C-S-T>", ":tabedit<CR>", { desc = "Open new tab" })
|
||||
-- Quick DAP access keys (dap.core extra provides <leader>d prefix mappings)
|
||||
-- These F-keys provide direct access to the most common debugging actions.
|
||||
map("n", "<F5>", function()
|
||||
require("dap").continue()
|
||||
require("dap").continue()
|
||||
end, { desc = "DAP: Continue / Start debugging" })
|
||||
map("n", "<F10>", function()
|
||||
require("dap").step_over()
|
||||
require("dap").step_over()
|
||||
end, { desc = "DAP: Step over" })
|
||||
map("n", "<F11>", function()
|
||||
require("dap").step_into()
|
||||
require("dap").step_into()
|
||||
end, { desc = "DAP: Step into" })
|
||||
map("n", "<F12>", function()
|
||||
require("dap").step_out()
|
||||
require("dap").step_out()
|
||||
end, { desc = "DAP: Step out" })
|
||||
|
||||
@@ -127,8 +127,13 @@ return {
|
||||
--- @section plugins-nvim-surround
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
keys = {
|
||||
{ "S", mode = "v", desc = "Surround selection" },
|
||||
},
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
require("nvim-surround").setup({
|
||||
keymaps = { visual = "S" },
|
||||
})
|
||||
end,
|
||||
desc = "Surround text objects (parentheses, quotes, tags, etc.)",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user