charmbracelet / glow

Render markdown on the CLI, with pizzazz! 💅🏻
MIT License
15.7k stars 336 forks source link

Feature request: follow relative links in TUI mode #441

Open MageJohn opened 1 year ago

MageJohn commented 1 year ago

Often a directory of markdown files will have relative links to each other. It would be nice if in TUI mode it were possible to follow these links directly.

Note this is seperate from OSC8 hyperlink support (#237). That hands off following the link to the terminal, but in this case it would be useful if Glow were the one following the link so that it opens in the TUI.

To select the links, I imagine pressing tab/shift-tab to move between links and then pressing enter to follow the link. If mouse support is enabled, then it would be awesome to be able to use the mouse as well.

KaviiSuri commented 1 year ago

Would love to pick this up if it's available!

carloswm85 commented 1 year ago

dart.md file is in the same folder as flutter.md, which contains a link to the former.

WindowsTerminal_ZKnRaDqdww

What you are saying is that that ./dart.md link should open the dart file? Hyperlinks are properly open when holding ctrl + left click, and opening the dart file should work the same way.

db7 commented 7 months ago

That doesn't seem to work in my remote setup with tmux. I think the idea is to navigate the links with some key and then following the link with enter. Something like command line web browsers do. It sounds to me like an awesome feature.

franalbani commented 6 months ago

This would be really nice as it would allow to make a little interactive navigator for a network of markdown files.

askoropadsky commented 5 months ago

I'd love this feature too so I can navigate between multiple linked markdown files without taking hands off keyboard!