/vimfiles

This is an old project that I have discontinued. Please use the vimfiles from YADR instead: https://github.com/akitaonrails/dotfiles

Primary LanguageVimL

THIS PROJECT HAS BEEN DISCONTINUED

I recommend the vimfiles from YADR (and the entire dotfiles, actually, it’s quite nice and well done and maintained)

https://github.com/akitaonrails/dotfiles

Vim

It is recommended that you use gVim in either Windows or Linux and MacVim for
Mac. Download from:

Bundled Plugins

  • Ack – type :Ack [search pattern] to search your entire project
  • Align – align blocks of text using equal sign, make comment boxes and more
  • bufexplorer – manage your file buffers
  • CtrlP – replaces CommandT as a better fuzzy finder
  • cucumber – support for cucumber features such as syntax highlight, indentation, etc
  • endwise – support to close Ruby blocks such as ‘if’, ‘do’ with ‘end’
  • fugitive – support for Git, adding convenient commands such as :Gstatus, :Gread, :Gmove
  • haml – syntax highlight for HAML
  • html5.vim – omnicomplete function and syntax for HTML5
  • markdown – syntax highlight for Markdown
  • NERD_commenter – support to comment lines of code
  • NERD_tree – project pane that you can open with [leader] p
  • NrrwRgn – A Narrow Region Plugin for vim (like Emacs Narrow Region)
  • ragtag – easier way to create tags for html, erb, etc
  • rails – lot’s of tools to make it easier to manage your Rails projects
  • snipmate – support for textmate-like snippets for several languages
  • supertab – pseudo auto-complete with tab
  • surround – add, change, remove surrounding parentheses, brackets, quotes, etc
  • syntastic – checks for syntax errors in many languages
  • textile – syntax highlight for Textile
  • vim-bundler – Bundler support for Vim
  • vim-buffergator – Vim plugin to list, select and switch between buffers.
  • vim-coffee-script – syntax highlight for Coffee Script
  • vim-easymotion – Vim motions on speed!
  • vim-gist – vimscript for gist
  • im-jade – Vim syntax highlighting for the Jade templating engine
  • vim-jquery – Vim syntax file to add some colorations for jQuery keywords and css selectors
  • vim-preview – [leader] P previews Markdown, Rdoc, Textile, html. Requires Ruby and other gems.
  • vim-ruby-sinatra – syntax highlight for Sinatra
  • vim-ruby – syntax highlight, smart identation, auto-complete for Ruby
  • vim-rvmRVM support for Vim
  • vim-textobj-rubyblock – smart block selection in Ruby code
  • vim-vroom – A vim plugin for running your Ruby tests
  • vividchalk – color scheme inspired by the classic Vibrant for Textmate
  • Zencoding – powerful way for HTML abbreviations (learn here: http://code.google.com/p/zen-coding/). Type abbreviation and press Ctrl+Y+comma (c-y ,)
  • ZoomWin – Zoom in/out of windows (toggle between one window and multi-window)
  • vim-slim – syntax highlight for Slim
  • webapi-vim" – vim interface to Web API

Usage

Troubleshoot: Because of the large amount of submodules, if you ever have any
trouble after pulling from the repository, it will be easier to just back up
your old .vim folder and just git clone a new version.

Clone this repo into your home directory either as .vim (linux/mac) or
vimfiles (Windows). Such as:


git clone git://github.com/akitaonrails/vimfiles.git ~/.vim

Then ‘cd’ into the repo and run this to get the snippets submodule:


git submodule update --init

Now you should create a new .vimrc file in your home directory that
loads the pre-configured one that comes bundled in this package. You can do it
on Linux/Mac like this:


echo "source ~/.vim/vimrc" > ~/.vimrc

On Windows you should create a _vimrc (underline instead of dot) and add
the following line inside:


source ~/vimfiles/vimrc

This way you can override the default configuration by adding your own inside
this file.

You should also create a new .gvimrc file in your home directory. You can do
it on Linux/Mac like this:


echo "source ~/.vim/gvimrc" > ~/.gvimrc

On Windows you should create a _gvimrc (underline instead of dot) and add
the following line inside:


source ~/vimfiles/gvimrc

This way you can override the default GUI configuration by adding your own inside
this file.

Help Tags

At first usage of vim, type “:” while in command mode and execute:

call pathogen#helptags()

This will make the plugins documentations available upon :help

Dependencies

You will need these dependencies figured out:

In Ubuntu, for example, you will have to do:


apt-get install exuberant-ctags ncurses-term

In OS X, you can install ctags with homebrew


brew install ctags

On Windows you have to download Ctags and add ctags.exe in your PATH.

Mac OS X and most Linux distros come with Ruby already. If you’re in Windows
look for Luis Lavena’s latest Ruby Installer (http://rubyforge.org/projects/rubyinstaller/)

Ubuntu 11.04 and/or Vim 7.3.35

Ubuntu 11.04 comes bundled with Vim 7.3.35, which has “flaky” Ruby support.
Even if you do everything right, you might see the following crashes when
trying to use Command-T:


Vim: Caught deadly signal SEGV
Vim: Finished.

Segmentation fault

If this happens to you, update Vim to 7.3.154:


hg clone https://vim.googlecode.com/hg/ ~/vim
cd ~/vim
hg update -C v7-3-154
./configure --enable-rubyinterp --with-features=huge --enable-gui=gnome2
make
sudo make install

More details can be found here
Note that the options ‘—with-features=huge —enable-gui=gnome2’ are not mentioned on the post above but they are necessary to also update the graphical version of vim (gvim).

Learn Vim

Visit the following sites to learn more about Vim:

There are many sites teaching Vim, if you know of any other that are easy
to follow for newcomers, let me know.

Credits

  • Original project and most of the heavy lifting: @scrooloose
  • All the cool plugins for Rails, Cucumber and more: @timpope
  • Great Command-T plugin by: Wincent
  • Hacks and some snippets: @akitaonrails