-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep Shortcuts After Closing and Re-Opening Quickfix Window? #170
Comments
TL; DR my suggestion for the time being is to install QFEnter and configure it how you like, and set these to ensure that ack.vim stays out of QFEnter's way: let g:ack_apply_qmappings = 0
let g:ack_apply_lmappings = 0 Now to elaborate, I'm going to lay down a bunch of words here because this very issue has started me on this train of thought in the past, and I might as well write it down to solicit some feedback… I might move this to a separate more topical roadmap issue later, forgive me for the braindump here 😄 I'll leave this issue open until I do that. Yes, the issue you point out is an annoyance that actually raises philosophical questions about the scope of this plugin—basically, this can't really be fixed unless ack.vim imposed its mappings on Vim's quickfix window all the time, not just when an In hindsight I think this indicates that the quickfix mappings are feature creep, and I feel the right approach is something like QFEnter, a plugin dedicated to providing that functionality for every quickfix window instance in your Vim sessions, which you are deliberately opting into when you choose to install it. Leaving this out could also leave ack.vim open to optionally integrate with Unite.vim for people who may want their search results that way instead of quickfix. Deprecating and removing this functionality from ack.vim might make many people unhappy though, because it's really about half of what ack.vim actually does 😁 The rest is fairly light wrapping around Vim's built-in Only a little bit of that other half is really even specific to Ack, mainly building the exact Pondering these two matters in the past actually led me to start writing a new plugin that takes a different approach, basically one of a generalized standard search command interface with pluggable preset search tool configurations, but I didn't finish yet for several reasons:
I also did some work on a QFEnter alternative simply because there are some things I don't like about its implementation that would amount to a rewrite if I tried to contribute them. That's beside the point though really, QFEnter does the job and that's why I'm still using it 😄 (Edit: I've since learned about vim-qf also). (Related to #150, in that removing the quickfix mapping functionality from ack.vim would eliminate that problem…) |
Thanks so much for the reply. I think QFEnter is exactly what I'm looking for. Thanks! |
* ag.vim is now deprecated * QFEnter is used to avoid mileszs/ack.vim#170
Right now, when I initially run :Ack all of the keyboard mappings work correctly, which are awesome by the way. However, when I close the QuickFix window with the keyboard mapping q or by using :cclose and then reopen the QuickFix window with :copen, the keyboard mappings no longer work.
Is there a way to get the keyboard mappings to persist? Barring that, is there a way to use the Ack command to open the previous results?
I saw this issue (#12) and thought that it might be what I need, but it didn't appear to work for me, instead :Ack with no arguments searched what was under my cursor.
The text was updated successfully, but these errors were encountered: