Live data from Hacker News

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

vimified.com

91–100 of 265 posts

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

#91

Earlier quoted context omitted.

I think they were speaking from a total beginner's perspective, and how to get them up to speed as fast as possible. I felt the same way when first learning vim, since it was completely different from the code editors I'd used in the past, it was strange not being able to use the mouse in the way I was used to.

I get that, but that strangeness is what pushes you to learn. I find that if I can do something suboptimal, but familiar, it takes way longer for me to change my habits because my subconscious keeps thinking in terms of the familiar. I find it much more useful to remove the ability to even do the wrong thing, than to simply try and will myself to do the right one.

I agree. When I started at my first internship, one of the developers (and now a close friend) put layers of tape over the arrow keys so I couldn't use them. Took a week of pain and then I never went back.

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

#92
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…

> Do vim users know if there was anything like Select next occurrence in vim?

As noted in a sibling, you can press * (shift+8) in normal mode with your cursor over a word to find the next instance of the word. This also updates the search pattern so you can use n and shift+n to navigate forward and back between matches.

If you combine this with other bits of the vim "grammar" (which I do think encourages a kind of feature discovery, although I agree there's a large learning "hump" to get over to take advantage of it), you can use something like cgn to change the currently-focused search match, n to navigate to the next search match, and . to replay the command.

So while it's not exactly the same as multi-cursor, you can achieve something very similar (and just as fast) with the following sequence:

  1. In normal mode, place the cursor over the symbol you wish to edit
  2. Press key: \* (read: "find the next occurrence of the current symbol and update the search pattern to be that string")
  3. Press keys: cgn (read: "change the search match under the cursor")
  4. Type the new symbol
  5. Press ESC to return to normal mode
  6. Press keys: n. (read "find the next occurrence of the search pattern [set in step 2] and repeat the last command [the edit from steps 3-5]")
  7. Repeat 6 until all symbols are replaced
Or, in raw keystrokes, I might replace all six "foo"s in a document with "bar" by typing the following sequence of characters (having placed the cursor over a "foo"): *cgnbarn.n.n.n.n.

It may seem complex compared to something like multi-cursor editing, but the nice thing here is that there are concepts here that are extensible beyond the scope of that specific edit, and can yield similar "speedy" workflows but on a much wider set of tasks.

- c[something] is a pattern that means "change [the given region]", so you could construct similar commands with different regions (`ciw` to change inside the current word, `ca{` to change the current curly-bracketed region (inclusive), and so on)

- [something]gn is a pattern that means "[do something] to the next search match", so you could delete it with `dgn`.

- . can replay many types of commands, so if I have a more complex sequence of edits to apply starting at a search match, I could do that too (not just simply replacing the symbol).

It's a very powerful paradigm.

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

#93

> Let me know what you guys think about it :) Same as the last time you posted it: learning Vim has nothing to do with muscle memory and doing it outside of Vim is pointless. Plus, the "master Vim" claim is dubious given how basic the lessons seem to be. :help user-manual is easy, built-in, and it goes way beyond this. And it's free.

It's a Show HN. OP's just sharing something they've been working on that they find interesting. No need to dump on it over and over.

>Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something.

https://news.ycombinator.com/newsguidelines.html

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

#94
post #75

Earlier quoted context omitted.

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

Oh yeah I did use "dd" and "p". They work OK, although they don't allow selecting multiple lines that don't follow each other.

What’s the use case for this disjoint selection?

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

#95
I once tried to migrate from VS Code to Neovim. I use TypeScript at work, and use many languages for my side projects.

But the worst part was making Vim provide with things that you'd expect programming editors to have. So many options, what's best is up to opinion, integrating language servers, getting intellisense to work as you would expect, searching the project folder for file names.

Then I realized that all I'm trying to do is make Neovim behave like VS Code with the extra addition of keyboard navigation, which I can get behind. But at my current career level I'd rather spent those 5-10 hours configuring an editor in learning more about .

I mean, just another Vim introduction when you already have the free options (vimtutor etc.) and FEM's "Vim Fundamentals" won't fix my pains with getting it to work as I'm expecting it to work.

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

#96
post #93

> Let me know what you guys think about it :) Same as the last time you posted it: learning Vim has nothing to do with muscle memory and doing it outside of Vim is pointless. Plus, the "master Vim" claim is dubious given how basic the lessons seem to be. :help user-manual is easy, built-in, and it goes way beyond this. And it's free.

It's a Show HN. OP's just sharing something they've been working on that they find interesting. No need to dump on it over and over. > Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something. https://news.ycombinator.com/newsguidelines.html

I kind of get where they're coming from, but I hope all my messages in this thread have made it clear: If you want to learn vim, please try all the available free resources before considering vimified, or any other paid option.

I used vimtutor and openvim and they were great starters!

It was only when I tried to find something to fix my specific problem that I stated in the top comment, did I build this.

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

#97
post #93

> Let me know what you guys think about it :) Same as the last time you posted it: learning Vim has nothing to do with muscle memory and doing it outside of Vim is pointless. Plus, the "master Vim" claim is dubious given how basic the lessons seem to be. :help user-manual is easy, built-in, and it goes way beyond this. And it's free.

It's a Show HN. OP's just sharing something they've been working on that they find interesting. No need to dump on it over and over. > Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something. https://news.ycombinator.com/newsguidelines.html

> A good critical comment teaches us something.

> learning Vim has nothing to do with muscle memory and doing it outside of Vim is pointles

He fairly expressed his opinion of the OP's project. I don't agree with this opinion, but let's not be such snowflakes. The commentator did not insult the creator.

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

#98

I once tried to migrate from VS Code to Neovim. I use TypeScript at work, and use many languages for my side projects. But the worst part was making Vim provide with things that you'd expect programming editors to have. So many options, what's best is up to opinion, integrating language servers, getting intellisense to work as you would expect, searching the project folder for file names. Then I realized that all I'm…

This is a good starting point if you ever feel like trying again with Neovim.

https://github.com/nvim-lua/kickstart.nvim/blob/master/init....

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

#99

I once tried to migrate from VS Code to Neovim. I use TypeScript at work, and use many languages for my side projects. But the worst part was making Vim provide with things that you'd expect programming editors to have. So many options, what's best is up to opinion, integrating language servers, getting intellisense to work as you would expect, searching the project folder for file names. Then I realized that all I'm…

If you’re trying to achieve VS Code with the keyboard navigation of vim, have you given the VSCode vim plugin a try? I’ve had positive experiences mixing editors/IDEs with a vim plugin to get the best of both for my workflow.

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

#100

Earlier quoted context omitted.

I think they were speaking from a total beginner's perspective, and how to get them up to speed as fast as possible. I felt the same way when first learning vim, since it was completely different from the code editors I'd used in the past, it was strange not being able to use the mouse in the way I was used to.

I get that, but that strangeness is what pushes you to learn. I find that if I can do something suboptimal, but familiar, it takes way longer for me to change my habits because my subconscious keeps thinking in terms of the familiar. I find it much more useful to remove the ability to even do the wrong thing, than to simply try and will myself to do the right one.

I get that, but that strangeness is what pushes you to learn.

Yes, exactly. This is analogous to travelling to another country and hoping to learn the local language by immersion. If you then meet people that speak your language you run the risk of only hanging out with your little expat group and never immersing yourself in the local culture. You can end up spending years there and never learning the language.

Post reply on HN