-
Notifications
You must be signed in to change notification settings - Fork 250
WIP fix #565 : cursor motion in insert mode should affect .
#568
Conversation
3868c90
to
6a6b023
Compare
a54a484
to
ac3954a
Compare
ac3954a
to
42047a5
Compare
Rebased to current state of the art, cleaned up. |
This PR introduces a bug: bronson/vim-mode-next#4 Also, even though it's more Vim-ish, I'm personally not enthused about right-arrow in insert mode no longer wrapping to the next line... Maybe make it be a setting? |
Quite right, sorry about that. Working on a fix. About the wrapping, @bronson, do I understand correctly that you have wrapLeftRightMotion off, and yet want that motion to wrap in insert mode? |
Yes, I said that, but I take it back. Sorry. :) That's how my workstation's Vim works -- normal mode doesn't wrap, insert mode does. But I'm on my laptop now, and neither mode wraps. Since I haven't noticed the difference until now (we're talking years probably...), I guess I don't care much after all. I'll get used to whichever way vim-mode settles on. And I definitely vote to NOT implement whichwrap! |
Fixed bronson/vim-mode-next#4 , but need to postpone rebasing to master for now. This PR is related to #609 and should be considered together, and that one needs maintainer guidance. |
Fix looks great! Added this PR back to latest vim-mode-next, 0.54.15. |
This PR conflicts with autocomplete-plus. When the completions are shown, I hit down arrow to move to the next completion. Instead, vim-mode:move-down-insert fires, turns off the autocompletions, and moves one line down in the buffer. Putting this in keymap.cson makes it work again but obviously isn't a fix: 'atom-text-editor.vim-mode.insert-mode':
'up': 'unset!'
'down': 'unset!' |
Thank you, good catch. If we find other similar interactions, we can start thinking about how to address this in a less case-by-case way. |
Forgot to say explicitly: I added a fix for the autocomplete issue. 8-) |
Yeah, the That said, hopefully there won't be a lot of plugins popping up distractions while typing. This could be good enough. Fix is in v-m-n 0.55.1, looking good. |
Yes @bronson, that's exactly the issue that one immediately imagines. I suspect, though, that due to life being how it is, interactions with j-random-plugin would need some other workaround. Notice how only up/down is in |
I just realized this approach to fixing #565 isn't right - I've only taken into account arrow-key motions but not any other motions than can happen in insert mode (pgdn, end etc.). I'll redo this PR with |
.
.
Does it make sense to just fix #565 here and do the cursor motion fixes in another PR? Also, mouse doesn't seem to interrupt insert mode either... Just wondering if you thought about it and found the fix was too ugly. |
I hear that, first things first. I was just wondering if that would be an easy way to make this PR smaller / easier to merge? My random thinking... I care a lot about fixing giant undos, but not much about forcing the insert cursor to stay on the same line. (Actually, once insert-mode cursor positioning lands, I'm going to figure out a way to turn it off on my machine... Turns out I really do like insert mode feeling just like Atom. I know, I'm waffling like crazy on this one!) |
@bronson I'm not sure what you mean about cursor positioning there |
Sorry, let me back up... This PR does two things, right?
Just curious if it would help mergeability to split these two behaviors into separate PRs. (ordered of course -- one would have to be applied before the other) |
Ah I see, I'd forgotten about restricting left/right motions in case wrapLeftRightMotion is off. At the moment I'm thinking that some departure from VIM is warranted here - perhaps insert undo should work like normal, non-vim-mode, typing undo? My littlest one has been keeping me busy these days but soon I should be able to make an alternate PR to show what I mean. |
Sure, vim-mode undo working just like Atom undo sounds fine to me. Atom's undo grouping used to be atrocious but seems pretty good now. As long as the entire insert session doesn't get grouped into a single undo, I'd probably be happy with just about anything. |
As stated in the README, this package is no longer maintained and is deprecated. We recommend that people use the vim-mode-plus package instead. Because of this, we are archiving this repository and closing all issues and pull requests. Thanks very much for your support and contributions! |
Fixes most of #565 except when I click in the editor, vim-mode doesn't notice. I don't know yet how to fix that, but this PR is better than nothing I guess. 8-)