local keymap = vim.keymap
local opts = { noremap = true, silent = true }

-- Select all
keymap.set("n", "<C-a>", "ggVG")

-- Tabs
keymap.set("n", "te", "tabedit", opts)
keymap.set("n", "<tab>", ":tabnext<Return>", opts)
keymap.set("n", "<s-tab>", ":tabprev<Return>", opts)

-- Split window
keymap.set("n", "ss", ":split<Return>", opts)
keymap.set("n", "sv", ":vsplit<Return>", opts)

-- Move window
keymap.set("n", "sh", "<C-w>h")
keymap.set("n", "sj", "<C-w>j")
keymap.set("n", "sk", "<C-w>k")
keymap.set("n", "sl", "<C-w>l")

-- Resize window
keymap.set("n", "<C-w><left>", "<C-w><")
keymap.set("n", "<C-w><right>", "<C-w>>")
keymap.set("n", "<C-w><up>", "<C-w>+")
keymap.set("n", "<C-w><down>", "<C-w>-")

-- Lazy
keymap.set("n", "<leader>l", ":Lazy<CR>", opts)

-- Navigate vim panes better
keymap.set('n', '<c-k>', ':wincmd k<CR>', opts)
keymap.set('n', '<c-j>', ':wincmd j<CR>', opts)
keymap.set('n', '<c-h>', ':wincmd h<CR>', opts)
keymap.set('n', '<c-l>', ':wincmd l<CR>', opts)

keymap.set('n', '<leader>h', ':nohlsearch<CR>')

-- Git
keymap.set('n','<leader>gp',':Gitsigns preview_hunk<CR>',opts)
keymap.set('n','<leader>gt',':Gitsigns toggle_current_line_blame<CR>',opts)

