Show HN: I built an interactive course that helps you learn Vim faster
344 points| Silica6149 | 3 years ago |vimified.com
This course came about as a result of wanting a more targeted way of practicing using new vim commands I wanted to pick up, rather than just trying to use them in my regular code editing sessions. When I would try to use new commands during code editing, my productivity took a hit because I was trying to do two different things at once: thinking about code vs practicing my muscle memory.
So, I made a separate environment for practicing, one that had an interactive editor, progress tracking, and achievement goals to let me see which areas I should work on, like speed and efficiency (# of keystrokes). When I realized it would be useful for beginners too, I added lessons to go along with it and this course is the result!
Let me know what you guys think about it :)
[+] [-] xavdid|3 years ago|reply
I feel like vim tutorials mostly focus on navigating and editing a single file, which is great! But I mostly struggle with how to replicate opening a whole directory in VSCode, which makes it easy to browse the directory, switch between files, open multiple panels, etc.
I'm almost certain vim does all these things out of the box, but tutorials always end at "this is how you edit some text quickly" and never cover "this is how you do software engineering".
[+] [-] vidyesh|3 years ago|reply
So I have the same issue as you, I really like using neovim for smaller projects as its easy to work on them through the shell. But when it comes to big projects I go back to VSCode with the Vim emulator extension as it just makes using the tree much easier for me in VSCode. I have setup custom keybindings and settings to launch the directory when needed or the command palette works great to launch other files. I wish there was a resource to help switch VSCode to neovim while retaining some of the "most" used VSCode features.
[+] [-] bootstrappit|3 years ago|reply
[+] [-] RMPR|3 years ago|reply
[+] [-] seanp2k2|3 years ago|reply
The fact that less is installed on many more systems than nano is a testament to the bad assumptions too many devs make about who will be using these systems in the future. And yes, it’s not hard to "apt -y install nano" except at work where we have proxies and internal repos, so now I need to use vim to reconfigure apt sources just so I can use a more normal editor that doesn’t require arcane incantations to perform basic config file editing.
[+] [-] dash2|3 years ago|reply
The frustration is that probably there are fixes for all these things, which if I were an expert I would know. But meanwhile I can use an ordinary visual text editor and I don't have to learn anything new.
[+] [-] yetanotherjosh|3 years ago|reply
The modal nature of Vim is one of it's key features and makes a lot of sense. If you consider the keyboard the primary, if not singular, means of interaction, then there will be times you want to use the keyboard to type text and times you want to use the keyboard to control the editor behavior. In a "normal" editor, you have to use modifier keys to enter commands. In Vim, you do it by changing modes. It's actually quite powerful but you can't get past your own assumptions about efficiency.
[+] [-] dimensional_dan|3 years ago|reply
> Also, why do I have to have a special mode to insert things?
First and foremost Vim is a modal text editor. If you don't like that Vim is probably not for you. Your comment is kind of like saying I'm really trying to like chocolate, but I don't like the flavour.
There's a Vim way of doing things, if you really take the time to learn it then the questions you are asking will all be resolved.
[+] [-] gofreddygo|3 years ago|reply
[+] [-] wruza|3 years ago|reply
I do, I hate accidental wrapping on left/right so much and see absolutely no use to it.
But you may configure it, :help 'whichwrap'
Also, why do I have to have a special mode to insert things?
Because if your alphabet keys do always insert, you have to hold some control key to enter commands and movements, and not if not. That’s the point of being modal. Otherwise there are plenty of emacs-alikes to train pinkies on, and no need for yet another notepad+.
[+] [-] konart|3 years ago|reply
No, because those are features, not bugs. If don't want them - you don't have to even think about them.
>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?
It's not that you can't. The idea behind vim-like navigation is that you don't press those arrows (or hjkl for that matter) in a consecutive manner (or hold) unless you really have to. 99% of the time you jump to some place in the text (a character, or line, a word, a nth line etc).
[+] [-] mpalmer|3 years ago|reply
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` :)
[+] [-] snet0|3 years ago|reply
I know this is probably something that sounds like someone too far down the rabbit-hole to see where they came from, but I'm not sure why you'd want to do that. The horizontal movement is probably adjacent to the vertical movement on your keyboard. Just use the appropriate movement to get where you want to go?
> Also, why do I have to have a special mode to insert things?
Because then you can use the regular keyboard, i.e. keys that would normally insert characters, as control inputs.
> But meanwhile I can use an ordinary visual text editor and I don't have to learn anything new.
You don't have to learn anything new because you don't want to do anything new.
[+] [-] VoodooJuJu|3 years ago|reply
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.
[+] [-] naillo|3 years ago|reply
[+] [-] agumonkey|3 years ago|reply
You don't really move a caret around in vim, you process units of text and lines.
[+] [-] juniperplant|3 years ago|reply
set whichwrap+=<,>,h,l,[,]
Source: https://vim.fandom.com/wiki/Automatically_wrap_left_and_righ...
[+] [-] bitlax|3 years ago|reply
[+] [-] Silica6149|3 years ago|reply
[+] [-] yjftsjthsd-h|3 years ago|reply
Then do that?
[+] [-] robertlutece|3 years ago|reply
:h whichwrap
[+] [-] nomoreusernames|3 years ago|reply
[+] [-] CoffeePython|3 years ago|reply
Wish I had the time to improve on the course I launched but I ended up starting a company shortly after launching my course and getting into YC.
[1] https://www.vim.so
[+] [-] psyklic|3 years ago|reply
[+] [-] drodil|3 years ago|reply
[+] [-] phkahler|3 years ago|reply
[+] [-] MatthiasPortzel|3 years ago|reply
(This is basically a copy-paste of previous comments I’ve made, I haven’t tried your tutorial beyond the first lesson.)
[+] [-] delusional|3 years ago|reply
[+] [-] BirAdam|3 years ago|reply
[+] [-] vscode-plz-stop|3 years ago|reply
[+] [-] yetanotherjosh|3 years ago|reply
A key ethos of Vim is that once you climb the initial learning curve, you're on a path of increased efficiency for the long haul. Moving the hand to the mouse, dragging the cursor to the spot you want, then moving the hand back to the keyboard, is objectively slower than key-based movement commands for someone who has climbed the learning curve and I'm confident that could be proven empirically though I'm not aware of any such proof. There may be certain exceptional cases where the mouse is faster, but for most editor usage it would not be. I'm not sure if you agree w/ that and are just criticizing how tutorials introduce people to Vim, that they should start w/ the mouse to lower the learning curve, which might be an okay argument.
[+] [-] em500|3 years ago|reply
[+] [-] Silica6149|3 years ago|reply
I tried to explain the benefits of vim in the "Why Vim?" section, but I should really go into why using and learning vim will be slower at first than using the editor you're already comfortable with, and how it might be worth it in the end.
Thanks for the feedback!
[+] [-] manx|3 years ago|reply
[+] [-] renewiltord|3 years ago|reply
I bet I could untrain with sufficient work but it's no longer worth it.
[+] [-] kjeetgill|3 years ago|reply
Also, I think scaring people away from arrow keys is premature. It's not that big a deal.
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] Arisaka1|3 years ago|reply
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 <insert whatever language/framework I'm learning>.
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.
[+] [-] chadcmulligan|3 years ago|reply
[+] [-] cassepipe|3 years ago|reply
[+] [-] sneak|3 years ago|reply
[+] [-] stayux|3 years ago|reply
One day I asked myself: Is there a way to scroll in the browser without using a mouse or arrow keys?. Enter Vimium.:)
I have tried in the past Emacs, but I have an operating system, and I don't need a new one (for now). So now you can take MacVim only from my cold hands. P.S. > You can paste the buffer in insert mode with ctrl+r+0.
[+] [-] stevebmark|3 years ago|reply
[+] [-] QuiiBz|3 years ago|reply
[+] [-] immigrantheart|3 years ago|reply
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.
[+] [-] giansegato|3 years ago|reply
[+] [-] mastermedo|3 years ago|reply
[+] [-] vogt|3 years ago|reply
[+] [-] johncoltrane|3 years ago|reply
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.
[+] [-] timwaagh|3 years ago|reply