Skip to content

Commit 54b622d

Browse files
committed
docs: add github browse keybindings on Tips
1 parent a245ede commit 54b622d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/tips.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,27 @@ run = '''
210210

211211
Credits to [@aidanzhai for sharing it](https://t.me/yazi_rs/3325/15373) in Yazi's telegram group.
212212

213+
## Browse hovered file or directory in Git repository on Github {#browse-on-github}
214+
215+
```toml
216+
[[manager.prepend_keymap]]
217+
on = [ "g", "b"]
218+
run = '''
219+
shell 'gh browse .'
220+
desc = "Browse cwd on Github."
221+
'''
222+
223+
[[manager.prepend_keymap]]
224+
on = [ "g", "f"]
225+
run = '''
226+
shell 'gh browse $(git ls-files $0) --branch=$(git branch --show-current)'
227+
'''
228+
desc = "Browse hovered file on Github."
229+
'''
230+
```
231+
232+
Browse hovered file/directory inside Git repository using [gh](https://cli.github.com/manual/gh_browse) on Github.
233+
213234
## Unix: Add subtitle to the running MPV {#mpv-subtitle}
214235

215236
Add these lines to your `~/.config/yazi/yazi.toml`:

0 commit comments

Comments
 (0)