stefandtw / quickfix-reflector.vim

Change code right in the quickfix window
MIT License
340 stars 19 forks source link

is it possible to delete lines? #20

Closed justrajdeep closed 7 years ago

justrajdeep commented 7 years ago

Hi

Great plugin!!!

This might be an enhancement request, but is it possible to delete lines?

I am not asking about deleting lines in the quick-fix window, I am asking for deleting lines from the quickfix window in the respective files.

It would be great if you can support this. Thanks in advance

stefandtw commented 7 years ago

There are two problems:

That's why I don't really want to add that behaviour.

Perhaps you could create a macro that deletes the current line. It would start by pressing <CR> to jump to your file, then dd to delete, maybe :w to save, and :copen to jump back to the quickfix window. After you recorded the macro, paste it into your .vimrc and map it to a key like this:

nnoremap <C-d> <CR>dd:w<CR>:copen<CR>

Voila, you got your own key (Control-d) to delete a line from the quickfix window. (Actually I got ^M instead of <CR>. They both seem to work, but pasting ^M here converts it into line-breaks)

justrajdeep commented 7 years ago

Thanks :)