guillermooo / Vintageous

Vi/Vim emulation for Sublime Text 3
http://guillermooo.bitbucket.org/Vintageous/
Other
1.64k stars 115 forks source link

Unable to assign <C-w>> (CTRL_W_GREATER_THAN) #978

Closed gerardroche closed 6 years ago

gerardroche commented 9 years ago

vi/keys.py

CTRL_W_GREATER_THAN =          '<C-w>>'

vi/cmd_defs.py

@keys.assign(seq=seqs.CTRL_W_GREATER_THAN, modes=_MODES_ACTION)
class ViIncreaseCurrentWindowWidthByN(ViOperatorDef):
    """
    Vim: `<C-w>>`
    """
    def __init__(self, *args, **kwargs):
        ViOperatorDef.__init__(self, *args, **kwargs)
        self.scroll_into_view = True

    def translate(self, state):
        cmd = {}
        cmd['action'] = '_vi_ctrl_w_greater_than'
        cmd['action_args'] = {'count': state.count}
        return cmd

Stack trace trying to run the command.

Traceback (most recent call last):
  File "/home/code/sublime_text_3/sublime_plugin.py", line 533, in run_
    return self.run(**args)
  File "/home/code/.config/sublime-text-3/Packages/Vintageous/xactions.py", line 831, in run
    command = key_mappings.resolve(check_user_mappings=check_user_mappings)
  File "/home/code/.config/sublime-text-3/Packages/Vintageous/vi/mappings.py", line 131, in resolve
    seq = to_bare_command_name(seq)
  File "/home/code/.config/sublime-text-3/Packages/Vintageous/vi/keys.py", line 518, in to_bare_command_name
    new_seq = list(KeySequenceTokenizer(new_seq).iter_tokenize())
  File "/home/code/.config/sublime-text-3/Packages/Vintageous/vi/keys.py", line 499, in iter_tokenize
    token = self.tokenize_one()
  File "/home/code/.config/sublime-text-3/Packages/Vintageous/vi/keys.py", line 493, in tokenize_one
    return self._expand_vars(self.long_key_name())
  File "/home/code/.config/sublime-text-3/Packages/Vintageous/vi/keys.py", line 469, in long_key_name
    raise ValueError('wrong key {0}'.format(key_name))
ValueError: wrong key w