Open srghma opened 7 years ago
Here I want to make ss and others keystrokes to call external plugin AceJump
ss
from Vintageous import plugins from Vintageous.vi.cmd_defs import ViOperatorDef from Vintageous.vi.utils import modes class VintageousAceJump(ViOperatorDef): def __init__(self, *args, **kwargs): ViOperatorDef.__init__(self, *args, **kwargs) self.repeatable = False self.motion_required = False @plugins.register('ss', (modes.NORMAL,)) class VistageousAceJumpChar(VintageousAceJump): def translate(self, state): return { 'action': 'ace_jump_char', 'action_args': {}, } @plugins.register('sw', (modes.NORMAL,)) class VintageousAceJumpWord(VintageousAceJump): def translate(self, state): return { 'action': 'ace_jump_word', 'action_args': {}, } @plugins.register('sl', (modes.NORMAL,)) class VintageousAceJumpLine(VintageousAceJump): def translate(self, state): return { 'action': 'ace_jump_line', 'action_args': {}, }
But this code dont work, s call substitute and keystroke stumble. I tried to add No Operation but this dont help.
s
No Operation
@plugins.register('s', (modes.NORMAL, )) class VistageousAceJumpChar(VintageousAceJump): def translate(self, state): return { }
The only way that I see is to unmap s entirely on plugin_loaded, how to do this without hacking Vintageous.vi.keys.mappings?
plugin_loaded
Vintageous.vi.keys.mappings
Here I want to make
ss
and others keystrokes to call external plugin AceJumpBut this code dont work,
s
call substitute and keystroke stumble. I tried to addNo Operation
but this dont help.The only way that I see is to unmap
s
entirely onplugin_loaded
, how to do this without hackingVintageous.vi.keys.mappings
?