helix icon indicating copy to clipboard operation
helix copied to clipboard

Find file (space .)

Open pickfire opened this issue 2 years ago • 24 comments

Based on doom emacs find-file but also wanted to show an alternative to file explorer #2377.

Screenshot_20220531_001520

@cossonleo this is what I mean, just got some motivation to do a draft to show you what I meant, but maybe this complement the tree explorer, this is more of a per directory navigation like :o <complete> but with a picker / on steriods.

Still missing some basic stuff that I wanted to see

  • [x] recurse find file
  • [x] edit new file
  • [x] current dir prompt
  • [x] backspace navigate to upper directory
  • [x] file metadata (most of the code is stolen from exa)
  • [ ] add format_fn back to preview like shown as in image

Things not gonna be done in this pull request since they need more thoughts and can be done in separate pull request I believe

  • prompt and results truncation in case it is too long
  • file color or prompt color, tweaking it requires changing the how rendering is handled
  • utf-8 file handling, I bet if CJK characters shows up in filename it's gonna look weird, but it's not gonna appear now
  • ignore permission and size matches on search terms

Compared to doom emacs

Screenshot_20220506_005024

The code seemed kinda hard to read now, might need some cleanup. Also, some code are stolen without much changes, didn't really go and tweak it to make it look nice (and count the characters) since the rendering may change later once we add color.

pickfire avatar May 05 '22 16:05 pickfire