Skip to content

Execute two commands with one binding? #1102

Answered by gdh1995
txtyash asked this question in Q&A
Discussion options

You must be logged in to vote

To jump across tabs whatever mode Vimium C is in (normal, insert, or anything else), the recommended way is to use chrome://extensions/shortcuts and shortcut userCustomized1 visitPreviousTab

If a key mapping uses <a-r>, then it only takes effects in normal mode, but not in insert mode.
To trigger commands in insert mode, you'll need :i to indicate it's insert-mode-enabled:

# both lines are necessary, unless you use `shortcut userCustomized1 ...`
map <a-r> visitPreviousTab
map <a-r:i> visitPreviousTab

# or you may use the new syntax of `map!`
map! <a-r> visitPreviousTab

$then is a parameter of map (and run), but not mapKey; <esc> is a key but not a command name. So, map <a-r:i> dispatchE…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@txtyash
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by txtyash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants