Live data from Hacker News

Why I teach vim

blog.ceos.io

81–90 of 185 posts

Re: Why I teach vim

#81
i only had one good teacher in high school and I consider myself lucky. the students of the writer of this article have at least one good teacher as well. personally i only know vim enough to know that I prefer emacs, but I agree with virtually every point of this article. a further point I would make is when you learn these technologies(a text editor/cli/unix tools), you will literally use them for the rest of your life. With no subscription fee!

Re: Why I teach vim

#82
More so than even the choice of editor itself, I think the biggest argument for vim or emacs, especially for students, is that you “live in” the *nix cli.

The amount of stuff you soak up being a unix tool user is just night and day compared to using sublime text or something. Because using a cli text editor implicitly sets you on this path of learning through the command line. So you start with cding and lsing around, opening your file in vim, typing gcc or whatever. In a very frictionless and natural way, pretty soon you’re reading man pages, writing shell scripts and makefiles, etc.

In a very real way, the Unix command line environment has you poke around an interactive “boiler room” of your computer, and that type of learning, learning by exploration, is something far different from learning individual tools at a higher level of abstraction.

It’s like letting a kid loose into a master’s workshop instead of showing them one tool at a time. By seeing everything “together” and exploring what the different tools do, the “fog of war” of unknown unknowns clears much faster for a novice, and this provides a MUCH more solid knowledge footing to build on.

Re: Why I teach vim

#83
post #56
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…

I don't think your take is wrong. I have yet to see any actual argument from the vim/emacs crowd. I'm genuinely curious about what makes them defend their editor choice that heavily but whenever I ask them for their reasons all I get is a "modal editing is great because modal editing is great". I can somewhat understand "don't have to touch the mouse" as that's a personal preference for them (even though IDEs have ke…

I'll name one use case where Vim's approach helps me out a lot: macros.

Quite often I need to edit a whole bunch of lines of code/data in a similar way. simply being able to repeat a particular set of 'motions' x times, or on whatever line I'm one, has often proven quite useful.

I'm sure that many people don't really need to do this much, but for me it's probably something that crops up daily (when I'm working), at least once. Often multiple times.

The fact that I can perform complex operations and record them with no extra mental load, is definitely one reason I'm sticking with Vim (or rather, evil on Emacs).

Re: Why I teach vim

#84

I really wish there was a batteries included vim-like console editor with all the power of the jet brains suite of IDEs and convenience and lightness of vim. As it stands right now I end up using both an IDE and vim. Maybe emacs is the answer but honestly if I look past all the yak-shaving to get emacs to the power level of an IDE does it really get to the point where it has everything that say CLion has?

Micro editor is a pretty good balance of lightness and batteries included.

https://micro-editor.github.io/

HN discussion: https://news.ycombinator.com/item?id=23334190

Re: Why I teach vim

#85
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 think the gatekeeping involved is more personality type. learning vim/emacs is kind of like learning to play minecraft. you either have to really want to, or on the receiving end of peer pressure. as an emacs user who’s never gotten into vim, I definitely am going to try this ‘vim tutor’ someday when I have some time to kill.

Re: Why I teach vim

#86
post #56
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…

I don't think your take is wrong. I have yet to see any actual argument from the vim/emacs crowd. I'm genuinely curious about what makes them defend their editor choice that heavily but whenever I ask them for their reasons all I get is a "modal editing is great because modal editing is great". I can somewhat understand "don't have to touch the mouse" as that's a personal preference for them (even though IDEs have ke…

Me and my friends learned with Vim first (not really a choice, our exams were basically on fresh installs). One of us got into SublimText quite fast (with modal editing too, using vintage), while another went into vim scripting and python, and another with neovim.

It was our first year, i don't think we even finished our Posix shell project at that time, so our knowledge of vim's binding was very limited, as we spent less than 6 month on it. But this was really comfortable, and even the two people of our group that learnt to code prior with the Java IDE got hooked with modal editing, vim or not. Because once you've learned how to use it, it is just more comfortable. I still know how to use ctrE and ctrlA and basic shortcuts present with every IDEs, but the `find ", move one right, delete all util next "` i don't, and i'm pretty sure is not the same on Atom or Netbeans, and since i've already learned the superior `ri"` (replace inside ""), i don't understand why i should learn more complex shortcuts.

I mean, even `delete from this word until the end of the line` i'm pretty sure won't be the same within two editor (you'll have to find the word with control f, place a mark wich differ depending on the editor, CtrlE, then either place a second mark or delete from the first mark? i guess?). I like consistency and not having to place mark and think on "how will i do that".

I'm not saying modal editing is better, i think it's just like learning to use a new tool. Let's say you want to add floorboard in your house. You know how to use a circular saw (everyone does), so you use that, and that's okay and probably enough. I've learned how to safely and correctly use a radial saw however, and will rather use one if i have the choice. It's not better inherently, i'm just lazy and i find using a radil more comfortable (as long as i have earplugs available).

Re: Why I teach vim

#87
post #55

Earlier quoted context omitted.

I work at a trading company on builds and developer productivity. vi is known by all 600+ people that touch code or admin systems as a baseline. I think we mention the basics in our dev school. If you need to edit somewhere outside your personal host, your choices are basically ed/vi. IntelliJ dominates Java development at well over 90%. CLion is what we teach for C++, but it's roughly 50% CLion, 30% vim, 10% Emacs,…

On Windows, use Bitvise. SSH into your Linux box. Use the file browser GUI to navigate to your file. Edit it in Sublime, or your favorite editor. 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.

> 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?

Re: Why I teach vim

#88
post #68
post #65

The ability to efficiently navigate and edit files while SSH’d into an instance is a very useful skill. You just wouldn’t have the permissions to install your favourite editor and vi is almost everywhere. I had to learn vi when working on green screen terminals logged into HP/UX and there was no alternative but am very glad I did as I find that nothing as ubiquitous allows me to efficiently change files. Does that me…

I've been a professional developer for 10 years and programming for longer than that. In all of that time, efficiency of editing files on a remote server has never been something I've needed to optimize or been concerned about. Have I had to do it? Yeah, occasionally. Yet when I do, it's almost always changing a config file in a minor way. Back when I started it was editing the code on a live server so I used textwra…

Depends on what you need to optimise for. Being able to navigate a text file efficiently (i.e. not character-by-character using arrow keys), cut and paste text, save/rename/backup files, and sometimes even to do a diff from within your text editor, are all skills I’ve found very useful. I’m an Emacs user on my own desktop, but if you run Linux servers in this kind of environment and you or your team doesn’t manage them yourselves, then the best you can assume you have is Vim, or maybe Vi. If all you’ve got is SSH, it helps to be able to do this stuff without wanting to pull your hair out. Even watching some co-workers stumble through the use of Vim can be painful enough.

Re: Why I teach vim

#89
post #56
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…

I don't think your take is wrong. I have yet to see any actual argument from the vim/emacs crowd. I'm genuinely curious about what makes them defend their editor choice that heavily but whenever I ask them for their reasons all I get is a "modal editing is great because modal editing is great". I can somewhat understand "don't have to touch the mouse" as that's a personal preference for them (even though IDEs have ke…

Here's my story: I used Notepad++ for a while, Sublime Text 2 for a couple of years, Atom for a bit, then Webstorm and VS Code before settling into primarily using VIM or VIM mode for every editor I work with.

The real instigating factor was severe RSI. Three and a half years ago, it hurt even to brush my teeth. The damage was primarily from using trackpads, mice and worst of all mobile phones, but it was much to late to just use a keyboard.

I had to take a complete break and then limit myself to a couple hours a day and only on a fully ergonomic mechanical keyboard. The difference in using VIM and staying mostly on the home rows vs constantly hitting chords with modifier keys to do everything on other editors was massive. I could work almost twice as long before feeling pain!

At the time I could get around VIM but hadn't ever customized my .vimrc or really made a concerted effort to study it. I just knew the standard navigation with hjkl, insert, append, copy, yank, delete, lines, words and find. And yet it was still reasonably productive.

Once I learned about change/delete/yank in word/tag/line/etc, it was already better than using VS Code in normal mode. Making shortcuts in my .vimrc made it even better. In a sense it's like snippets at a meta level that apply to your work flow.

Nobody pushed me to use VIM and I like it quite a bit, despite having had a lot more experience with non-modal editors. I'll use VS Code, etc, but I when I do, I use VIM mode in them unless I'm recording a screencast where I don't think that would be a good idea. So far, the only major editor I've encountered that fails to support VIM mode is Xcode.

Re: Why I teach vim

#90
post #56
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…

I don't think your take is wrong. I have yet to see any actual argument from the vim/emacs crowd. I'm genuinely curious about what makes them defend their editor choice that heavily but whenever I ask them for their reasons all I get is a "modal editing is great because modal editing is great". I can somewhat understand "don't have to touch the mouse" as that's a personal preference for them (even though IDEs have ke…

I was a short-term vim user, around 8 years. There are some benefits to it, however these benefits are starting to get less and less with other IDEs/Editors adopting some of the functionality. I now use VS Code with vim keys.

So as from my point of view of would highlight the following reasons:

- Keyboard, for even a bad typer like myself the vim keys and chords are very efficient.

- The not using a mouse is good also, your hands do not move far. - Fast

- Widely available

- Cross platform

- I can use it in a SSH session.

- When you use it for a while you do build an attachment to it. It might sound strange but I feel good using vim.

I think my vim experience has one major benefit also. I have been able to jump from one ide/editor to another and if there is support for vim keys then I can navigate and do basic to mid level editing quite efficiently.

I like VS Code now, it is consistent, plugins work consistently (one problem with Vim). I would still recommend people to learn vim.

Post reply on HN