/vimrc

A nice and simple vimrc file with great plugins. Tuned for Javascript/Meteor development.

Primary LanguageVim Script

Calvin's vimrc

I completely rewrote my vimrc by hand because my last one was borrowed and used tons of features that I didn't use. This one is nice and clean and biased towards JavaScript/Meteor development.

Installation

  1. First make sure that you've backed up or removed your own vim files (.vimrc, .vim/).
  2. Clone the repo to your home directory: git clone https://github.com/cjsauer/vimrc.git ~/.vim
  3. Prepare Vundle: git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  4. cd .vim/
  5. ./install.sh. This creates a symbolic link called .vimrc in your home directory, so you are free to edit the .vimrc in this repo and your changes will be observed. It also installs all the plugins using Vundle (this could take a bit of time).
  6. Follow these instructions to get the fonts installed and working correctly for vim-airline. This is optional. If you don't want to use airline, remove it from the .vimrc file.
  7. Install some linters npm install -g eslint, npm install -g babel-eslint, npm install -g eslint-plugin-react
  8. Call npm install in the bundle/tern_for_vim directory to install Tern.
  9. Install YouCompleteMe. Follow these instructions, and be sure to use the ./install.py --tern-completer flag when you install!

For Meteor developing, Tern is much more useful with Slava's tern-meteor package. Follow these instructions to get it setup in vim and in your Meteor project.

Valuable shortcuts

  • ,sv sources the .vimrc file
  • <F3> toggles search highlighting
  • <F5> toggles paste mode
  • :W save file with sudo
  • ,w quickly save a file
  • <c-[jklh]> fast window switching
  • ,nt open the NERDTree tab
  • gcc toggle comment on the current line

Included plugins