denisidoro / navi

An interactive cheatsheet tool for the command-line
Apache License 2.0
14.61k stars 489 forks source link

Any way to have snippets on the left rather than on the right? #868

Closed jbrilha closed 6 months ago

jbrilha commented 6 months ago

I usually just use a quarter of my screen for each terminal window and with the default config most snippets aren't visible, so I was wondering if there's a way to move columns around?

I can change the width percentages and such of the tags and comments in the config to make the snippets more visible, but I'd still prefer having them on the left if possible, did I miss something in the documentation or is it just not doable?

Thanks!

welcome[bot] commented 6 months ago

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)

denisidoro commented 6 months ago

That's not possible and implementing it isn't trivial: basically navi needs to build the input to fzf in the col1;col2;col2 format. Then, it needs to parse this result into col1 then col2 then col3.

So everything is hardcoded and there's an explicit assumption of what the nth column means.

The cleanest way to implement this would be for fzf to implement the column moving functionality itself. This way navi wouldn't need to worry about it: in this scenario, perhaps col1 was replaced with col2 but navi still sees the first column as col1.