Skip to content

Comments

Add replace-state to vi-mode#1033

Merged
cxxxr merged 1 commit intolem-project:mainfrom
fukamachi:vi-replace-state
Aug 31, 2023
Merged

Add replace-state to vi-mode#1033
cxxxr merged 1 commit intolem-project:mainfrom
fukamachi:vi-replace-state

Conversation

@fukamachi
Copy link
Collaborator

Add replace-state to vi-mode that is on when r is pressed. It allows quitting the replace-state by Esc or C-g.

As Vim's replace state provides other special commands like C-e and C-y, this flexibility would be required for the future extension.

(defvar *inactive-keymap* (make-keymap))

(define-command return-last-read-char () ()
(key-to-char (first (lem-core:last-read-key-sequence))))
Copy link
Member

Choose a reason for hiding this comment

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

If a sequence has more than one length, is it not necessary to get the last?

@cxxxr
Copy link
Member

cxxxr commented Aug 31, 2023

Thank you!

@cxxxr cxxxr merged commit beccbe3 into lem-project:main Aug 31, 2023
fukamachi added a commit to fukamachi/lem that referenced this pull request Aug 31, 2023
fukamachi added a commit to fukamachi/lem that referenced this pull request Sep 1, 2023
fukamachi added a commit to fukamachi/lem that referenced this pull request Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants