Skip to content
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

Support Ctrl-W and Ctrl-U shortcuts in fsi #10370

Merged
merged 1 commit into from
Nov 1, 2020
Merged

Support Ctrl-W and Ctrl-U shortcuts in fsi #10370

merged 1 commit into from
Nov 1, 2020

Conversation

Swoorup
Copy link
Contributor

@Swoorup Swoorup commented Oct 31, 2020

First PR here:

Fixes #10299

fsi-ctrl-uw-shortcuts

@dnfadmin
Copy link

dnfadmin commented Oct 31, 2020

CLA assistant check
All CLA requirements met.

@vzarytovskii
Copy link
Member

First PR here:

Fixes #10299

fsi-ctrl-uw-shortcuts

@Swoorup
That's really awesome addition, thank you. Do you think it is worth it to have only spaces as delimiters, or some others as well (I am thinking dots and dashes)? What do you think?

@Swoorup
Copy link
Contributor Author

Swoorup commented Nov 1, 2020

@vzarytovskii Thats a good idea.

I emulated the functionality based on my current shell fish. I noticed at least by default python shell, fish and bash support only spaces as the delimiter.

I noticed vim has slightly different behaviour with dots and dashes than spaces, i.e cut word has the following behaviour on the input text

in:123<spc><spc><spc>
out:

in:123---
out:123

in:123...
out:123

in:-123
out:-

in:.123
out:.

in:123.-.-
out:123

Which seems reasonable. It appears it has the above behaviour with all non-word characters with exception of space? But not sure worth the complexity atm. It would be nice to have a block based parsing, i.e input characters are immediately parsed into some sort of syntax tree, so that it's possible to have immediate syntax highlighting, and more contextual information to perform operations like these.

Copy link
Member

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce.

Thank you

@vzarytovskii
Copy link
Member

@Swoorup yeah, that makes sense. Thanks you a lot for that contribution!

@vzarytovskii vzarytovskii merged commit 4fed162 into dotnet:main Nov 1, 2020
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
@Swoorup Swoorup deleted the sj-support-kill-switches branch June 3, 2021 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Ctrl + U/W shortcuts on FSI
4 participants