mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
refactor(nvim): Keymap updates for git, symbol search & save/quit
- Treesitter: `]a` -> next arg, `[a` -> previous arg, `]T` -> next test - git: Revert Previous & next hunks to `]g` & `[g` - git: Remove `<space>gK` for hover blame-line: use `<space>gL` instead - save: Save all files with `<C-s>`, - exit: Quit without saving with `<C-q>`: won't exit with unsaved files: sometime you don't want to save files - Search symbols with `<space>s` & `<space>S` instead of `<space>cs` & `<space>cS`
This commit is contained in:
@@ -53,11 +53,11 @@ return {
|
||||
-- Text object
|
||||
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", { desc = "Git: Visual select hunk" })
|
||||
|
||||
map({ "n", "v" }, "]h", function()
|
||||
map({ "n", "v" }, "]g", function()
|
||||
gs.next_hunk()
|
||||
end, { desc = "Next Git hunk" })
|
||||
|
||||
map({ "n", "v" }, "[h", function()
|
||||
map({ "n", "v" }, "[g", function()
|
||||
gs.prev_hunk()
|
||||
end, { desc = "Previous Git hunk" })
|
||||
|
||||
@@ -73,10 +73,6 @@ return {
|
||||
map("n", "<leader>gp", gs.preview_hunk, { desc = "Git: Preview hunk" })
|
||||
map("n", "<leader>gs", gs.stage_hunk, { desc = "Git: Toggle Stage-Hunk" })
|
||||
|
||||
map("n", "<leader>gK", function()
|
||||
gs.blame_line({ full = true })
|
||||
end, { desc = "Git: Hover blame-line" })
|
||||
|
||||
map("n", "<leader>gB", gs.toggle_current_line_blame, { desc = "Git: Toggle virtual blame-line" })
|
||||
end,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user