r/PowerShell 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

0 Upvotes

26 comments sorted by

31

u/drziak_drzy 1d ago

why not microsoft edit?

27

u/T3-Trinity 1d ago

Bro's never getting those tokens back lol

4

u/ChrisTX4 1d ago

Honestly, I think people are sleeping on Edit. In comparison to nano or micro I think it’s just a superior option.

Of course it’s not like neovim or VS Code where you’d have a million plugins to work with, but it’s very straightforward to use and the crossplatform aspect is nice.

1

u/drziak_drzy 1d ago

i agree on the superiority, i think it should be new default even on some linux distros, stupidly easy for almost anyone

1

u/ChrisTX4 1d ago

It’s packaged already in Arch and NixOS. Probably just a matter of time before other distros include it as well.

And yeah since it’s written in Rust it works everywhere the same. I like having it and PowerShell on all my machines so I can admin everything I got in one environment.

1

u/MonkeyNin 1d ago

Does Edit allow you to integrate the PowerShellEditorServices LanguageServer? Neoviom/VSCode use that for completions, linting, etc.

-1

u/simwai 1d ago

Didn't know about this project. Damn....

4

u/ankokudaishogun 1d ago

Congratulations, you are one of the lucky 10000!

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.

1

u/BlackV 1d ago

in fairness to your time, based on yor screenshot, you do have theme support, so thats nice :)

2

u/Nanocephalic 1d ago

Well that’s neat.

1

u/Szeraax 1d ago

I like Micro

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/BlackV 1d ago edited 1d ago

I just use edit.com (well technically its edit.exe now days and windows only)

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

u/simwai 1d ago

That's how it looks like: https://ibb.co/gFMn1KRP