Home > vimfiles

vimfiles

Vimfiles is a project mainly written in Vim Script, it's free.

My vimfiles

h1. Vim

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

  • (Windows) http://www.vim.org/download.php#pc (gvim73_46.exe)
  • (Mac) https://github.com/b4winckler/macvim/downloads (snapshot-56)

h1. Bundled Plugins

  • "Ack":http://www.vim.org/scripts/script.php?script_id=2572 - type :Ack [search pattern] to search your entire project
  • "Align":http://www.vim.org/scripts/script.php?script_id=294 - align blocks of text using equal sign, make comment boxes and more
  • "bufexplorer":http://www.vim.org/scripts/script.php?script_id=42 - manage your file buffers
  • "Command-T":http://www.vim.org/scripts/script.php?script_id=3025 - the fastest and most intuitive way for opening files in your project
  • "cucumber":http://www.vim.org/scripts/script.php?script_id=2973 - support for cucumber features such as syntax highlight, indentation, etc
  • "endwise":http://www.vim.org/scripts/script.php?script_id=2386 - support to close Ruby blocks such as 'if', 'do' with 'end'
  • "fugitive":http://www.vim.org/scripts/script.php?script_id=2975 - support for Git, adding convenient commands such as :Gstatus, :Gread, :Gmove
  • "haml":http://www.vim.org/scripts/script.php?script_id=1773 - syntax highlight for HAML
  • "markdown":http://www.vim.org/scripts/script.php?script_id=1242 - syntax highlight for Markdown
  • "NERD_commenter":http://www.vim.org/scripts/script.php?script_id=1218 - support to comment lines of code
  • "NERD_tree":http://www.vim.org/scripts/script.php?script_id=1658 - project pane that you can open with [leader] p
  • "ragtag":http://www.vim.org/scripts/script.php?script_id=1896 - easier way to create tags for html, erb, etc
  • "rails":http://www.vim.org/scripts/script.php?script_id=1567 - lot's of tools to make it easier to manage your Rails projects
  • "snipmate":https://github.com/akitaonrails/snipmate.vim - support for textmate-like snippets for several languages
  • "supertab":http://www.vim.org/scripts/script.php?script_id=1643 - pseudo auto-complete with tab
  • "surround":http://www.vim.org/scripts/script.php?script_id=1697 - add, change, remove surrounding parentheses, brackets, quotes, etc
  • "syntastic":http://www.vim.org/scripts/script.php?script_id=2736 - checks for syntax errors in many languages
  • "textile":http://www.vim.org/scripts/script.php?script_id=2305 - syntax highlight for Textile
  • "vim-coffee-script":https://github.com/kchmck/vim-coffee-script - syntax highlight for Coffee Script
  • "vim-preview":http://www.vim.org/scripts/script.php?script_id=3344 - [leader] P previews Markdown, Rdoc, Textile, html. Requires Ruby and other gems.
  • "vim-ruby-sinatra":https://github.com/hallison/vim-ruby-sinatra - syntax highlight for Sinatra
  • "vim-ruby":https://github.com/vim-ruby/vim-ruby/wiki - syntax highlight, smart identation, auto-complete for Ruby
  • "vim-textobj-rubyblock":http://vimcasts.org/blog/2010/12/a-text-object-for-ruby-blocks/ - smart block selection in Ruby code
  • "vividchalk":http://www.vim.org/scripts/script.php?script_id=1891 - color scheme inspired by the classic Vibrant for Textmate
  • "Zencoding":http://www.vim.org/scripts/script.php?script_id=2981 - powerful way for HTML abbreviations (learn here: http://code.google.com/p/zen-coding/). Type abbreviation and press Ctrl+Y+comma (c-y ,)

h1. 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/bkether/vimfiles.git ~/.vim
or

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.

h2. 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

h2. Dependencies

You will need these dependencies figured out:

  • Ruby (for the fuzzy finder plugin)
  • Exuberant Ctags (http://ctags.sourceforge.net/)
  • Ncurses-term (in Linux only)

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/)

h1. IMPORTANT: Command-T

The latest version replaces the old Fuzzy Finder with a new one called "Command-T" form wincent.com. I've replaced the old "Command-T" key binding that used to open new tabs and assigned it to this new plugin so it behaves the same as Textmate.

You may have problems in Mac/Linux because this plugin requires a native extension, so you will have to do this:


rvm use system # use this line if using rvm
cd ~/.vim/bundle/Command-T/ruby/command-t
ruby extconf.rb
make

This means that you need to have your Ruby source files and GCC also installed. A binary for Windows is already bundled so it should just work. I've also included a binary compiled for Ruby Enterprise Edition, but if you are using other Ruby distros, you will need to recompile.

There are binaries for Mac and Windows. The Mac version is compiled against the default system Ruby for Mac OS X 10.6.5. The Windows version is compiled against Ruby Installer 1.8.7-p330.

h2. 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
make
sudo make install

More details can be found "here":http://kresimirbojcic.com/2011/05/14/installing-command-t-ubunutu-11.04-ruby-1.9.2.html

h2. Learn Vim

Visit the following sites to learn more about Vim:

  • http://vimcasts.org

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

h2. 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
Previous:ccrb-web