Vim

From PHASTA Wiki
Revision as of 16:23, 4 February 2021 by Jrwrigh (talk | contribs) (..but I want more: : point git repository link to .config/nvim directory)
Jump to: navigation, search

vim (short for "vi improved") is a command line text editor that is ubiquitous on Linux and Unix-esque operating systems. Effectively, if it runs Linux and doesn't have vim, you probably won't have any other familiar tools either.

Due to it's ubiquity, vim is quite often the editor of choice when working on remote systems through a terminal.

Learning Vim

vim is a "modal" editor, which makes it different than any editor you've probably ever used; it's not a "pick-up and go" application. Learning to effectively use vim takes time. However, by taking the time, vim can be very powerful and useful. Who knows, maybe you might start to want to use it as your default editor (like me!(James)).

To start, I'd suggest watching this video called Learn Vim in a Week. It'll give you a general overview of modal editing, common conventions that vim uses, and how to start learning.

After that, start working through vimtutor. It is a tutorial for the basics of vim inside vim. This makes it an interactive tutorial, which is quite good for learning. To access it, simply run vimtutor from a Linux command line, and follow the instructions on screen. It's recommended to do this once a day for a week or so to get everything hammered down.

While going vimtutor a few times, maybe check out another video called Mastering the Vim Language. It'll further get you familiar with how vim operates and it's general conventions. This video in particular is what turned me (James) into a vim zealot of sorts.

vimrc

Out of the box, vim is very minimal. To set some sensible defaults, I'd recommend copying the vimrc in sensible.vim to your home directory. It'll get you to a more functional vim that's easier to work in.

..but I want more

So you want some more vim-goodness? Check out the myriad of plugins available for vim. Maybe use a plugin manager and even start managing your settings in a git repository to keep changes persistent across different computers.