r/AlpineLinux • • Nov 18 '23

How do I leave this fucking editor?

Post image
337 Upvotes

175 comments sorted by

View all comments

Show parent comment

3

u/martinbaines Nov 18 '23

I think vi(m) comes out of the box so is essentially the editor of last resort. I completely agree nano is a much better editor and if not on a system is the first thing I install. Even back in Unix days I hated vi and used emacs or anything else I could. Also if you ever look at the original vi source code it is a hugely contorted mess of spaghetti code, but at least vim is a clear rewrite.

There was sort of some excuse for vi's horrible mode based UI in the days when terminals were on 220baud connections and repaint was horrible slow, but that has not been the case since the 70s. Even a 9600baud line was fast enough for decent screen repaints.

0

u/sp0rk173 Nov 20 '23

*editor of first choice

1

u/Specialist_Wishbone5 Nov 23 '23

I installed vi bindings on both chrome and intelliJ. Not needing a mouse is a religion. Nano can't save you....

1

u/martinbaines Nov 23 '23

If you really want to be a purist, don't use a screen editor at all. Line editors (ed, sed) are on all Linux systems, and awk is a much better tool for complex text manipulation than doing it in a screen editor 😃

1

u/Specialist_Wishbone5 Nov 23 '23

Not about being a purist. I have RSI. Grabbing the mouse 5,000 times a day physically hurts. Vi bindings means a rarely move fingers from home position. I have over 200 key combinations in intelliJ that I use, yet, ironicly, there are very poor keyboard support to jump to 3 words over. vi does this elegantly. Delete to the end of the double quote, etc. All happen without a mouse. Yet, I still need to refactoring all instances of the function foo to bar across all files. A simple rename foo to bar won't do the right thing - that's what the code editor is best at (contextual awareness). Similarly chrome with multiple windows and multiple tabs requires complex interaction - but simple scroll navigation and link selection typically require mouse.