Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Interactive Vim Tutorial (openvim.com)
177 points by memorable on Oct 23, 2022 | hide | past | favorite | 23 comments


This looks nice but I am looking for advanced tutorial. For instance, I just randomly found that pressing N% in normal mode will take you to the Nth percentage line of a file. That you can run a macro on multiple files with :argdo normal@mw command. Where can I find such advanced stuff?


I learned a lot from playing at https://vimgolf.com and looking at other people's solutions.


In the reference documentation

    :h index
https://vimhelp.org/index.txt.html#index.txt


In the vim built-in manual


Yes the vim documentation is damn good. Many plugin authors continue the tradition well too!

The help text is hyperlinked - If you are over a link (displayed in some non-white color by default, there's a couple types: blue and yellow are common) and press CTRL-] it will jump to the docs for that item. CTRL-T will return to the previous location (where you jumped from). This help text uses the ctags support underneath, so many other things hook into it too - useful set of keys to know overall :D.


Drew Neil’s website [1] is great and so are his books, particularly Practical Vim.

[1]: http://vimcasts.org/


Vimways [1] is technically excellent and very well-written.

[1]: https://vimways.org


Also nice is :N that takes you the Nth line. Somehow it is more natural for me than the NG as I am so used to opening the command prompt and then start thinking about what I am bout to do. Also remember search is generally the quickest way to move to another line, and at the right spot!


The best thing you can do is reading this: https://vimhelp.org/usr_toc.txt.html :)


The vim-adventures game introduces a surprising number of advanced concepts I would say. I'm currently on level 12 which is about text objects, for instance.


Check out 'Practical Vim' by Drew Neil, it's great.


Nice job!

Small nitpick: It would be nice if you could add an option to increase text speed. As a fast reader, it is slightly annoying for me to have to wait until the tutorial text is fully shown.

I bookmark this site and will be sure to check it out once more advanced tutorials are available. Also probably going to recommend it to people that are new to vim.


I discovered you can hit `Esc` to skip the text animation entirely, which was helpful to read along quicker than it was animating.


Was getting a bit into VIM and Tmux earlier this year but then my linux environment fell apart and I had to switch to Windows as a hypervisor. I really want to learn so that when I start working on headless servers I can have a consistent workflow (nano seems a bit to... novel for me, though I know some people here prefer to use that for all of their text editing needs). I'll have to come back to this when I'm done with making things.


You tried WSL 1 or 2? I'm a Windows gamedev and I do all my coding in Neovim under WSL 1.

If you are curious about which version to pick:

* WSL 1 - OS-level API translation layer, access to mounted Windows filesystem is decent performance. Can't run Docker inside the container.

* WSL 2 - Kernel layer integration, abysmal Windows mounted filesystem performance, essentially "real" Linux, can run Docker natively.


For neovim, I’d consider the native Windows version, it works pretty well for me.

Another argument to pick WSL 2 would be the fact that it gets all the love and support from Microsoft, and all the cool new features (eg. Linux GUI support).


I'm using Fedora on a VM. I'm working with angular and it's CLI works VERY slowly with WSL2 for some reason.


You’re probably using the Angular CLI within the Windows filesystem via WSL2. This tends to be slow, because all your file accesses go through various indirection layers, and that quickly adds up when you’re dealing with thousands of small text files (as you usually are in the JS world).

There are two alternatives:

1) working directly with Windows, where Angular CLI and many other things should work just fine and with nice performance,

2) working on the Linux filesystem inside WSL2 (i.e. outside of /mnt/c/), which is a disk image (.vhdx) using ext4 mounted directly in the VM.


WSL2 is slow working across the Windows-Linux bridge. If your project files are in the Windows part of your system, I'd strongly suggest moving them to the Linux filesystem. If that's not an option for some reason, then you're better off with WSL1.


IMO the best way to learn something is by trying to __change__ how it works. Instead of learning what you MUST press to go backward one word, think "Do I need this? And if I did, what shortcut would I assign to it?" Then go ahead and do just that. Little by little, you find yourself working in a system that was inspired by Vim but is tailored to your needs and wants.

EXAMPLE: I use Karabiner on Mac. My hyper key (CAPSLOCK) can do cool things like:

    HYPER-W → Go back one word
    HYPER-E → Delete one word (backwards)
    HYPER-Q → Go to the beginning of line
    HYPER-A → Go to the end of line
    HYPER-S → Go forward one word
    HYPER-D → Delete one word (forward)
    LSHIFT-W → Select one word (backward)
    ...
There _is_ a Vim extension for Karabiner, but this way I remember my own settings better.


Looks great! Amazing resource for newcomers (mug is still mandatory, though). On mobile, the virtual keyboard would be super useful (doesn’t seem to work on iphone).



Very nice interface. Here to just say good jobyyy!!!

Also, thanks to the people that have added references to more advanced resources.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: