Live data from Hacker News

Show HN: I built an interactive course that helps you learn Vim faster

vimified.com

41–50 of 265 posts

Re: Show HN: I built an interactive course that helps you learn Vim faster

#41

I'm a vim user. Over the time I dwindle down my plugins and stick to the basic ones because I often do SSH and don't want my environment to change rapidly. One thing that I still need though, is proper syntax highlighting. I wish there is an easy way for vim to do it rather than just too many plugins here and there.

Do what makes you happy, but just in case you weren't aware, vim supports editing over SSH natively, so there's not really a need to skimp just because you need to edit files remotely, you can use your local machine's setup to edit remote files. The SCP incantation is `vim scp://user@myserver[:port]//path/to/file.txt`, or see `:h netrw` or various tutorials you'll be able to find.

Re: Show HN: I built an interactive course that helps you learn Vim faster

#42
post #15

I really want to like vim and I love some things about it, like the ability to move chunks about with only the keyboard. But so many things about it kill me. Like, why can't I hit right at the end of a line, and move to the next line? Who thinks that is a good idea? Also, why do I have to have a special mode to insert things? Having to change modes just seems so complex and unintuitive. And why does the help system n…

>Like, why can't I hit right at the end of a line, and move to the next line

What do you mean by this? Do you mean the right arrow key?

The mode paradigm was definitely weird to me too at first, but it eventually makes sense, especially when you start using macros.

I agree about the help system - it hasn't been very helpful to me either. I usually am better off consulting stackoverflow or vim's wiki for how to do something.

Vim took me quite a bit of time to learn beyond the basics, but once I learned it, it became a productivity boon. It's nice to have the same powerful text editor available wherever I ssh to, right in the terminal, in the same place I'm using all my shell commands.

Re: Show HN: I built an interactive course that helps you learn Vim faster

#43
I tried out vim for a month or so. I did enjoy using it, although I'm not sure if using vim just feels more productive because you press more keys to do the same thing. However multi-cursor editing and cutting whole lines in modern editors is way more conducive to my workflow and eventually stopped using vim.

Do vim users know if there was anything like Select next occurrence in vim? Feature discovery is not one of vims strong suites

EDIT: More specifically by multi-cursor editing I mean selecting multiple occurrences of a word, and then editing in place. For example selecting all occurrences of the word user -> (getUser, setUserId, variable declarations with user) and then replacing them with account. This can be done with vim but is nowhere near as fast, since every change needs to be done one-by-one. Or selecting all the above occurrences, and pasting them somewhere for an interface declaration.

Re: Show HN: I built an interactive course that helps you learn Vim faster

#44
post #30

This is the wrong way to go, if the UI is so bad it requires a course, then the problem is clearly the tool.

I think this is the wrong way to think about computing, though I sympathize, because I also used to think this way until I reflected on a podcast I'd heard about how when the computer mouse was invented, it's little known that a second very sci-fy-y device was also intended to be used as a peripheral, one which you put on your other hand like a glove and moved in all sorts of ways in order to direct your computer. Ultimately this device didn't catch on, but it's not necessarily the case that just because something isn't trivial to start using that it's bad -- on the contrary, both kinds of tools are useful.

Tools which are eminently transparent in how you use them are great to get started, and to continue with if you don't want to spend any more time.

But so are tools which you need to actively invest effort into using. These can unlock ways of using something which are more powerful and rely on the time you put in to learn them -- true for a computer, but there are plenty of other devices in the world where this is the case too.

Re: Show HN: I built an interactive course that helps you learn Vim faster

#45
post #43

I tried out vim for a month or so. I did enjoy using it, although I'm not sure if using vim just feels more productive because you press more keys to do the same thing. However multi-cursor editing and cutting whole lines in modern editors is way more conducive to my workflow and eventually stopped using vim. Do vim users know if there was anything like Select next occurrence in vim? Feature discovery is not one of v…

[deleted]

Re: Show HN: I built an interactive course that helps you learn Vim faster

#46
post #15

I really want to like vim and I love some things about it, like the ability to move chunks about with only the keyboard. But so many things about it kill me. Like, why can't I hit right at the end of a line, and move to the next line? Who thinks that is a good idea? Also, why do I have to have a special mode to insert things? Having to change modes just seems so complex and unintuitive. And why does the help system n…

> an ordinary visual text editor

Funnily enough, Vim is short for "Vi IMproved", and its predecessor vi is short for "visual"!

---

Taking the time to learn Vim yields significant rewards if you're willing to meet it on its own terms. I certainly grant you that it's not for everyone. It's the agony and the ecstasy of deep tools. No pain, no gain.

> The frustration is that probably there are fixes for all these things, which if I were an expert I would know.

I would submit that if you were an expert, you would not have the same list of gripes. To wit:

> Like, why can't I hit right at the end of a line, and move to the next line?

This is a fair complaint, but one that's actually never occurred to me as a Vim user, because:

> Why do I have to have a special mode to insert things?

It's a core part of Vim's design! In fact, insert mode is The other mode (Normal mode) is where the real power is. It's not so much about moving chunks of text around with the keyboard as about moving the cursor.

Vim divides normal mode key commands into motions and operators. operators add/remove/change text, and motions move the cursor.

For instance:

- `d` is an operator deletes text.

- `w` is a motion that moves the cursor to the start of the next word

- `12w` does this 12 times (practically every motion can be repeated like this)

But the rubber really meets the road when you combine them.

If you hit `d` once in normal mode, nothing happens: you've started a command but Vim is waiting for you to finish it by entering a motion. `dw` deletes from the cursor up to the start of the next word (you can guess what `d12w` does).

> And why does the help system never tell me what I want?

Perhaps start with `:help help` :)

Re: Show HN: I built an interactive course that helps you learn Vim faster

#48
post #43

I tried out vim for a month or so. I did enjoy using it, although I'm not sure if using vim just feels more productive because you press more keys to do the same thing. However multi-cursor editing and cutting whole lines in modern editors is way more conducive to my workflow and eventually stopped using vim. Do vim users know if there was anything like Select next occurrence in vim? Feature discovery is not one of v…

If I'm interpreting "cutting whole lines" correctly, in vim that's "dd" in normal mode. Then you can paste (put) with "p".

I agree discoverability is not great; to be honest I can't remember how I discovered the plethora of commands I use, though I do have a habit of reading the help a decent amount. That's how I discovered "g?" (Rot13) :D

Re: Show HN: I built an interactive course that helps you learn Vim faster

#49
post #43

I tried out vim for a month or so. I did enjoy using it, although I'm not sure if using vim just feels more productive because you press more keys to do the same thing. However multi-cursor editing and cutting whole lines in modern editors is way more conducive to my workflow and eventually stopped using vim. Do vim users know if there was anything like Select next occurrence in vim? Feature discovery is not one of v…

Yep. I use the VIM extension for Vs Code. I do a CMD-SHIFT-P -> Disable Vim whenever I need this functionality. Not sure if there's a better way to do it.
Post reply on HN