micro-editor / micro-editor/micro
Better handling of completions when opening a file
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description
As discussed in #2891 the current behaviour of completions for opening a file is frustrating when dealing with directories. There is no currently no straightforward way to select a directory without finishing the completion. Pressing Enter when the directory is highlighted leads to micro trying to open the directory and receiving the Error: X is a directory and cannot be opened message.
As requested, this issue is to discuss ways in which this could improved. My preference would be to adopt the zsh behaviour, whereby pressing either / or Enter when a directory is highlighted only adds that directory to the current target path, instead of attempting to open it. The user can then press tab again to attempt completion within the sub-directory the path points to.
Does anyone else have another suggestion?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing completion while opening a directory in micro, including pressing Enter or / when the directory is highlighted. Read the completion and file-opening paths to determine where the directory is treated as an open target. Done requires an agreed interaction design, with the issue's preferred behavior validated for continuing completion inside the selected directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100