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
Atom provides scope based keybinding.
To create scope, just set css class for editorElement.
So
Create very short life time scope to when specific operator is running.
e. g. keymap only activated only while waiting for target motion/text-object for yank.
Here, following keymap is only mapped only when Yank, or Delete operation is waiting for tareget.
So you can yank or delete paragraph by yp, dp, shorter than yip, dip.
But other operator-pending-mode keybinding is not contaminated by this keymap.
This is the direct advantage of this granular narrowed keymap scope.
The change is just set css class while operation start running, then remove this css class on operation finished.
CSS class to be set is comand name without vim-mode-plus prefix. So for vim-mode-plus:yank command, yank is scope to be set.
CSS class to be set is "command name without vim-mode-plus prefix" + "-pending".
So for vim-mode-plus:yank command, scope should be yank-pending.
This class is set only when command was not complete like target requiring operator(d, y) or input requiring motion(m, /).
The text was updated successfully, but these errors were encountered:
This is experiment but idea is very simple.
Atom provides scope based keybinding.
To create scope, just set css class for editorElement.
So
Create very short life time scope to when specific operator is running.
yank
.Here, following keymap is only mapped only when
Yank
, orDelete
operation is waiting for tareget.So you can yank or delete paragraph by
yp
,dp
, shorter thanyip
,dip
.But other
operator-pending-mode
keybinding is not contaminated by this keymap.This is the direct advantage of this granular narrowed keymap scope.
The change is just set css class while operation start running, then remove this css class on operation finished.
CSS class to be set is comand name withoutvim-mode-plus
prefix.So forvim-mode-plus:yank
command,yank
is scope to be set.CSS class to be set is "command name without
vim-mode-plus
prefix" + "-pending".So for
vim-mode-plus:yank
command, scope should beyank-pending
.This class is set only when command was not complete like target requiring operator(
d
,y
) or input requiring motion(m
,/
).The text was updated successfully, but these errors were encountered: