Skip to content

Instantly share code, notes, and snippets.

@ChengLong
Last active August 29, 2015 14:05
Show Gist options
  • Save ChengLong/9abf35870b35c8a353bb to your computer and use it in GitHub Desktop.
Save ChengLong/9abf35870b35c8a353bb to your computer and use it in GitHub Desktop.
Install Command-T

Install Command-T

Short summary of the official doc

Prerequisite

  1. Vim compiled with Ruby support. To verify this, run :ruby puts RUBY_VERSION. If it does NOT output error message, this vim has ruby support. Remember this version number. It will be used later.
  2. Pathogen or other vim plugin manager.

Installation

Install Command-T.

git clone https://github.com/wincent/command-t.git ~/.vim/bundle/command-t

Compiling Command-T

  1. cd ~/.vim/bundle/command-t/ruby/command-t
  2. Use the SAME Ruby that your vim uses (Check the Ruby version in Prerequisite step 1) to run ruby extconf.rb. In Mac OS e.g. Mavericks, your system may use Ruby 2.0. But your vim might use an older version e.g. 1.8.7. In that case, /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
  3. make

Config

You probably want to map the leader key to other key because on Mac, by default, Command + t is to open a new tab. To change the leader key to comma, add let mapleader = ',' in your .vimrc

On Mac OS, pressing 'esc' has NO effect. To dismiss Command-T, Ctrl + c.

@allenlsy
Copy link

allenlsy commented Sep 8, 2014

Mmmm...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment