Replies: 1 comment 5 replies
-
|
Does something like this work? [mgr]
prepend_keymap = [
# Replace `code` with your preferred editor
{ on = "<Enter>", run = "shell -- if [ -d %h ]; then ya emit cd %h; else code . && code %h; fi", desc = "Enter the child directory, or open the file" },
]Or, in your preferred format: [[mgr.prepend_keymap]]
# Replace `code` with your preferred editor
on = "<Enter>"
run = "shell -- if [ -d %h ]; then ya emit cd %h; else code . && code %h; fi"
desc = "Enter the child directory, or open the file" |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
kitty
yazi --debugoutputDescribe the question
I have this in my keymap.toml
Here "open the file" often means opening a source file in my text editor. However, for my editor to work properly 9/10 times I need it to actually have the current working directory set to be the one containing the file I'm opening. How do I achieve this?
Anything else?
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions