Add some gitsigns keymaps
This commit is contained in:
parent
f956b5d049
commit
d6d3c40192
|
@ -7,6 +7,9 @@ require('gitsigns').setup{
|
||||||
-- Setup keymaps
|
-- Setup keymaps
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[g', '<cmd>Gitsigns prev_hunk<CR>', {})
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '[g', '<cmd>Gitsigns prev_hunk<CR>', {})
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']g', '<cmd>Gitsigns next_hunk<CR>', {})
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']g', '<cmd>Gitsigns next_hunk<CR>', {})
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>gd', '<cmd>Gitsigns diffthis<CR>', {})
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>gq', '<cmd>Gitsigns setqflist<CR>', {})
|
||||||
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>gl', '<cmd>Gitsigns setloclist<CR>', {})
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>hp', '<cmd>Gitsigns preview_hunk<CR>', {})
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>hp', '<cmd>Gitsigns preview_hunk<CR>', {})
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>hs', '<cmd>Gitsigns stage_hunk<CR>', {})
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>hs', '<cmd>Gitsigns stage_hunk<CR>', {})
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>hr', '<cmd>Gitsigns reset_hunk<CR>', {})
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>hr', '<cmd>Gitsigns reset_hunk<CR>', {})
|
||||||
|
|
|
@ -14,7 +14,7 @@ vim.g.mapleader=' '
|
||||||
-- Misc
|
-- Misc
|
||||||
imap('jk','<Esc>')
|
imap('jk','<Esc>')
|
||||||
nmap('<leader>sr', ':SnipRun<cr>')
|
nmap('<leader>sr', ':SnipRun<cr>')
|
||||||
nmap('<leader>g', ':G<cr>')
|
nmap('<leader>G', ':G<cr>')
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
nmap('<leader>;', '<cmd>Telescope builtin<cr>')
|
nmap('<leader>;', '<cmd>Telescope builtin<cr>')
|
||||||
|
|
Loading…
Reference in a new issue