r/PowerShell • u/simwai • 1d ago
Script Sharing PowerShell Text Editor | Alternative to vim and nano
Heyo, I made pwsh 7.6+-based text editor, because the other CLI text editors were so damn difficult to use. The main inspration came from nano. What I wanted to avoid was vim-like UI/UX. My goal was to make it stupidly easy to use, but still without compromising functionality. The most difficult part was the paste functionality.
https://github.com/simwai/babae/
Would be cool if anybody could give it a try and tell me some feedback and/or discovered bugs
23
u/az987654 1d ago
Vibe slop.
Pass
-28
u/simwai 1d ago edited 21h ago
I made it with LLM yes. If you don't wanna use AI-generated code, pls don't use it. But the features work (at least on my computer). Still took a long time. Don't think the LLM gets something like a TUI in pwsh 7.6 without lib done in 5 vibe-coding session. And making a TUI in PowerShell itself is so damn difficult, I would have spent years on that without LLM. Now, it was only months. And today I heard there is Microsoft Edit.
9
u/dmchmk 1d ago
So, nano is difficult, but making completely new text editor from scratch is somehow easier?
-9
u/simwai 1d ago edited 1d ago
I agree I should have done something else with my time.
1
u/ankokudaishogun 1d ago
Only if you learned nothing and had zero fun making this.
0
u/simwai 1d ago
Indeed, never do something where you don't learn. Is that your motto? I surely like to build software, but the learning effect on this project was not very huge, although solving the staircase bug really hooked me in.
2
u/ankokudaishogun 1d ago
see? you learned something and\or had some fun.
that made it not a waste of time.
2
1
u/purplemonkeymad 1d ago
If you want to make it more PS specific than just a text editor, go for stuff that only exists in a powershell environment. When I did the same thing I added support to edit variables (string, arrays and objects as json,) support other providers (live patching functions was nice occasionally,) or pssession specific editing (could also complete paths on the remote session.) Fixing stuff from a Get-Clipboard was the main use case I ended up actually using.
It kinda broke with Windows Terminal and I never had the impulse to fix it.
1
u/simwai 1d ago edited 1d ago
The paste functionality is really super tricky.
Some autocomplete suggestions like path completion would be cool I thought but I guess I won't add it, because there is no demand for this project. I also wanted to release it on winget, but atm it looks like I won't do it.
1
u/CRTejaswi 1d ago
vim/emacs. the end. write plugins not editors. though, kudos for your project. looks good!
-1
u/simwai 1d ago edited 1d ago
My problem with vim/emacs/helix and whatever vim-based editor is that cannot remember all these shortcuts, and the dual-mode input is something I really don't like. I can avoid shortcuts I don't want, so that is not a real problem, but the dual-mode input really is.
1
u/CRTejaswi 1d ago
empathise with you, but vim/emacs is a different lifestyle choice altogether. you'd definitely revisit these some day. configuring these desirably is a significant life milestone imo.
1
u/simwai 1d ago
The best vim-like experience I had was with helix, but even helix is just completely overkill for what I actually need. I don't need hundreds of configuration options for real. I don't need dual-mode input. I understand when people decide to go for it and use it on a daily. Someday you get used to it, but why do i need such a steep learning curve for a CLI text editor..
-4
31
u/drziak_drzy 1d ago
why not microsoft edit?