Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

331–340 of 489 posts

Re: Helping a Million Developers Exit Vim

#332
post #146

Earlier quoted context omitted.

Emacs is definitely difficult to exit from. The difference is emacs usually isn't the default/fallback EDITOR on the system, so you rarely get dropped into it unknowingly/unexpectedly.

Also: Emacs is rarely if ever used in the terminal today, and exiting it through the standard desktop protocol ([X], Ctrl-[Shift]-Q, Alt+F4, ...) always works.

I don't think that's true. System administrators will happily use it in a terminal. I'd often deliberately run emacs -nw when something requires a quick edit and the GUI would be imposing.

Re: Helping a Million Developers Exit Vim

#333
post #5

Earlier quoted context omitted.

C-M-footpedal1-q

I wonder why foot pedals have never caught on... Seems like they would be genuinely useful!

They have. Kinesis have offered foot pedals for more than a decade. Personally I don't sit in a way that would work for me.

Re: Helping a Million Developers Exit Vim

#334

Earlier quoted context omitted.

Approximately 0% of terminal programs use control-c as copy. Conventions depend on context. "Control-C sends SIGINT" has been a standard for longer than "Control-C means copy".

I'm well aware of that and the historical reasons that it's the case. I'm just using it as an example of breaking well established patterns that screw new users.

^C as copy is an example of breaking well established patterns that screw new users. Its THE canonical example in fact.

Re: Helping a Million Developers Exit Vim

#335
When using a "ZZ" in command mode, I accidentally hit a ctrl-z every now and then. It took me a while to finally figure out that "fg" in the shell will bring the suspended vim session from the background to the foreground, so that I didn't have to kill the process.

Re: Helping a Million Developers Exit Vim

#336

I met my wife because she was stuck in VI. I was a unix sysadmin in the early 90s, and she was a grad student. She came to me for help (like most of the 1st years did) because she couldn't get out of vi. However, to be fair, this was not her fault per-say. She actually knew how to use vi, but just couldn't find the ESC key. Does anybody remember the DEC keyboards where there was no traditional ESC key, but it was F11…

it's per se.

Re: Helping a Million Developers Exit Vim

#337

(Attribution is questionable, but as a geezer I feel the need to make sure the younger generations at least are familiar with this:) ed is the standard text editor Let's look at a typical novice's session with the mighty ed: golem> ed ? help ? ? ? quit ? exit ? bye ? hello? ? eat flaming death ? ^C ? ^C ? ^D ? --- Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet pruden…

Also keep in mind that ex is a part of vi and vim, and is an improved version of ed. All : commands in vi(m) are actually ex commands

ex is a good way to script in-place text edits using the commands you're familiar with in vim. just be careful.

Re: Helping a Million Developers Exit Vim

#338

I met my wife because she was stuck in VI. I was a unix sysadmin in the early 90s, and she was a grad student. She came to me for help (like most of the 1st years did) because she couldn't get out of vi. However, to be fair, this was not her fault per-say. She actually knew how to use vi, but just couldn't find the ESC key. Does anybody remember the DEC keyboards where there was no traditional ESC key, but it was F11…

... and people complain about Apple's touchbar...

Re: Helping a Million Developers Exit Vim

#340
post #90

Earlier quoted context omitted.

I find that with a specific and known edit, it's far easier to do using sed and awk. In particular awk Has better power-to-weight ratio at traditional text processing. I think typical awk scripts could very well be shorter than the equivalent python scripts that do the same thing.

I have written hundred+ line awk programs. For stream text editing it is excellent at what it does and it's install base is huge. Rarely do I encounter a *nix machine without it on there.

Perl & Python are also installed on most UNIX machines I've seen. I know Perl was invented to address weaknesses with Awk. I use all 3 to some degree, but is there a reason you like Awk?
Post reply on HN