This repository is the result of a tech talk that I gave at Carnegie Mellon University on February 25, 2015. Its central motivation is this: students who have been instructed or told to use Vim to complete programming assignments while ssh'ed are missing out on the vast power that lies within Vim.
There are two fronts to having an amazing Vim experience:
- knowing how to manipulate text using Vim's built in keyboard shortcuts
- having plugins that make Vim behave like users would expect from a modern text editor.
In my experience as a TA and fellow student, learning the former requires the latter and vice versa, leading to a vicious cycle of Vim peril. With this in mind, this repository aims to cure the latter, so that the vicious cycle can end.
This repository contains a sample vimrc that walks you through the changes at each step so that you can gain an understanding of what's going on (rather than just copying someone's vimrc!).
Each commit in this repository corresponds to a step from the actual workshop. Use the list of all commits to browse the steps. You'll see a (sometimes lengthy) explanation of what happened, and then the diff(erence) of exactly what changed from step-to-step.
This is what you should do:
- start at the first commit
- read the commit message and GitHub comments
- copy the changes
- repeat
It's that simple. Depending on how fast you read and how in-depth you want to go, you could easily have a fully-configured* Vim setup in about an hour.
Once you've done this, the hard part is learning to use what you just installed! I went back through and added some usage information and links to references on the GitHub comments, so be sure to check them out.
- Create vimrc file
- Add some general settings
- Enable the mouse
- Set up Vundle boilerplate
- Make Vim look good
- Plugins NERDTree and NERDTree Tabs
- Plugin Syntastic
- Plugins vim-easytags and tagbar
- Plugin ctrlp
- Plugin A.vim
- Plugins vim-gitgutter and vim-fugitive
- Plugin delimitMate
- Plugin vim-superman
- Plugin vim-tmux-navigator
- Syntax plugins
- Add all the extra plugins that I use
If you just want to use this file as your vimrc, no questions asked,
- Move your ~/.vimrc file and ~/.vim folder somewhere else for now.
- Download Vundle
- Change your terminal colorscheme to solarized
- Install a patched font
- Download the file vimrc.vim and rename it to ~/.vimrc
- Run
vim +PluginInstall +qall
- ???
- Profit!
But you should really look through the steps for more information about what went down. Remember: every time you add a new Plugin ...
line, you'll have to run
vim +PluginInstall +qall
- find more plugins!
- learn how to actually use Vim!
vimtutor
- Learning Vim in 2014
- In particular, Vim as Language
- customize my Vimrc!
- write my own Vim plugin!
In order to teach people plugins, I had to sacrifice teaching people how to tap into the power of editing in Vim, which comes from using the keyboard over the mouse. Please, take a little time to learn how to actually use Vim!
* When I say fully-configured, I mean actually usable. It can be argued that Vim is never fully-configured: everyone's preferences are different, and circumstances change. Configuring your text editor is really a continuous process!