mgunyho / tere

Terminal file explorer
European Union Public License 1.2
1.67k stars 36 forks source link

Feature suggestion: bookmarks #41

Open osyvokon opened 2 years ago

osyvokon commented 2 years ago

Tere! Thank you for tere! :)

Jumping to a bookmarked folder would be a great addition to tere.

This is extremely useful when there are multiple project dirs or other frequently used locations all over the file system. For example, something is in ~/work/projectA/subproject/src/my/module, something is in /mnt/long/complicated/network/mount/datasets, something is in /opt/.... -- you get the idea)

Shortcuts

One of these shortcut schemes might work well:

  1. `0 ... `9, `a ... `z -- vim-style bookmarks (i.e., backtick followed by a single-character bookmark name)
  2. Ctrl+1 ... Ctrl+9 -- tab-navigation style
  3. Alt+1 ... Alt+9 -- since tere uses a lot of alt-shortcuts already

In the vim-style, we lose the ability to search files whose names start with a backtick and bookmark name, but that should be super rare.

Creating bookmarks

The simplest option is to create bookmarks by editing a config file.

Better yet, have one of these shortcuts to assign the current location to a bookmark:

  1. ``0 ... ``9, ``a ... ``z
  2. Ctrl+b 1 ... Ctrl+b 9
  3. Alt+b 1 ... Alt+b 9

This is just a feature suggestion -- feel free to close this issue at any time

mgunyho commented 2 years ago

Thanks for the suggestion!

This could work if we can get the UI design right. I would like to avoid two-key keyboard shortcuts like Alt+b 1, because it adds extra complication to the input handling. I also want a bookmark system like this to be easily discoverable via the UI (I presonally usually end up not using bookmarks in programs like vim because it's too bothersome to figure out how they work), and the list of bookmarks should be easy to view. I might consider this, but TBH it's not going to be high on the priority list.