neovim: add mappings for quickfix
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -13,9 +13,13 @@ telescope.setup({
|
||||
["<C-j>"] = actions.move_selection_worse,
|
||||
["<C-k>"] = actions.move_selection_better,
|
||||
["<C-p>"] = layout_actions.toggle_preview,
|
||||
["<C-x>"] = actions.add_selected_to_qflist,
|
||||
["<C-t>"] = actions.toggle_selection,
|
||||
},
|
||||
n = {
|
||||
["<C-p>"] = layout_actions.toggle_preview,
|
||||
["<C-x>"] = actions.add_selected_to_qflist,
|
||||
["<C-t>"] = actions.toggle_selection,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user