-
-
Notifications
You must be signed in to change notification settings - Fork 40
Play nicer with vim-qf #45
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
base: master
Are you sure you want to change the base?
Conversation
I'll accept the
This is such nonsense that I almost didn't bother testing it. But I did test it and it's wrong.
"Last few characters"? It chops off the relative portion and leaves the directory name as seen in |
That's... a surprise. Two surprises. Something must be very wrong with my environment. I guess I'll drop the |
@tpope There; should be just the |
Now that I think about it ... let's keep If you're getting weird results with that truncation, one thing to rule out is symlinks in your |
Ohhh... that would do it, then. There are definitely symlinks all over my
runtimepath. Could that be handled with `resolve()`?
…On Tue, Sep 10, 2019, 18:38 Tim Pope, ***@***.***> wrote:
Now that I think about it ... let's keep <nomodeline> but wrap the each
doau in a if v:version >= 704. So we get reduced functionality on old Vim
versions but it still works. I think that's a better tradeoff than
triggering modelines on new versions.
If you're getting weird results with that truncation, one thing to rule
out is symlinks in your 'runtimepath'.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45?email_source=notifications&email_token=AARBXDLDRACRV5B6ALJLYXDQJAOVDA5CNFSM4IVKG4AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6MWRGA#issuecomment-530147480>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARBXDK2ZX5J7VTPI6Y7IBDQJAOVDANCNFSM4IVKG4AA>
.
|
Unclear. Try to pinpoint how exactly it causes it to fail. |
Will do. Regarding `doau`, if we know which `v:version` to check for
`nomodeline` as well, I could instead write a small function that
gracefully degrades from `doau <nomodeline>` to `doau` to no-op based on
the features available. Couldn't find that info in `:help`, but there's
always the git log.
…On Tue, Sep 10, 2019, 18:59 Quinn Strahl, ***@***.***> wrote:
Ohhh... that would do it, then. There are definitely symlinks all over my
runtimepath. Could that be handled with `resolve()`?
On Tue, Sep 10, 2019, 18:38 Tim Pope, ***@***.***> wrote:
> Now that I think about it ... let's keep <nomodeline> but wrap the each
> doau in a if v:version >= 704. So we get reduced functionality on old
> Vim versions but it still works. I think that's a better tradeoff than
> triggering modelines on new versions.
>
> If you're getting weird results with that truncation, one thing to rule
> out is symlinks in your 'runtimepath'.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#45?email_source=notifications&email_token=AARBXDLDRACRV5B6ALJLYXDQJAOVDA5CNFSM4IVKG4AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6MWRGA#issuecomment-530147480>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AARBXDK2ZX5J7VTPI6Y7IBDQJAOVDANCNFSM4IVKG4AA>
> .
>
|
If you want to do it right, the incantation in Projectionist is the way to go. I don't understand how vim-qf would know to use |
Current master doesn't, but I'm a contributor and I've got a PR up that
checks if the quickfix list was modified between the `Pre` and `Post`
autocmds, which avoids the need to know about each custom command in each
plugin that might merit support (like all the list-populating fugitive
commands, for example). Given that vim-qf aspires to Just Do The Smart
Thing in most common cases, its current behaviour will have to change one
way or another anyway, because it deals poorly with several fugitive
commands.
…On Tue, Sep 10, 2019, 19:16 Tim Pope, ***@***.***> wrote:
If you want to do it right, the incantation in Projectionist
<https://github.com/tpope/vim-projectionist/blob/94001f00825c36fab63b9f3ca47a204111e561a2/plugin/projectionist.vim#L107-L126>
is the way to go.
I don't understand how vim-qf would know to use :lopen and not :copen
since Vedit isn't a standard command name.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#45?email_source=notifications&email_token=AARBXDJJS55LPCUWHJ2N343QJATE7A5CNFSM4IVKG4AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6MYTGQ#issuecomment-530155930>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARBXDN3S37MHMCHDTQGOSTQJATE7ANCNFSM4IVKG4AA>
.
|
Looks like you're doing an equality check, which means if you run the same quickfix command twice in a row, the second time, it will open the location list rather the quickfix list. What a confusing bug! I don't think there is a robust solution to this other than to look at the command in (Fugitive currently uses |
After years of frustration, I finally looked into why vim-scriptease and vim-qf didn't seem to play together nicely (among other things, vim-qf automatically runs
:[cl]window
onQuickfixCmdPost
). What I discovered is that two things needed to change before they would kiss and make up::Vedit
and pals needed to issue adoautocmd QuickFixCmdPost
after callingsetloclist
:Vedit
and pals needed to have{"valid": 1}
To be quite honest, I have no idea why the entries were not considered valid; I wasn't able to find much
:help
on the subject. I was only able to get them considered valid by using the full filename as the entrytext
and then by explicitly setting"valid": 1
. The absence of either of these changes seemed to prevent them from being considered valid in my testing.I always thought it was weird that the filenames had the last few characters chopped off, anyway, so it was a welcome change for me, at least. If there's some sort of black magic at play that I don't fully understand, I'd love to hear about it.