-
Notifications
You must be signed in to change notification settings - Fork 58
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
Improved quickfix handling with title #44
Conversation
This uses the new `title` argument with `setqflist`/`setloclist`, if available to set the title with a suffix that allows to handle it via a `FileType qf` autocommand later, too. With this the qf windows will have mappings and title always (with `-noopen` and after `:cclose/:copen`). Fixes mhinz#40.
I like it, I just wonder if there's a way that doesn't alter |
Yes, it's pretty essential.
|
I think in case of |
So it concerns all Vim users, which is probably the majority. :-> Unfortunately I also don't see any other possibility than using |
I also noticed that Vim permanently sets the title when running |
I've been through so many trains of thought in maintaining ack.vim that led me to feel that writing a new plugin almost exactly like vim-grepper was the way I wanted to go… even half-wrote something never complete enough to release before your plugin appeared (and it looks great, by the way!). Now on this particular subject, I have pretty much made the conclusion that it just shouldn't be the search plugin's place to impose mappings on the quickfix/location list windows, at all—you can jump through hoops (kind of like part of this PR, no offense to @blueyed for trying to come up with solutions), but it boils down to the mappings sometimes being there (confusing, or frustrating), or always being there (out of scope for a search plugin to decide, if you're a purist about it). The mappings are really a general behavior not specific to search that you end up always wanting in every list window, no matter what populated it. So I feel that QFEnter is the right idea, even if I don't totally love the implementation (but it works). See mileszs/ack.vim#170 if you want even more of rambling musings that got me to this point. There may be other quickfix-related features of vim-grepper you want to maintain (title) that I'm not familiar with—I'm just getting acquainted—and you may disagree about mappings or feel that it's too late to change this with users expecting it, but with hindsight I had decided to avoid going down this path in a green-field search plugin. So, just my 2¢ here, but seriously consider not putting yourself in a no-win position with quickfix mappings. |
Heh, #36 is relevant. |
@ches You convinced me. Technically, every possible solution for resetting mappings in the quickfix window will always be just a hack. Moreover, easy searching is the goal of this plugin, not quickfix navigation. Tilting at windmills is not what we want! The optional Afterwards I'll remove the mappings and add a suggestion for either QFEnter or vim-qf. I still have to try both of them. Thanks for your input! |
@mhinz |
@blueyed Yup, I'll do it. Just lean back and relax. :-> |
Navigating the quickfix list is not goal of this plugin. Use one of these plugins instead: - https://github.com/romainl/vim-qf - https://github.com/yssl/QFEnter References #44. Closes #36.
It's done. Thanks for code and opinions! |
Thanks! |
If anything, I'd go for a prefix, since the tail should be the executed command itself. But why would you still need it now? |
Prefix would be fine with me, too. |
I think people know which of their plugins used the quickfix list recently and I'd like to keep the title as short as possible, as the command itself can get quite long already. |
Looks like the title parameter wasn't added until neovim 0.1.3, so prior versions fail with E118. Vim-grepper requiring neovim-0.1.3+ seems fine to me, but should it be documented? |
@ryneeverett FWIW: it is possible in Vim now also, but the |
@ryneeverett 0.1.3, that's like ages ago in Neovim time. ;-) You're right, of course. I added the missing check. @blueyed Ah, thanks for the heads-up. Now the title gets set for Vim as well. |
This uses the new
title
argument withsetqflist
/setloclist
, ifavailable to set the title with a suffix that allows to handle it via
a
FileType qf
autocommand later, too.With this the qf windows will have mappings and title always (with
-noopen
and after:cclose/:copen
).Fixes #40.