Improve descriptions of key-mappings in neovim and align git-shortcuts
I struggle to remember certain shortcuts sometimes. In these cases I rely on the "whichkey" plugin which shows a short description of for each possible keystroke in vim. Though I was lazy and didn't maintain these everywhere, so this change fixes that. Hopefully I can remeber all the keys better now. Furthermore this change contains some slight remappings regarding the git-keymappings. I used fugitive for most of that in the past, but I saw more potential using telescope in certain cases, especially navigating the history.
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
local cmd = function (cmd)
|
||||
return function () vim.cmd(cmd) end
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
lazy = false,
|
||||
keys = {
|
||||
{ "<Leader>gb", "<Cmd>G blame<CR>", desc = "Git blame" },
|
||||
{ "<Leader>gll", "<Cmd>G log --graph --format='%h (%ar) %s :: %aN <%aE>'<CR>", desc = "Git log" },
|
||||
{ "<Leader>glf", "<Cmd>G log --graph --format='%h (%ar) %s :: %aN <%aE>' %<CR>", desc = "Git log for current file" },
|
||||
{ "<Leader>glc", "<Cmd>Gclog -- %<CR>", desc = "Quicklist commits affecting the current file" },
|
||||
{ "<Leader>glh", "<Cmd>0Gclog -- %<CR>", desc = "Quicklist revisions of the current file" },
|
||||
{ "<Leader>gb", cmd("G blame"), desc = "Git blame" },
|
||||
{ "<Leader>gll", cmd("G log --graph --format='%h (%ar) %s :: %aN <%aE>'"), desc = "Git log" },
|
||||
{ "<Leader>glf", cmd("G log --graph --format='%h (%ar) %s :: %aN <%aE>' %"), desc = "Git log for current file" },
|
||||
{ "<Leader>glq", cmd("0Gclog -- %"), desc = "Quicklist revisions of the current file" },
|
||||
{ "<Leader>go", cmd("GBrowse"), desc = "Open file in Browser in Remote-Repo"}
|
||||
},
|
||||
},
|
||||
-- Github integration for :GBrowse
|
||||
|
||||
Reference in New Issue
Block a user