vim-fern icon indicating copy to clipboard operation
vim-fern copied to clipboard

Add a way to go up a directory with `Return`

Open lambdalisue opened this issue 1 year ago • 1 comments

image

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.

lambdalisue avatar Mar 16 '24 05:03 lambdalisue

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).

lambdalisue avatar Mar 16 '24 05:03 lambdalisue

Closed by #119

lambdalisue avatar May 22 '24 08:05 lambdalisue