ryan sheppard
software engineer
Use the :help
or :h
command whenever you are looking something up! I, like many, use a search engine whenever I need to look something up. This was no different when I started using vim. I have found though, it’s so much easier to find what I need with regards to vim or a plugin if I use the built in tool. There’s also the benefit of getting more experience with vim this way.
When you use the :h
command you get autocomplete with it. For example, if I want to know more about a vim-go command I would start by typing :h vim-<tab>
and in my case vim-go was the second choice in the list. That makes it much quicker to get to the docs compared to using a search engine.
Once you are in the docs, navigating around is so easy. I find myself using ctrl-d
and ctrl-u
much more often than j
and k
for navigating the page. When you are the docs, you will often find links to jump around. To jump to the section, put your cursor over the link and use ctrl-]
. If you want to go back to the previous buffer location, ctrl-t
will get you right back.
Use vimtutor
! It’s a great resource to learn vim. I only came across vimtutor when searching through the help page. If you have vim installed correctly, from the terminal run the vimtutor
command and it should take you right there.
Don’t forget about plugins. I currently use Vundle as my plugin manager, only because it was the first one I came across and it works.
A list of plugins that I am currently using:
- vim-go must have if writing Go
- vim-airline nice status line at the bottom to give an IDE experience
- YouCompleteMe code completion in vim, vscode spoiled me with this
- vim-markdown used when writing blog posts
- Dracula vim Dracula theme for vim
I am trying to keep my use of plugin to a minimum for now while I get used to “vanilla” vim.
Random helpers
- You can source your
.vimrc
in vim with:source ~/.vimrc
which can be useful when installing new plugins <ctrl> - ^
to jump to the previous buffer, I learned about use of buffers, tabs and windows from Vim Tab Madness. Buffers vs. Tabs- Map
:w
and:q
to<leader>w
and<leader>q
respectively - Use the spell checker with
:setlocal spell