News for hackers. Stuff that matters.
Re:micro – A Modern Alternative to nano by muxator on Friday August 18, 2023 @01:56AM (#37171791)
The top intuitive to use TUI editors in my heart will always be: - MS Dos Edit - Turbo Pascal 6

Edit felt like a windows application: select with shift+arrows, move fast with ctrl+home/end.

Turbo Pascal's keybindings were a bit influenced by WordStar's, I think, so a bit old style already at the time. But, my friend, the TUI Toolkit, TurboVision! What did they do there! Multiple windows that could be with dragged and resized, blazingly fast. All of this on a 486 with megabytes of ram.

I never found any TUI editors like those two.

Re:micro – A Modern Alternative to nano by acumenical on Friday August 18, 2023 @02:14AM (#37171913)
I've never used micro, but if you look at the default keybindings[0], you'll see they're very Windows-y and might be to your liking.

As for myself, I don't see cut-to-character or select-to-character like in vim, and yanking and pasting seems more intuitive in vim. And with visual block I don't miss Sublime style cursors at all.

0: https://github.com/zyedidia/micro/blob/master/runtime/help/k...

Re:micro – A Modern Alternative to nano by boxed on Friday August 18, 2023 @03:00AM (#37172200)
The selection model is unfortunately a bit broken. For example shift+control+arrows and shift+down doesn't work. I believe the problem is that selection with shift isn't written to compose with other navigation.
Re:micro – A Modern Alternative to nano by neteresy on Friday August 18, 2023 @03:09AM (#37172251)
This is killing me man.
Re:micro – A Modern Alternative to nano by bharathyes on Friday August 18, 2023 @04:02AM (#37172600)
you need to check your terminal emulator.

just checked the ctrl+thift+arrow keybind, works on alacritty but doesnt on kitty.

Re:micro – A Modern Alternative to nano by bharathyes on Friday August 18, 2023 @04:05AM (#37172615)
you need to check your terminal emulator.

just checked the ctrl+thift+arrow keybind, works on alacritty but doesnt on kitty.

and shift+up/down works on both

Re:micro – A Modern Alternative to nano by peterfirefly on Friday August 18, 2023 @04:16AM (#37172695)
Those key combos didn't originally send any special codes to the app. Newer terminal emulators do.

(I once wrote a hack for Linux that opened a connection to the X server and used the xkb -- X Keyboard Extension -- protocol to get info about the shift/control/etc state in order to synthesize shift+arrow and shift+control+arrow keycodes. It worked almost perfectly with a local X server.)

Re:micro – A Modern Alternative to nano by TylerE on Friday August 18, 2023 @02:35AM (#37172024)
The one I really liked back in the day was Jed. Basically nano/windows style keybindings, but it had stuff like syntax highlighting…in the mid 90s.
Re:micro – A Modern Alternative to nano by kseistrup on Friday August 18, 2023 @02:53AM (#37172161)
I've been using jed since the 90'es. I've tried many other editors, but I always return to jed.

Should I switch to something else, it would probably be kakoune.

Re:micro – A Modern Alternative to nano by pyrelight on Friday August 18, 2023 @02:32AM (#37172002)
Turbo Pascal's UI was magical and perfect.
Re:micro – A Modern Alternative to nano by richardjam73 on Friday August 18, 2023 @03:07AM (#37172239)
When looking at Freedos a while back I found an editor called setedit. It does work on other platforms than DOS but I haven't tried it. It is influenced by the Borland C++ IDE editor.

https://setedit.sourceforge.net/

Re:micro – A Modern Alternative to nano by pepa65 on Friday August 18, 2023 @03:07AM (#37172241)
Those are default bindings in nano I think. (I've been using my custom bindings for years...)
Re:micro – A Modern Alternative to nano by lloeki on Friday August 18, 2023 @04:33AM (#37172817)
486? Ha! I remember getting my hands on a TP copy in late 80s early 90s, first version I had fit on a 720k floppy but the second one did not (1.44), and I remember trimming it down to fit 720k because I had only a 640kiB 80c88 with two 3.5" 720k drives and no hard disk. It was plenty fast already!

Then I got a 1MiB 286 Goupil G5 (with something like 20MiB HDD, I remember thinking that thing is so huge how am I ever going to fill that, which I never did) and a colour CRT, TP felt so blink and you miss it fast on that machine already, it must have been lightspeed on a 486!

I for the life of me can't remember if aforementioned versions were (resp.) 4.0 and 5.0 or 5.0 and 6.0 though. My hunch is on the latter but I'm really not sure. Last one I used was TP 7.something much later (early '00s)

Re:micro – A Modern Alternative to nano by pjmlp on Friday August 18, 2023 @04:51AM (#37172938)
TP 5.5 was the one that wasn't already fitting into a floppy.

Using MS-DOS 3.3 with TP 4, was still doable on a 1.44MB, which I used to carry around during high school for our computer lab.

Re:micro – A Modern Alternative to nano by roytam87 on Friday August 18, 2023 @04:40AM (#37172859)
You may give YEdit a try. http://www.malsmith.net/edit/
Re:micro – A Modern Alternative to nano by pjmlp on Friday August 18, 2023 @04:48AM (#37172913)
TurboVision in TP 6 was my path into OOP, started early on by TP 5.5 adoption of Apple's Object Pascal features.

The framework design is marvelous, not only what it could do on UI level, it already had reflection, serialization, collections with common stuff like map/filter/sort via callbacks.

Great learning experience, and good ramp into "there is more than one way to do OOP".

Another good TUI experience on MS-DOS, also with great OOP ramp-up learnings, Clipper (version 5 introduced OOP support).

Re:micro – A Modern Alternative to nano by zczc on Friday August 18, 2023 @04:53AM (#37172956)
I think mcedit is close (included with Midnight Commander): similar keybindings, pull-down menu on top, resizable windows
Re:micro – A Modern Alternative to nano by tuatoru on Friday August 18, 2023 @05:25AM (#37173186)
Try tilde editor. It's close-ish.

1. https://github.com/gphalkes/tilde

Re:micro – A Modern Alternative to nano by ale42 on Friday August 18, 2023 @10:59AM (#37176609)
Very nice discovery, thanks! Just found it was already on HN, e.g. https://news.ycombinator.com/item?id=34545086

By the way, I noticed a long startup delay... (on tilde, and on micro as well). After some stracing, I found out that the culprit was a TCP connection attempt to an X server that I didn't have. (X forwarding was configured in my SSH client, but there was no X server running on my PC...) In case it can help someone ;)

Re:micro – A Modern Alternative to nano by pavlov on Friday August 18, 2023 @05:34AM (#37173240)
The reason why MS-DOS text editors were so fast and felt powerful is that they used direct access to video memory to render the text-mode UI.

Unix is still stuck on the notion of the console being an output stream that emulates a Teletype printer at some level. Full-screen text UIs work around this by adding extra layers for screen manipulation in a stream-oriented device.

On MS-DOS, the system APIs were so primitive and limited that everybody (beyond basic CLI tools anyway) just wrote directly against the IBM PC hardware, which conveniently mapped the text-mode screen at a memory location. You could print or move or clear on-screen elements using standard memory operations, and there was no other software layer sitting in between translating the frame buffer, so updates were instant.

It’s the difference between a multi-user system where you (as the user) get a narrow stream of I/O with the shared computer vs. a single-user machine where you truly control the device. Sadly the latter model of personal computing is increasingly obsolete.

Re:micro – A Modern Alternative to nano by magicalhippo on Friday August 18, 2023 @09:26AM (#37175303)
Hence some lovely text mode demos and such. Random example[1].

[1]: https://www.youtube.com/watch?v=QSe5FGlyBFU

Re:micro – A Modern Alternative to nano by cmrdporcupine on Friday August 18, 2023 @09:39AM (#37175477)
While the 'tty' concept seems archaic, it has served Unix-ish systems very well in the long run, giving us a nice console experience with a diversity of terminal applications and an excellent remote experience.

Meanwhile Windows never really implemented a proper abstract console abstraction -- until recently -- and forced all console output through the same terrible hardcoded terminal with crap support for basic things like copy and paste, and struggled for over two decades to have a productive console environment, forcing administrators and power users to do everything of substance through the GUI or tear their hair out. This is finally fixed, but only recently.

Re:micro – A Modern Alternative to nano by mbork_pl on Friday August 18, 2023 @06:41AM (#37173796)
Right! I also used a Norton Commander clone written with Turbo Vision. You could mark several files (with Insert), then press F4 and voilà - you got multiple windows open! AFAIR, you could even do a "global search and replace" (across these windows). Powerful stuff.

Although coding in TV was much, much less pleasant than using it...

Now I use Emacs, which is obviously superior to any other editor except Vim, which is incomparable [0] to Emacs.

[0] https://en.wikipedia.org/wiki/Partially_ordered_set