dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit c5da2c36d88bc6ec5c5ac1fd22410fdb5a718cf1
parent 2dfbf2c0898b12a05c8f3054952c3899d89c5a74
Author: Alex Balgavy <alexander.balgavy@spaceapplications.com>
Date:   Fri,  6 Sep 2024 13:59:18 +0200

vim: misc mappings

Diffstat:
Mvim/vimrc | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vim/vimrc b/vim/vimrc @@ -803,6 +803,8 @@ command! FD filetype detect command! D smile command! QuickfixAddCurrent call setqflist([{'bufnr': bufnr(), 'lnum': line('.'), 'text': getline('.')}], 'a') command! LoclistAddCurrent call setloclist(winnr(), [{'bufnr': bufnr(), 'lnum': line('.'), 'text': getline('.')}], 'a') +command! QuickfixDelCurrent call setqflist(getqflist()->filter($'v:val["bufnr"] !=# {bufnr()} || v:val["lnum"] !=# {line(".")}'), 'r') +command! LoclistDelCurrent call setloclist(winnr(), getloclist(winnr())->filter($'v:val["bufnr"] !=# {bufnr()} || v:val["lnum"] !=# {line(".")}'), 'r') command! QuickfixClear call setqflist([], 'f') command! LoclistClear call setloclist(winnr(), [], 'f') command! -nargs=? Browser exe 'terminal ++close w3m -config '.getenv("XDG_CONFIG_HOME").'/w3m/config -bookmark '.getenv("XDG_CONFIG_HOME").'/w3m/bookmark.html '.<q-args> @@ -1071,7 +1073,7 @@ nmap z/ <Plug>SearchFold " Set the foldlevel nnoremap <leader>zn :set foldlevel= -nnoremap <leader>zt :exe "set foldlevel=".foldlevel(line('.'))<CR> +nnoremap <leader>z. :exe "set foldlevel=".foldlevel(line('.'))<CR> " quickfix nnoremap <leader>qf :cwindow<CR> @@ -1080,6 +1082,8 @@ nnoremap <leader>qp :cprevious<CR> nnoremap <leader>qc :cclose<CR> nnoremap <leader>qz :<c-u>QuickfixClear<CR> nnoremap <leader>q. :<c-u>QuickfixAddCurrent<CR> +nnoremap <leader>q- :<c-u>QuickfixDelCurrent<CR> +nnoremap <leader>qr :<c-u>crewind<CR> " location nnoremap <leader>ll :lwindow<CR> @@ -1090,6 +1094,7 @@ nnoremap <leader>la :lafter<CR> nnoremap <leader>lf :lfirst<CR> nnoremap <leader>lz :<c-u>LoclistClear<CR> nnoremap <leader>l. :<c-u>LoclistAddCurrent<CR> +nnoremap <leader>l- :<c-u>LoclistDelCurrent<CR> " Autocommands {{{1 if has('autocmd') augroup vimrc_sets