• [object Object]@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    23 hours ago

    Vim has a built-in tutorial on the motion commands and such. I don’t remember how it’s invoked, but probably something like :help tutorial. You’ll get an overview of the commands and see which ones might be useful to you right away. As I mentioned, I recommend getting the hang of them one or a few at a time, so they are incorporated in your toolbox.

    Speaking of help, it’s generally useful in Vim to use :help {something} when you want to recall how something works. It has consistent naming for the help pages for various functionality, e.g. :help :s shows the page about the :s command, and there are pages for every motion command, etc. — I don’t remember the prefixes as it’s been a while since I used Vim proper, but just :help should give you an index.

    Also, if you’re coding in Vim, there are ways to integrate documentation for your language, so that K would show help for the function or whatever under the cursor. Back in the day I’ve had PHP docs plugged into Vim, but it’s been a while, so idk how it’s done now. Iirc there are dumps of docs from the Dash app, which might be available as vimdocs.