Live data from Hacker News

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

vimified.com

71–80 of 265 posts

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

#72

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.

Two suggestions:

1. Prefer sftp over scp whenever it's available. The scp protocol is pretty obsoleted. Just substitute `scp` with `sftp` in the command.

2. Turn on ssh multiplexing to drastically shorten the wait time when opening a file.

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

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

I use / to search by a string (or press * while my cursor is on a word to search for that word), then press n or p to go to the next or previous. cgn changes the matched text, and you use . to repeat the change, so to change a word over all occurrences I just cgn once and repeatedly press “.” .

Yeah this is the way I tried it. I did not find as fast.

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

#75
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

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.

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

#76
post #60
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…

This article might go a bit over your head if you just started using vim, but I found it to be very helpful for typical multiline/multifile editing tasks in vim: https://bluz71.github.io/2019/03/11/find-replace-helpers-for...

I am aware that I could extend vim with all the missing features, but that seems error-prone and not worth the time investment, since other editors have them out-of-the-box.

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

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

Vim has visual block mode for multi cursor which you can enter with ctrl-v

Yeah that works for selecting contiguous blocks of text. Multi-cursor editing allows for selecting rows that are further apart.

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

#78
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.

Just use the number of lines you want to cut like 3dd This is consistent for all commands.

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

#79
post #74

Earlier quoted context omitted.

I use / to search by a string (or press * while my cursor is on a word to search for that word), then press n or p to go to the next or previous. cgn changes the matched text, and you use . to repeat the change, so to change a word over all occurrences I just cgn once and repeatedly press “.” .

Yeah this is the way I tried it. I did not find as fast.

I just select a block of code (visual mode) and use sed syntax, much faster than worrying about multiple cursors, etc and it works fine for me.

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

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

> selecting multiple occurrences of a word, and then editing in place

I'm sure there is a way to do this More Properly, but the kind of thing I'd do is:

:%s/user/account/g

:%s/User/Account/g

If you wanted to check each one interactively, end with gc instead of g.

Vim is the reason I'm real confident with regexes, even nonsense with grouping and quantifiers etc. etc., and while I can see people not wanting to have to acquire that power, I must say it's also very handy outside of text editing.

> selecting all the above occurrences, and pasting them somewhere for an interface declaration.

I don't really understand the behavior desired here, but I'll bet there's something similar.

Post reply on HN