Skip to content
This repository

Vim configuration files I use. Python, Django, HTML5, CSS, JS, CoffeeScript and a lot more.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 after
Octocat-spinner-32 autoload
Octocat-spinner-32 bundle
Octocat-spinner-32 colors
Octocat-spinner-32 lib
Octocat-spinner-32 spell
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 README.markdown
Octocat-spinner-32 _gvimrc
Octocat-spinner-32 _vimrc
README.markdown

Gerardo Curiel Vimfiles

I'm @gerard0, and this is my ~/.vim directory.

Installation

$ git clone git://github.com/gerardo/vimfiles.git ~/.vim

Create symlinks:

$ ln -s ~/.vim/_vimrc ~/.vimrc
$ ln -s ~/.vim/_gvimrc ~/.gvimrc

Switch to the ~/.vim directory, and fetch submodules:

$ cd ~/.vim
$ git submodule init
$ git submodule update

And you're good to go!

Updating to the latest version

To update to the latest version of the vimfiles, run the following commands inside your ~/.vim directory:

$ git pull
$ git submodule foreach git pull origin master

Pre-requisites

It requires ack, ctags, git, and curl . The recommended way of installing them is using Homebrew on OSX. On Linux, you can use your distribution's package management system.

Take a look at the Pre-requisites wiki page for more information. If there's any missing, please open an issue.

Intro to VIM

In case you've never used VIM before, here are some links worth reading:

Features

The vimfiles comes with some predefined plugins and base customizations:

  • Line numbers
  • Solarized as default colorscheme
  • Show trailing whitespace as ¬ and tabs as
  • Powerline-enabled status line
  • <leader>w opens a new horizontal split
  • <leader>ww opens a new vertical split
  • Remapped arrow keys to hjkl. Why? Read on
  • <C-W>! invokes kwbd plugin; it closes all open buffers in the open windows but keeps the windows open

SuperTab

In insert mode, start typing something and hit <TAB> to tab-complete based on the current context (based on filetype). It works well with Snipmate, also included.

NERDCommenter

NERDCommenter allows you to wrangle your code comments, regardless of filetype. View :help NERDCommenter for all the details.

NERDTree

NERDTree is a file explorer plugin that provides "project drawer" functionality to your vim projects. You can learn more about it with :help NERDTree. Use Ctrl+E,Ctrl+E to toggle NERDTree

Ack.vim

Ack.vim uses ack to search inside the current directory for a pattern. You can learn more about it with :help Ack.

CtrlP

Fuzzy file, buffer and mru finder.

Syntastic

Syntastic is a syntax checking plugin that runs buffers through external syntax checkers as they are saved and opened. You will need to install the required syntax checkers.

Tagbar

Tagbar is a vim plugin for browsing the tags of source code files. Use F8 to toggle Tagbar.

EasyMotion

EasyMotion provides a much simpler way to use some motions in vim. It takes the <number> out of <number>w or <number>f{char} by highlighting all possible choices and allowing you to press one key to jump directly to the target.

When one of the available motions is triggered, all visible text preceding or following the cursor is faded, and motion targets are highlighted.

NrrwRgn

Narrowing means focussing on a region and making the rest inaccessible. You simply select the region, call :NarrowRegion and the selected part will open in a new scratch buffer. The rest of the file will be protected, so you won't accidentally modify that buffer. In the new buffer, you can do a global replace, search or anything else to modify that part. When you are finished, simply write that buffer (e.g. by |:w|) and your modifications will be put in the original buffer making it accessible again.

ZoomWin

When working with split windows, ZoomWin lets you zoom into a window and out again using Ctrl-W o

Fugitive

Fugitive adds pervasive git support to git directories in vim. For more information, use :help fugitive

Use :Gstatus to view git status and type - on any file to stage or unstage it. Type p on a file to enter git add -p and stage specific hunks in the file.

Use :Gdiff on an open file to see what changes have been made to that file

There are more plugins included. Check its homepages for more information.

Feedback

Suggestions and improvements welcome!

License

This code is free to use under the terms of the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.