add git keybinds
This commit is contained in:
parent
1b67e28208
commit
363170e4ad
1 changed files with 17 additions and 1 deletions
|
|
@ -478,7 +478,10 @@ end
|
|||
|
||||
map('n', '<leader>ex', function() require('fyler').toggle { kind = 'split_left_most' } end, 'Toggle file tree')
|
||||
map('n', '<leader>fs', '<cmd>w<cr>', 'Save file')
|
||||
map('n', '<leader>ff', function() require('find-file').open() end, 'Find file (emacs-style)')
|
||||
map('n', '<leader>ff', function() require('find-file').open() end, 'Find file')
|
||||
map('n', '<leader>fr', function() require('snacks').picker.recent() end, 'Find recent file')
|
||||
map('n', '<leader>:', function() require('snacks').picker.command_history() end, 'Command history')
|
||||
-- map('n', '<leader>ex', function() require('snacks').explorer() end, 'Toggle file tree')
|
||||
map('n', '<leader>bb', function() require('snacks').picker.buffers() end, 'List buffers')
|
||||
map('n', '<leader>bd', function() require('snacks').bufdelete() end, 'Buffer delete')
|
||||
map('n', '<leader>.', function() require('snacks').scratch() end, 'Scratch buffer')
|
||||
|
|
@ -498,7 +501,20 @@ map('n', '<leader>ce', '<cmd>edit $MYVIMRC<cr>', 'Edit config')
|
|||
map('n', '<leader>ch', '<cmd>checkhealth<cr>', 'Check health')
|
||||
map('n', '<leader>cf', '<cmd>Format<cr>', 'Format buffer')
|
||||
|
||||
-- git
|
||||
map('n', '<leader>gg', function() require('neogit').open() end, 'Open Neogit')
|
||||
map('n', '<leader>gb', function() require('snacks').picker.git_branches() end, 'Git Branches')
|
||||
map('n', '<leader>gl', function() require('snacks').picker.git_log() end, 'Git Log')
|
||||
map('n', '<leader>gL', function() require('snacks').picker.git_log_file() end, 'Git Log File')
|
||||
map('n', '<leader>gs', function() require('snacks').picker.git_status() end, 'Git Status')
|
||||
map('n', '<leader>gS', function() require('snacks').picker.git_stash() end, 'Git Stash')
|
||||
-- gh
|
||||
map('n', '<leader>gd', function() require('snacks').picker.git_diff() end, 'Git Diff (Hunks)')
|
||||
map('n', '<leader>gi', function() require('snacks').picker.gh_issue() end, 'GitHub Issues (open)')
|
||||
map('n', '<leader>gI', function() require('snacks').picker.gh_issue { state = 'all' } end, 'GitHub Issues (all)')
|
||||
map('n', '<leader>gp', function() require('snacks').picker.gh_pr() end, 'GitHub Pull Requests (open)')
|
||||
map('n', '<leader>gP', function() require('snacks').picker.gh_pr { state = 'all' } end, 'GitHub Pull Requests (all)')
|
||||
|
||||
map('n', '<leader>ut', '<cmd>UndotreeToggle<cr>', 'Toggle undotree')
|
||||
|
||||
-- Grapple keymaps (harpoon-style)
|
||||
|
|
|
|||
Loading…
Reference in a new issue