Skip to content

How do I differentiate between normal and insert modes when binding keys in vi-mode? #1501

Answered by vindarel
g-gundam asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, what about this:

(define-key lem-vi-mode:*normal-keymap*
  "g a"
  'beginning-of-defun-on-function)

(define-key lem-vi-mode:*insert-keymap* "C-n" 'lem/abbrev:abbrev-with-pop-up-window)

While in insert mode, the binding should do nothing. How do I do that?

I should have answered this.

How do I differentiate between normal and insert mode in code?

and this wouldn't be necessary now.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by g-gundam
Comment options

You must be logged in to vote
1 reply
@g-gundam
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants