-
Notifications
You must be signed in to change notification settings - Fork 27
Closer to helix parity for small interactions #44
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: main
Are you sure you want to change the base?
Closer to helix parity for small interactions #44
Conversation
jasonwilliams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nice changes here, I have a couple of questions
src/actions/actions.ts
Outdated
| parseKeysExact(['x'], [Mode.Normal, Mode.Visual], (vimState, editor) => { | ||
| editor.selections = editor.selections.map((selection) => { | ||
| const line = editor.document.lineAt(selection.active.line); | ||
| return new vscode.Selection( | ||
| new vscode.Position(selection.active.line, 0), | ||
| new vscode.Position(selection.active.line, line.text.length), | ||
| ); | ||
| }); | ||
| enterVisualLineMode(vimState); | ||
| setModeCursorStyle(vimState.mode, editor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this has broken hitting x multiple times extending to the next line each time. It now only selects the current line and stops
src/actions/actions.ts
Outdated
| [KeyMap.Actions.InsertMode], | ||
| [Mode.Normal, Mode.Visual, Mode.VisualLine, Mode.Occurrence], | ||
| (vimState, editor) => { | ||
| // In visual mode, move cursor to start of selection before entering insert mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im confused with this, didn't it already work? Im testing on main and visual mode to insert mode puts me at the beggining of the selection. Do you have some before and after steps for me to try?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On main for me, if I go to any line in the middle of a bunch of words, hit b, and then hit i, the cursor goes to the end of the selection from where I initially hit b.
|
Hi @jasonwilliams! Thanks for the review, didn't even realize you had responded so early after the PR, will address these tonight |
|
Hey @ricardonunez-io just some conflicts, i assume this is ready for me to have a look at again? |
|
Hey @jasonwilliams! So sorry, got caught up with work, and missed this notification. Unfortunately not yet ready for review, ended up running into some more bugs that popped up when I tried fixing multiple-line 'X' selections. I'll let you know once it's ready and clean up any conflicts, thank you! |
|
Hey @ricardonunez-io how has this been going? |
m mbracket matching uses cursor position instead of selection starthandlmotions in visual modexmotion overflowing to new linewandbmotions now correctly handle inclusive cursor behavior