Codegram vimfiles
Vim script
Switch branches/tags
Nothing to show
Pull request Compare This branch is 33 commits ahead, 3 commits behind codegram:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


These are the new Codegram vimfiles!

I forked them and I herewith give to credit to my fellow friends from Spain :) Txus inspired me to use VIM and it improved my coding-happiness by 1000%.

These forked vimfiles include some of my own improvements and customizations.



If you trust me, do this:

rm -fR ~/.vim && git clone ~/.vim && rm ~/.vimrc && ln -s ~/.vim/vimrc ~/.vimrc && git clone ~/.vim/bundle/vundle && vim +BundleInstall +qa! && clear && echo "Done! :)"

Manual way

Clone this repo:

$ git clone ~/.vim
$ rm ~/.vimrc && ln -s ~/.vim/vimrc ~/.vimrc

Install Vundle:

$ git clone ~/.vim/bundle/vundle

Set up your ~/vimrc.local with your custom plugins, themes, for example:

" Color theme
Bundle 'sjl/badwolf'
colorscheme badwolf

Open up Vim, and issue this command:


TA-DA! Everything's done!

Custom mappings

  • The leader key is , (comma).


  • ,n renames current file, asking for the new name.


  • Arrow keys are disabled.
  • jk is mapped to <ESC>, so you don't have to reach out to <ESC>.


  • ,<Space> clears the search.


  • ,w maps to :w!: it saves the current buffer.
  • ,q maps to :wqa!: it saves all buffers and quits.
  • <tab> / <S-tab> rotates among open buffers.
  • <leader>d closes the current buffer.
  • <leader>D closes ALL the buffers.


  • ,v opens a new vertical split and switches to it.
  • <C-h> switches to the left split.
  • <C-j> switches to the split below.
  • <C-k> switches to the split above.
  • <C-l> switches to the right split.

Running tests (Ruby)

  • ,t runs the current test file (RSpec, MiniTest or Cucumber).
  • ,T runs the specific test under the cursor (RSpec or Cucumber).


  • <F2> to toggle Paste mode (to paste stuff from the system clipboard).
  • ,gb in Visual mode to perform a git blame on the selected lines.
  • ,r runs the current buffer in the current RVM Ruby, including lib and test.
  • <tab> in Insert mode either indents or autocompletes, depending on the context.



Use Ack to search through your code.

  • ,a performs an Ack search.
  • <C-n> / <C-p>: Rotate among results.


Auto-closes, parens, curly braces, everything.


First, brew install ctags and run the tags command (found in our dotfiles) on your working directory to generate the tag list.

  • <C-]> to go to the definition of the word under the cursor (constant, method, whatever
  • <C-p> to come back.
  • <F7> / <F9> to rotate among multiple definitions of the same tag.


Fuzzy-find and open files at top speed!

  • ,o To open the Ctrl-p window. Start typing a file name and press Enter. Plus, if you add a colon and an action it will be performed afterwards (:45 will open the file and go to the line 45).


Puts end after a method definition, if clause, etc. (Ruby)


Use Git from Vim.

  • ,gs: Git status.
  • ,gc: Git commit.


A fancy status line.


Integration with Rails.


  • cs"' changes surround from " to '.
  • ysiw" surrounds inside the word with ".
  • ,' switches ' and " quotes.


Comments any kind of code.

  • ,co: In visual mode, comments the selected block.