neovim: add mappings for quickfix

This commit is contained in:
2023-08-31 17:22:50 +03:00
parent 7bbadc003a
commit ceb2ac3de8
2 changed files with 15 additions and 0 deletions

View File

@@ -24,3 +24,14 @@ vim.keymap.set("n", "tn", ":tabnew<CR>")
vim.keymap.set("n", "tN", ":-tabnew<CR>")
vim.keymap.set("n", "H", ":tabprev<CR>")
vim.keymap.set("n", "L", ":tabnext<CR>")
-- quickfix
vim.keymap.set("n", "<C-q><C-q>", function()
if vim.bo.ft == "qf" then
vim.cmd(":cclose")
else
vim.cmd(":copen")
end
end)
vim.keymap.set("n", "<C-q>n", vim.cmd.cnext)
vim.keymap.set("n", "<C-q>N", vim.cmd.cprevious)