clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix navigation with quickfix

sspaeti aa54c309 50a3c808

+12 -8
+12 -8
nvim/lua/sspaeti/remap.lua
··· 180 180 vim.keymap.set("x", "Q", ":norm @q<CR>") --applyies saved macro on q on selected lines 181 181 182 182 183 - --quickfix toggle_qf 183 + -- Quickfix toggle function 184 184 local toggle_qf = function() 185 185 local qf_exists = false 186 186 for _, win in pairs(vim.fn.getwininfo()) do ··· 188 188 qf_exists = true 189 189 end 190 190 end 191 - if qf_exists == true then 191 + if qf_exists then 192 192 vim.cmd "cclose" 193 - return 194 - end 195 - if not vim.tbl_isempty(vim.fn.getqflist()) then 196 - vim.cmd "copen" 193 + else 194 + if not vim.tbl_isempty(vim.fn.getqflist()) then 195 + vim.cmd "copen" 196 + end 197 197 end 198 198 end 199 199 200 - vim.keymap.set("n", "<Leader>cc", ":call toggle_qf()<CR>") 200 + vim.keymap.set("n", "<Leader>cc", toggle_qf) 201 201 vim.keymap.set("n", "<Leader>co", ":copen<CR>") 202 - vim.keymap.set("n", "<Leader>cc", ":cclose<CR>") 202 + vim.keymap.set("n", "<Leader>cq", ":cclose<CR>") 203 + vim.keymap.set("n", "<Leader>cn", ":cnext<CR>") 204 + vim.keymap.set("n", "<Leader>cp", ":cprevious<CR>") 205 + vim.keymap.set("n", "]q", ":cnext<CR>") 206 + vim.keymap.set("n", "[q", ":cprevious<CR>") 203 207 vim.keymap.set("n", "<Leader>wc", ":%s///gn<CR>") --first search a term with / 204 208 205 209 -- <TAB>: completion -> still needed?