-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
g:doge_wrap_around (default 0) #45
Conversation
New option to allow placeholder to by cycled, as long as there is more than one left.
Nice add, but as expected, this doesn't work when there is a Example:
I didn't finish I suggest you enable this by default only if the bug I just described is fixed. You can disable it by default for the tests in the vimrc used for the tests. This is an option worth having its own tests, so I will add those later if you can fix the bug. |
The option is disabled by default and it can stay optional. I see the problem and I couldn't find an easy fix due to how comment positions are updated at every jump. I understand that you're trying to restrict jumps between definite positions, but this is complicating things a lot, maybe a bit unnecessarily, because the TODO pattern is rather specific and unlikely to be found otherwise. The main problem I've come across is how the function The easiest 'fix' that I can think of right now, is: when the option This would also allow (if desired, but totally secondary) a command like |
I just thought of the solution actually because of your comment. Since we have the I'll look into it this evening and/or else the end of the week. |
I suggest we rename the name to |
Ok for that. I think the other problem is unrelated to the PR anyway, because it exists either way. I think it's better to consider it a different problem entirely. Personally I am for a simple solution (the one I proposed), but anyway. |
The case is definitely not rare to appear. It is possible to have more |
TODOs wrapped in square brackets? I never saw them anywhere else. And if they're part of some DoGe comment, they are eligible for jumping anyway. But maybe I didn't understand. |
You haven't noticed these things like: |
Outside of this plugin? No. But if that's the problem, you can make the pattern more specific to the plugin, like |
It's a common pattern IDEs use for generating comment skeletons as well.
There is no problem. Adding |
Ok so what's the problem if the mapping can loop over these TODOs as well? If there are TODOs to process, I don't see it as a problem, if I can loop over them even if they were not generated by DoGe. |
Because that's not the purpose of the plugin. Read the introduction in the README. |
I have just fixed the extra scenario. I'll add specific tests later today or by the end of this week. |
Pressing |
Can you provide me with this debug information? |
Code is from here (line around 600): https://raw.githubusercontent.com/mg979/vim-packs/master/vpacks Vim version
|
I fixed the problem by removing our double logic, which simplifies the code and also when we would've allow |
Cursor needs to be at end of line for this to work correcly
It was better, but still having problems when wrapping backwards ( |
Ah, I do have the same yes, but your fix was the fix I immediately thought of. Good catch. |
I've added the tests for jumping forwards/backwards functionality. I think it's ready to merge. Agree @mg979 ? |
It's working ok for me. |
If you update the readme, there's the FAQ section that's probably outdated. |
I will test it out immediately. This is a great PR again from you. I had to ditch UltiSnips personally to use my own plugin. This would probably solve it. Also, I added the |
Ultisnips was actually solved by buffer mappings, this is more of an usability feature. By the way, I get some annoying highlight when tabbing in vim (but not neovim), do you get the same? |
Nope. It should be removed by this part: |
I confirm the problem is fixed and thus it also fixed #16. |
That's because you don't have EDIT: I will confirm this in IRC right away. |
Yes that fixes it. Might I make a PR to take care of it? I don't think it's that common to have that setting in the vimrc, and if it's disabled by default there may be some reason. |
Sure. You can do EDIT: I think if we want to do the above we actually have to map the I will merge this PR. The merge seems ready and this is a very good update. Thanks a lot! |
I think it's ready. The PR with the lazyredray thing is also there, I'm just enabling the setting, it's working in my setup. |
New option to allow placeholder to by cycled, as long as there is more than one left.
Prelude
Thank you for helping out DoGe!
By contributing to DoGe you agree to the following statements (Replace
[ ]
with[x]
with those you agree with):Why this PR?
Because I think it's a better behaviour: if there are placeholders left, you can keep cycling them with
<tab>
. Default is 0, because it breaks tests otherwise.