-
Notifications
You must be signed in to change notification settings - Fork 33
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
Element motion problems (does not work with selection=exclusive in gvim) #4
Comments
Hmm, I can't reproduce those unfortunately. I am highly interested in correcting behavior like this, so I would definitely enjoy having a consistently reproducible case. Have these motions always worked like this for you? There is an outstanding bug in vim-sexp related to registers, but this does not seem to be related. Thanks for reporting! I hope you will be able to communicate this problem to me. |
I have not used vim-sexp before, so there is no "always". :P I tried removing all my plugins except for these: rainbow_parentheses vim-classpath vim-clojure-highlight vim-clojure-static vim-fireplace vim-sexp Also, I tried it in a really simple Clojure file with just one function. Here is my vimrc: https://gist.github.com/oskarkv/7759c917238d1c4a90d9 The result is the same as before. Tell me if there is anything else I can do. |
I don't know why I didn't do this at first... I deleted everything in my vimrc from line 9 and down (in the above gist). Still the same result. |
Ah, that simplifies things. I was just perusing your vimrc. You use Colemak! Very fascinating, how do you like this layout? |
Hehe. Colemak is pretty nice. I switched from Qwerty because I had bad habits on there, and starting with a new layout completely seemed easier than unlearning those habits. I like Colemak a lot better than Dvorak though, because Colemak has z, x, c and v in the same positions as Qwerty, and even beyond that I think it's better. When I did that, I also switched place between Alt Gr and Caps Lock, and put all non-letter symbols on Alt Gr+letters. So this is my home row when I hold Caps Lock: /()@#+-'~ See http://i.imgur.com/2bug7fA.png The hardest symbol to type for me is |
Now that's a pretty big advantage! I'll have to try that someday. And using a new keyboard layout to unlearn bad habits is an interesting strategy. I hope you don't mind, but I'd like to debug this from scratch. It looks like we have pretty different environments, so I put up a minimal repo for testing and added you as a collaborator:
Please clone this and run vim -N -u vimrc -U NONE example.clj from the repo root, then try the element motions again. They work as intended on my machine. Thanks! |
This line is making all the difference: |
Actually, it's the |
I was hoping it wasn't mswin.vim. I don't have access to a Windows machine (or even a Windows VM), so I may have to rely on you for testing. Hopefully the reason will be obvious. Thanks for narrowing it down! |
Tried
That incluse/exclusive stuff sounds like it could be it. |
Yes, that was it. |
I just tried it, but it doesn't seem to make any difference; I'll take a look at the vim source |
Okay, I was finally able to reproduce it. This happens in GUI vim only, and only when Unfortunately, Therefore it looks like I'll have to compensate for the set selection=inclusive after the final call to |
Maybe these things are just happening for me, because of some other plugin or settings, but...
In the following,
|x|
represents the cursor position, and<x>
represents a visual selection.Starting with
(+ 10|0|0)
and doingvae
results in(+< 100>0)
.Starting with
(+ sym|b|ol)
and doingvae
results in(+< symbo>l)
.Starting with
something "a str|i|ng"
and doingvae
results insomething< "a string>"
.There are similar problems with
ie
motions. In summary, the element motion does not quite work for the last element in a list, or if the element is a string.The text was updated successfully, but these errors were encountered: