vim-fern
vim-fern copied to clipboard
Add a way to go up a directory with `Return`
Pretty much every “graphical” file explorer has a graphical option to go one level-up and there is a reason why: for people who use arrows to move between files/folders and hit Enter to get into a folder it would be natural by continuity to stay in the setup arrow+enter also to go one level up. They don’t have to change position on the keyboard and the brain avoid a context switch which is very good. Having a mechanism to go into a folder and be forced to switch mechanics to go out is in general not a good idea.
https://github.com/lambdalisue/fern.vim/issues/119#issuecomment-1990913270
Personally, I thought it was unnecessary, but after the explanation above, I understand. I probably will make it so that it can be displayed with some kind of option.
Adding a .. up a dir line is a bit tricky because all lines in the fern window are derived from the directory structure, and all renderers assume that the first line is the root. So we may need to add an option to change the behavior of Enter on the root node (e.g., reload to go up a directory).
Closed by #119