micro-editor / micro-editor/micro
Open term in same folder as text file I'm editing
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Hi, I'm learning micro right now, and wanted to have a shell alongside the file I'm editing - in a similar style to VS Code for example.
The problem is, the term command turns on the shell at my home directory (/home/petr), and not the directory I'm editing my file in (/home/petr/Documents/petrlaskevic.github.io). This means I'd have to cd my way through.
Could there be an option to open the shell at the current folder? (like term . for example?)
The ideal workflow for me would be:
1.) open a file index.html in /home/petr/Documents/petrlaskevic.github.io/index.html
2.) hsplit index.html (or better yet, a command for hsplitting the current file - like hsplit . - to not have to write the whole name)
3.) ctrl e
4.) term . to open the shell at /home/petr/Documents/petrlaskevic.github.io
I believe this would be a fine addition to micro :)
Many programs have opening in a similar vein (with . as the argument).
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 finding the implementation of the term command and how the currently edited file's path is available. Reproduce the workflow with index.html, hsplit, and term ., then verify that the shell opens in /home/petr/Documents/petrlaskevic.github.io. Done means the requested current-folder behavior is supported without breaking the existing command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100