You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am more accustomed to mapping $ and ^ to - and =, respectively. When setting key mappings, by specifying the mode as OPERATOR, it allows them to work well with commands like d, y, c, etc., in the native environment.
While exploring the plugin, I found that in cursor mode, VM waits for a motions command and does not recursively handle "some" user key mappings. The root cause of this behavior is due to the internal call let s:single = { c -> index(split('hljkwebWEB$^0{}()%nN_', '\zs'), c) >= 0 }, which is a hardcoded check to determine whether it belongs to the motion set. I can accept that this is a "rule," but one counterexample that puzzles me is: user-defined operator commands can work normally via the vim.g.VM_user_operators configuration. From my limited understanding, the term "motions" covers both operator and motion. Since VM_user_operators works fine, could you consider adding user-defined motion as well? (For instance, making some efforts with VM_custom_motions.)
Anyway, thank you very much to the community, this is a fantastic plugin!
The text was updated successfully, but these errors were encountered:
ngpong
changed the title
The vm#cursors#operation function does not respect user-defined motions.
The vm#cursors#operation function does not respect user-defined motion
Oct 11, 2024
I am more accustomed to mapping
$
and^
to-
and=
, respectively. When setting key mappings, by specifying the mode asOPERATOR
, it allows them to work well with commands liked
,y
,c
, etc., in the native environment.While exploring the plugin, I found that in cursor mode, VM waits for a motions command and does not recursively handle "some" user key mappings. The root cause of this behavior is due to the internal call
let s:single = { c -> index(split('hljkwebWEB$^0{}()%nN_', '\zs'), c) >= 0 }
, which is a hardcoded check to determine whether it belongs to the motion set. I can accept that this is a "rule," but one counterexample that puzzles me is: user-defined operator commands can work normally via thevim.g.VM_user_operators
configuration. From my limited understanding, the term "motions" covers both operator and motion. SinceVM_user_operators
works fine, could you consider adding user-defined motion as well? (For instance, making some efforts withVM_custom_motions
.)Anyway, thank you very much to the community, this is a fantastic plugin!
The text was updated successfully, but these errors were encountered: