Live data from Hacker News

Why I teach vim

blog.ceos.io

141–150 of 185 posts

Re: Why I teach vim

#141
post #121
post #8

"I wish I could say I agonized over all the options at the time and decided vim was the best pedagogical solution, but the reality of the situation was that vi was what I used in college because my father taught me vi" We dont talk about this much, but many of us hardcore Vi/Emacs users have had this knowledge imparted to us from a mentor. Thats probably why the use of Vi/Emacs is much higher in established tech envi…

Interesting take. I came from a CS background but our school was mostly in emacs land on the surface (e.g. newcomer CLI tutorials included it as an upgrade from nano, and nothing on vi) What brought vi to our attention was the holy war itself, and the sheer appeal to decide which camp we fit in. 50 years ago I think it’s a completely different story, but from the point BBS and shitposting were a thing, we got most in…

Can confirm. "Can't exit vim" memes were what introduced me to vim. Though as a primarily windows user, I don't use it much.

Re: Why I teach vim

#142
post #135

What most people forget when they argue against learning vim is that vim is more that just a text editor, it's a whole new philosophy. Once you learn it, you can find it almost everywhere. Learning vim key-bindings was the first thing I did after learning to touch-type, and now I use the same key-bindings on VSCode, Intellij, a remote server I am SSHed into and with the help of Vimimum, even chrome! And if ubiquity i…

Exactly this. Vim is special because it's what we've all agreed on as a standard for modal editing. Luckily, it's also pretty darn good, but that's secondary. Learning one set of commands that can then be used across editors, operating systems, and even terminals is amazing.

> Vim is special because it's what we've all agreed on as a standard for modal editing.

Well I didn't vote for you...

In all seriousness, Vim's keybinds are only popular because no one has really tried to make a good modal editor with different bindings. It's prohibitively difficult to change the bindings in Vim, and prohibitively difficult to change muscle memory, but I still wish that I had a good modal editor that didn't resemble Vi.

It's a similar story with keyboards and qwerty.

Re: Why I teach vim

#143

Why I started to use Vim 5 years ago. I was coding a lot and I realised most of my work was editing code as text. So I figured, why not become really freaking good at it? Vim has a steep learning curve because it's a mental paradigm shift. I personally would recommend it to everyone because although no-code is taking off, most of the developers are still editing text. Sharpen that saw!

You shouldn't be editing "text" but "code" however. Text editing is low productivity task whereas code editing should happen mostly be at much higher level.

Re: Why I teach vim

#144
post #14
post #8

"I wish I could say I agonized over all the options at the time and decided vim was the best pedagogical solution, but the reality of the situation was that vi was what I used in college because my father taught me vi" We dont talk about this much, but many of us hardcore Vi/Emacs users have had this knowledge imparted to us from a mentor. Thats probably why the use of Vi/Emacs is much higher in established tech envi…

They're not really the same thing, compared to vi[m], emacs is statistically dead. And there are already lots of people who're well into their careers in academia and industry who aren't users of either. My own contrarian and probably equally wrong take is that it's mostly about accepting the (evidence-free) premise that modal editing is actually a good thing. It's hard, you suffer but lots of smart people tell you i…

My own contrarian and probably equally wrong take is that it's mostly about accepting the (evidence-free) premise that modal editing is actually a good thing.

Yes, equally wrong. ;-)

We deal with modes all of the time—when you're backing up your car, the car is in reverse mode. Microwave ovens have modes depending on what you want to cook. I use the popcorn mode on mine a lot. Anyone who've ever used a VCR knows what modes are.

So having an editor with modes shouldn't be a foreign concept.

But it's not just about having modes; it's how well thought out Vim is. Even though I've been using Vim for about 10 years (after trying many other editors and getting frustrated for one reason or another), I keep learning more useful things.

I recently needed to edit lots of messy Markdown files for a friend. I knew macros existed but I never bothered to use them. Before I knew it, I was using a couple of macros that really cut down on the tedious work I had to do.

Same thing with regular expressions—I knew about them but I had never gotten around to learning them. Combined with Vim’s composability, regular expressions gives you super powers.

The other thing about Vim I've always appreciated—it's been around so long, articles and videos from 10 years ago are still relevant today.

For example, back in the day, I used to watch Derek Wyatt’s Vim tutorials.

Rewatching some of them today encouraged me to learn macros and regular expressions. When I recently watched this one (https://vimeo.com/15443936), where he extracts plain text out of a messy looking XML file using regular expressions, I was like I want some of that.

Any software made for people who take their tasks seriously—GUI or command line—is going to have a learning curve—I think it's exaggerated for Vim. But the payoff is well worth it.

I just installed Big Sur on my Mac. Everything went smoothly for me, but not everyone was so lucky. Even if I had other compatibility issues, Vim just works. As long as I have a terminal, Vim and web browser, I can be productive.

Re: Why I teach vim

#145
post #14

Earlier quoted context omitted.

They're not really the same thing, compared to vi[m], emacs is statistically dead. And there are already lots of people who're well into their careers in academia and industry who aren't users of either. My own contrarian and probably equally wrong take is that it's mostly about accepting the (evidence-free) premise that modal editing is actually a good thing. It's hard, you suffer but lots of smart people tell you i…

The "suffering" has honestly been overblown by jokes about not being able to quit on one side and the mythologizing of the leet ninja 10x programmer who is only bound by his typing speed and can't waste time reaching for the mouse, on the other side. It continues to surprise me why people have such strong opinions about someone else's editor choice. My current theory is vim users are like vegans/gluten free/paleo/etc…

My current theory is vim users are like vegans/gluten free/paleo/etc, in that its a personal choice that some are public about, and people love to hate on it and "disprove" it for the same reason.

I think there's some truth to that.

I've been vegan for 20 years and a Vim user for half of that time.

Back in the day, I was questioned a lot about why I was vegan, being asked all the time where do you get your protein? Grateful those days are over.

Vegans can tell you the worse people are the former vegans, who almost always had a bad experience of some kind being vegan and want to tell anyone who will listen.

I think people who tried and didn't get Vim are often the ones wanting to disprove that Vim is any good. Because obviously if it didn't work for them, it can't be any good.

The subtitle for Drew Neil’s Practical Vim book is Edit text at the speed of thought and that's kinda how it is when you start to get pretty good at Vim.

Re: Why I teach vim

#146
post #8

"I wish I could say I agonized over all the options at the time and decided vim was the best pedagogical solution, but the reality of the situation was that vi was what I used in college because my father taught me vi" We dont talk about this much, but many of us hardcore Vi/Emacs users have had this knowledge imparted to us from a mentor. Thats probably why the use of Vi/Emacs is much higher in established tech envi…

I got into Linux from a networking background. Windows just didn't have the same network tools available, and they were all expensive. At the time I was mostly doing non-profit sysadmin work.

It took me about 5 years to transition from nano/pico to vi/vim. I'm still learning, but I recently loaded Debian on a VPS I use and was surprised when visudo defaulted to nano. It seems so much less powerful and actually more difficult to use.

Re: Why I teach vim

#147

Earlier quoted context omitted.

> Vi is ok for viewing files on a terminal, and for small edits, but it’s rather mediocre for any significant amount of development work. May I ask what prove this?

One of the statements I see a lot is that mouseless, keyboard only HCI is faster. But as far as I know, to the extent that any real studies have been done at all, this assertion is false. I don't have the references at hand but I think people like Alan Kay and designers at Apple would think it crazy to even suggest that a keyboard only HCI is more efficient.

Could You please add a single example for faster solutions to modify several (text/source) files' contents at once with mouse and/or touchpad mainly (or any other already existing HCI interface)?

Re: Why I teach vim

#148
post #121

Earlier quoted context omitted.

Interesting take. I came from a CS background but our school was mostly in emacs land on the surface (e.g. newcomer CLI tutorials included it as an upgrade from nano, and nothing on vi) What brought vi to our attention was the holy war itself, and the sheer appeal to decide which camp we fit in. 50 years ago I think it’s a completely different story, but from the point BBS and shitposting were a thing, we got most in…

Can confirm. "Can't exit vim" memes were what introduced me to vim. Though as a primarily windows user, I don't use it much.

Try Mobaxterm on windows, it give you vim, grep, awk, xwindows and Linux Land tools in a nice single installation.

Current versions of windows can do scp, ssh, rsync out of the box in the windows console, but I believe that is less then a year old and many people don't realize it.

Re: Why I teach vim

#149

What most people forget when they argue against learning vim is that vim is more that just a text editor, it's a whole new philosophy. Once you learn it, you can find it almost everywhere. Learning vim key-bindings was the first thing I did after learning to touch-type, and now I use the same key-bindings on VSCode, Intellij, a remote server I am SSHed into and with the help of Vimimum, even chrome! And if ubiquity i…

chrome? how?

> with the help of Vimimum, even chrome!

Even though OP made a typo, he more likely wanted to say Vimium.

Re: Why I teach vim

#150

Earlier quoted context omitted.

Why not the IntelliJ Vim plugin with Clion? I think the better distinction is Vim for editing text, IDE for performing non text editing tasks.

It's less about the key mappings and more about the portability and lightweight nature of vim. So Clion runs on java and is really heavy while vim can be spun up instantly while you're sshed into any machine. I want both of these features combined.

Ah, I did not see where development on a remote machine was the constraint. In that situation you’re options are more limited for sure.
Post reply on HN