git clone git://github.com/qichanghai/vimfiles.git ~/.vim
git submodule update --init
Linux:
echo "source ~/.vim/vimrc" > ~/.vimrc
echo "source ~/.vim/gvimrc" > ~/.gvimrc
On Windows you should create a _vimrc (underline instead of dot) and add
the following line inside:
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:
<pre><code>
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/)
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.
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
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.
- 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