Skip to content

How do I add two keymaps to correspond to the two opener? #489

Closed Answered by sxyazi
blankPen asked this question in Q&A
Discussion options

You must be logged in to vote

I think you can call vim or vscode directly, without following the opener rules. Like this:

keymaps = [
	{ on = [ "o", "v" ], exec = """  shell --confirm 'vim "$@"'  """ },
	{ on = [ "o", "c" ], exec = """  shell --confirm 'code "$@"'  """ }
]

The shell command docs here: https://yazi-rs.github.io/docs/configuration/keymap#:~:text=without%20the%20extension.-,shell,-%3A%20Run%20a%20shell

Replies: 1 comment

Comment options

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