Non editing Evil commands in evil-normal-state-map

Frank Fischer frank-fischer at shadow-soft.de
Mon Apr 8 08:25:09 CEST 2013


On 2013-04-05, Barry OReilly <gundaetiapo at gmail.com> wrote:
> Modes in which direct editing of text isn't sensical generally initialize
> in motion or emacs state.  This means that the evil-normal-state-map is
> inactive.  But there are some useful Evil commands in evil-normal-state-map
> that don't involve editing text, such as:
>   evil-record-macro
>   what-cursor-position
>   find-file-at-point
>   evil-quit
> and several others.
>
> These are unavailable in for example Buffer Menu, even though they would
> make sense there.
>
> What's the reason behind putting non editing commands in
> evil-normal-state-map?

Because they have always been there ;)

I really don't remember, but one important reason is that commands
that are bound in motion state map are available in operator state,
too, an only motions make sense there. The originally motivation for
motion state map was to have a common map for motions to be available
in normal state, visual state and operator state. The "motion state"
itself has been introduced later. Maybe another hierarchy of maps
would be better, never thought about this.

Best regards,
Frank




More information about the implementations-list mailing list