-
Notifications
You must be signed in to change notification settings - Fork 755
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
Implement cmap #225
Implement cmap #225
Conversation
Hi, thank you for the contribution! That's would nice if you could add some tests to prove the changes. Also, I didn't completely understand why it's possible to add only one-to-many mappings? |
The reason for only one-to-many mappings is that the command line mode uses different way to implement key mappings from other modes. Because of the difference it's difficult to implement many-to-many mappings, but I'm trying to implement it. |
Hi, I implemented cmap and removed "partially" from the title. I added unit tests. |
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.
Hi @sumoooru2!
Thank you for your updates. Now I really want to merge the changes into the repository. Hope we can make it this time.
Few questions regarding the pr:
- Do I understand correctly that this PR fixes also some issue with literals and digraphs in command mode?
- Do I understand correctly that the main idea is to process keys from command line using KeyHandler and not
processExKey
?
var prevExpectedArgumentType: Argument.Type? = null | ||
private set | ||
|
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.
Is this value presented to properly support some commands with digraphs? E.g. dt<C-k>o:
.
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.
Yes, it is. Without it , e.g. testDeleteToDigraph will fail.
@@ -753,8 +763,10 @@ private void startWaitingForArgument(Editor editor, | |||
// the key handler when it's complete. | |||
if (action instanceof InsertCompletedDigraphAction) { | |||
editorState.startDigraphSequence(); | |||
setPromptCharacterEx('?'); |
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.
Is this code supposed to insert ?
character under the caret when the user inserts digraph? IIRC, this functionality already works, isn't it?
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.
Yes, but using KeyHandler changed the logic and I needed to implement it here
No, I re-introduced some features about literals and digraphs (e.g. show '?' or '^'). They used to be done by Actions in ExEditorKit, which is no longer used.
Yes, but processExKey is still used by KeyHandler. |
This page shows "All checks have failed". I run the test "DeleteVisualLinesEndActionTest" locally several times, but it succeeded 🤔 |
Awesome, thank you for your work! Looks like ex panel needs some polishing, but this is definitely out of this scope. |
Thank you for reviewing and merging! |
I implemented c[nore]map partially. It would be ideal if I could fully, but it seems to need a lot of work.
It's partial because
cmap <C-a><C-b> <Home>
is impossible