Commits

James Taylor committed e602278

Update to vim command-d; tweaking zshrc (slow)

Comments (0)

Files changed (22)

.vim/doc/command-t.txt

-*command-t.txt* Command-T plug-in for VIM
+*command-t.txt* Command-T plug-in for Vim         *command-t*
 
 CONTENTS                                        *command-t-contents*
 
- 1. Introduction            |command-t|
+ 1. Introduction            |command-t-intro|
  2. Requirements            |command-t-requirements|
  3. Installation            |command-t-installation|
+ 3. Managing using Pathogen |command-t-pathogen|
  4. Trouble-shooting        |command-t-trouble-shooting|
  5. Usage                   |command-t-usage|
  6. Commands                |command-t-commands|
 13. History                 |command-t-history|
 
 
-INTRODUCTION                                    *command-t*
+INTRODUCTION                                    *command-t-intro*
 
 The Command-T plug-in provides an extremely fast, intuitive mechanism for
 opening files with a minimal number of keystrokes. It's named "Command-T"
 
 REQUIREMENTS                                    *command-t-requirements*
 
-The plug-in requires VIM compiled with Ruby support, a compatible Ruby
+The plug-in requires Vim compiled with Ruby support, a compatible Ruby
 installation at the operating system level, and a C compiler to build
 the Ruby extension.
 
-1. VIM compiled with Ruby support
 
-You can check for Ruby support by launching VIM with the --version switch:
+1. Vim compiled with Ruby support
+
+You can check for Ruby support by launching Vim with the --version switch:
 
   vim --version
 
-If "+ruby" appears in the version information then your version of VIM has
+If "+ruby" appears in the version information then your version of Vim has
 Ruby support.
 
-Another way to check is to simply try using the :ruby command from within VIM
+Another way to check is to simply try using the :ruby command from within Vim
 itself:
 
   :ruby 1
 
-If your VIM lacks support you'll see an error message like this:
+If your Vim lacks support you'll see an error message like this:
 
   E319: Sorry, the command is not available in this version
 
-The version of VIM distributed with Mac OS X does not include Ruby support,
+The version of Vim distributed with Mac OS X does not include Ruby support,
 while MacVim does; it is available from:
 
-  http://code.google.com/p/macvim/
+  http://github.com/b4winckler/macvim/downloads
 
-For Windows users, the executable from www.vim.org does include Ruby support.
+For Windows users, the Vim 7.2 executable available from www.vim.org does
+include Ruby support, and is recommended over version 7.3 (which links against
+Ruby 1.9, but apparently has some bugs that need to be resolved).
+
 
 2. Ruby
 
-In addition to having Ruby support in VIM, your system itself must have a
-compatible Ruby install. In practice this usually means a version of Ruby from
-the 1.8 series, as VIM's support for 1.9 is still not official.
+In addition to having Ruby support in Vim, your system itself must have a
+compatible Ruby install. "Compatible" means the same version as Vim itself
+links against. If you use a different version then Command-T is unlikely
+to work (see TROUBLE-SHOOTING below).
 
-The current version of Mac OS X comes with Ruby 1.8.7.
+On Mac OS X Snow Leopard, the system comes with Ruby 1.8.7 and all recent
+versions of MacVim (the 7.2 snapshots and 7.3) are linked against it.
 
-A suitable Ruby environment for Windows can be installed using RubyInstaller
-available at:
+On Linux and similar platforms, the linked version of Ruby will depend on
+your distribution. You can usually find this out by examining the
+compilation and linking flags displayed by the |:version| command in Vim, and
+by looking at the output of:
 
-  http://rubyinstaller.org/download.html
+  :ruby puts RUBY_VERSION
+
+A suitable Ruby environment for Windows can be installed using the Ruby
+1.8.7-p299 RubyInstaller available at:
+
+  http://rubyinstaller.org/downloads/archives
 
 If using RubyInstaller be sure to download the installer executable, not the
 7-zip archive. When installing mark the checkbox "Add Ruby executables to your
-PATH" so that VIM can find them.
+PATH" so that Vim can find them.
+
 
 3. C compiler
 
 On Windows, the RubyInstaller Development Kit can be used to conveniently
 install the necessary tool chain:
 
-  http://wiki.github.com/oneclick/rubyinstaller/development-kit
+  http://rubyinstaller.org/downloads/archives
+
+At the time of writing, the appropriate development kit for use with Ruby
+1.8.7 is DevKit-3.4.5r3-20091110.
 
 To use the Development Kit extract the archive contents to your C:\Ruby
 folder.
 INSTALLATION                                    *command-t-installation*
 
 Command-T is distributed as a "vimball" which means that it can be installed
-by opening it in VIM and then sourcing it:
+by opening it in Vim and then sourcing it:
 
   :e command-t.vba
   :so %
   ruby extconf.rb
   make
 
+Note: If you are an RVM user, you must perform the build using the same
+version of Ruby that Vim itself is linked against. This will often be the
+system Ruby, which can be selected before issuing the "make" command with:
+
+  rvm use system
+
+
+MANAGING USING PATHOGEN                         *command-t-pathogen*
+
+Pathogen is a plugin that allows you to maintain plugin installations in
+separate, isolated subdirectories under the "bundle" directory in your
+|'runtimepath'|. The following examples assume that you already have
+Pathogen installed and configured, and that you are installing into
+~/.vim/bundle. For more information about Pathogen, see:
+
+  http://www.vim.org/scripts/script.php?script_id=2332
+
+If you manage your entire ~/.vim folder using Git then you can add the
+Command-T repository as a submodule:
+
+  cd ~/.vim
+  git submodule add git://git.wincent.com/command-t.git bundle/command-t
+  git submodule init
+
+Or if you just wish to do a simple clone instead of using submodules:
+
+  cd ~/.vim
+  git clone git://git.wincent.com/command-t.git bundle/command-t
+
+Once you have a local copy of the repository you can update it at any time
+with:
+
+  cd ~/.vim/bundle/command-t
+  git pull
+
+Or you can switch to a specific release with:
+
+  cd ~/.vim/bundle/command-t
+  git checkout 0.8b
+
+After installing or updating you must build the extension:
+
+  cd ~/.vim/bundle/command-t
+  rake make
+
+While the Vimball installation automatically generates the help tags, under
+Pathogen it is necessary to do so explicitly from inside Vim:
+
+  :call pathogen#helptags()
+
 
 TROUBLE-SHOOTING                                *command-t-trouble-shooting*
 
 Most installation problems are caused by a mismatch between the version of
-Ruby on the host operating system, and the version of Ruby that VIM itself
+Ruby on the host operating system, and the version of Ruby that Vim itself
 linked against at compile time. For example, if one is 32-bit and the other is
 64-bit, or one is from the Ruby 1.9 series and the other is from the 1.8
 series, then the plug-in is not likely to work.
 
 As such, on Mac OS X, I recommend using the standard Ruby that comes with the
-system (currently 1.8.7) along with the latest snapshot of MacVim (currently
-snapshot 52).
+system (currently 1.8.7) along with the latest version of MacVim (currently
+version 7.3). If you wish to use custom builds of Ruby or of MacVim (not
+recommmended) then you will have to take extra care to ensure that the exact
+same Ruby environment is in effect when building Ruby, Vim and the Command-T
+extension.
 
-On Windows, I recommend using the version 1.8.7 RubyInstaller and the
-corresponding RubyInstaller Development Kit linked to above, along with the
-standard (32-bit) version of VIM that can be downloaded from www.vim.org.
+For Windows, the following combination is known to work:
+
+  - Vim 7.2 from http://www.vim.org/download.php:
+      ftp://ftp.vim.org/pub/vim/pc/gvim72.exe
+  - Ruby 1.8.7-p299 from http://rubyinstaller.org/downloads/archives:
+      http://rubyforge.org/frs/download.php/71492/rubyinstaller-1.8.7-p299.exe
+  - DevKit 3.4.5r3-20091110 from http://rubyinstaller.org/downloads/archives:
+      http://rubyforge.org/frs/download.php/66888/devkit-3.4.5r3-20091110.7z
+
+If a problem occurs the first thing you should do is inspect the output of:
+
+  ruby extconf.rb
+  make
+
+During the installation, and:
+
+  vim --version
+
+And compare the compilation and linker flags that were passed to the
+extension and to Vim itself when they were built. If the Ruby-related
+flags or architecture flags are different then it is likely that something
+has changed in your Ruby environment and the extension may not work until
+you eliminate the discrepancy.
 
 
 USAGE                                           *command-t-usage*
 
   <Leader>t
 
-If a mapping for <Leader>t already exists at the time the plug-in is loaded
-then Command-T will not overwrite it. You can instead open the match window by
-issuing the command:
+This mapping is set up automatically for you, provided you do not already have
+a mapping for <Leader>t or |:CommandT|. You can also bring up the match window
+by issuing the command:
 
   :CommandT
 
 Replacing "<Leader>t" with your mapping of choice.
 
 Note that in the case of MacVim you actually can map to Command-T (written
-as <D-t> in VIM) in your ~/.gvimrc file if you first unmap the existing menu
+as <D-t> in Vim) in your ~/.gvimrc file if you first unmap the existing menu
 binding of Command-T to "New Tab":
 
   if has("gui_macvim")
     let g:CommandTMaxFiles=20000
 
 To have Command-T pick up new settings immediately (that is, without having
-to restart VIM) you can issue the |:CommandTFlush| command after making
+to restart Vim) you can issue the |:CommandTFlush| command after making
 changes via |:let|.
 
 Following is a list of all available options:
       contains a dot that could cause a dot-file to match. When set to a
       non-zero value, this setting instructs Command-T to never show dot-files
       under any circumstances. Note that it is contradictory to set both this
-      setting and |g:CommandTAlwaysShowDotFiles| to true, and if you do so VIM
+      setting and |g:CommandTAlwaysShowDotFiles| to true, and if you do so Vim
       will suffer from headaches, nervous twitches, and sudden mood swings.
 
                                                 *g:CommandTScanDotDirectories*
 
   let g:CommandTCancelMap='<C-x>'
 
-Following is a list of all map settings:
+Multiple, alternative mappings may be specified using list syntax:
+
+  let g:CommandTCancelMap=['<C-x>', '<C-c>']
+
+Following is a list of all map settings and their defaults:
 
                               Setting   Default mapping(s)
 
                                        *g:CommandTCursorStartMap*
             |g:CommandTCursorStartMap|  <C-a>
 
-In addition to the options provided by Command-T itself, some of VIM's own
+In addition to the options provided by Command-T itself, some of Vim's own
 settings can be used to control behavior:
 
                                                 *command-t-wildignore*
   |'wildignore'|                                 string (default: '')
 
-      VIM's |'wildignore'| setting is used to determine which files should be
+      Vim's |'wildignore'| setting is used to determine which files should be
       excluded from listings. This is a comma-separated list of glob patterns.
       It defaults to the empty string, but common settings include "*.o,*.obj"
       (to exclude object files) or ".git,.svn" (to exclude SCM metadata
 AUTHORS                                         *command-t-authors*
 
 Command-T is written and maintained by Wincent Colaiuta <win@wincent.com>.
-Other contributors that have submitted patches include:
+Other contributors that have submitted patches include (in alphabetical
+order):
 
   Lucas de Vries
+  Matthew Todd
   Mike Lundy
+  Scott Bronson
+  Sung Pae
   Zak Johnson
 
-As this was the first VIM plug-in I had ever written I was heavily influenced
+As this was the first Vim plug-in I had ever written I was heavily influenced
 by the design of the LustyExplorer plug-in by Stephen Bach, which I understand
-is one of the largest Ruby-based VIM plug-ins to date.
+is one of the largest Ruby-based Vim plug-ins to date.
 
 While the Command-T codebase doesn't contain any code directly copied from
 LustyExplorer, I did use it as a reference for answers to basic questions (like
-"How do you do 'X' in a Ruby-based VIM plug-in?"), and also copied some basic
+"How do you do 'X' in a Ruby-based Vim plug-in?"), and also copied some basic
 architectural decisions (like the division of the code into Prompt, Settings
 and MatchWindow classes).
 
 Development in progress can be inspected via the project's Git repository
 browser at:
 
-  http://git.wincent.com/command-t.git
+  https://wincent.com/repos/command-t
 
-A copy of each release is also available from the official VIM scripts site
+A copy of each release is also available from the official Vim scripts site
 at:
 
   http://www.vim.org/scripts/script.php?script_id=3025
 
 LICENSE                                         *command-t-license*
 
-Copyright 2010 Wincent Colaiuta. All rights reserved.
+Copyright 2010-2011 Wincent Colaiuta. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
 
 HISTORY                                         *command-t-history*
 
+1.0.1 (5 January 2011)
+
+- work around bug when mapping |:CommandTFlush|, wherein the default mapping
+  for |:CommandT| would not be set up
+- clean up when leaving the Command-T buffer via unexpected means (such as
+  with <C-W k> or similar)
+
+1.0 (26 November 2010)
+
+- make relative path simplification work on Windows
+
+1.0b (5 November 2010)
+
+- work around platform-specific Vim 7.3 bug seen by some users (wherein
+  Vim always falsely reports to Ruby that the buffer numbers is 0)
+- re-use the buffer that is used to show the match listing, rather than
+  throwing it away and recreating it each time Command-T is shown; this
+  stops the buffer numbers from creeping up needlessly
+
+0.9 (8 October 2010)
+
+- use relative paths when opening files inside the current working directory
+  in order to keep buffer listings as brief as possible (patch from Matthew
+  Todd)
+
+0.8.1 (14 September 2010)
+
+- fix mapping issues for users who have set |'notimeout'| (patch from Sung
+  Pae)
+
+0.8 (19 August 2010)
+
+- overrides for the default mappings can now be lists of strings, allowing
+  multiple mappings to be defined for any given action
+- <Leader>t mapping only set up if no other map for |:CommandT| exists
+  (patch from Scott Bronson)
+- prevent folds from appearing in the match listing
+- tweaks to avoid the likelihood of "Not enough room" errors when trying to
+  open files
+- watch out for "nil" windows when restoring window dimensions
+- optimizations (avoid some repeated downcasing)
+- move all Ruby files under the "command-t" subdirectory and avoid polluting
+  the "Vim" module namespace
+
 0.8b (11 July 2010)
 
-- large overhaul if the scoring algorithm to make the ordering of returned
+- large overhaul of the scoring algorithm to make the ordering of returned
   results more intuitive; given the scope of the changes and room for
   optimization of the new algorithm, this release is labelled as "beta"
 
 0.7 (10 June 2010)
 
-- handle more |'wildignore'| patterns by delegating to VIM's own |expand()|
+- handle more |'wildignore'| patterns by delegating to Vim's own |expand()|
   function; with this change it is now viable to exclude patterns such as
   'vendor/rails/**' in addition to filename-only patterns like '*.o' and
   '.git' (patch from Mike Lundy)
 0.6 (28 April 2010)
 
 - |:CommandT| now accepts an optional parameter to specify the starting
-  directory, temporarily overriding the usual default of VIM's |:pwd|
+  directory, temporarily overriding the usual default of Vim's |:pwd|
 - fix truncated paths when operating from root directory
 
 0.5.1 (11 April 2010)
 0.5 (3 April 2010)
 
 - |:CommandTFlush| now re-evaluates settings, allowing changes made via |let|
-  to be picked up without having to restart VIM
+  to be picked up without having to restart Vim
 - fix premature abort when scanning very deep directory hierarchies
 - remove broken |<Esc>| key mapping on vt100 and xterm terminals
 - provide settings for overriding default mappings
 - fix bug where |'list'| setting might be inappropriately set after dismissing
   Command-T
 - compatibility fix for different behaviour of "autoload" under Ruby 1.9.1
-- avoid "highlight group not found" warning when run under a version of VIM
+- avoid "highlight group not found" warning when run under a version of Vim
   that does not have syntax highlighting support
 - open in split when opening normally would fail due to |'hidden'| and
   |'modified'| values
 'NERDTreeWinPos'	NERD_tree.txt	/*'NERDTreeWinPos'*
 'NERDTreeWinSize'	NERD_tree.txt	/*'NERDTreeWinSize'*
 'loaded_nerd_tree'	NERD_tree.txt	/*'loaded_nerd_tree'*
+:CVSEdit	vcscommand.txt	/*:CVSEdit*
+:CVSEditors	vcscommand.txt	/*:CVSEditors*
+:CVSUnedit	vcscommand.txt	/*:CVSUnedit*
+:CVSWatch	vcscommand.txt	/*:CVSWatch*
+:CVSWatchAdd	vcscommand.txt	/*:CVSWatchAdd*
+:CVSWatchOff	vcscommand.txt	/*:CVSWatchOff*
+:CVSWatchOn	vcscommand.txt	/*:CVSWatchOn*
+:CVSWatchRemove	vcscommand.txt	/*:CVSWatchRemove*
+:CVSWatchers	vcscommand.txt	/*:CVSWatchers*
 :CommandT	command-t.txt	/*:CommandT*
 :CommandTFlush	command-t.txt	/*:CommandTFlush*
 :FufAddBookmark	fuf.txt	/*:FufAddBookmark*
 :NERDTreeFromBookmark	NERD_tree.txt	/*:NERDTreeFromBookmark*
 :NERDTreeMirror	NERD_tree.txt	/*:NERDTreeMirror*
 :NERDTreeToggle	NERD_tree.txt	/*:NERDTreeToggle*
+:VCSAdd	vcscommand.txt	/*:VCSAdd*
+:VCSAnnotate	vcscommand.txt	/*:VCSAnnotate*
+:VCSBlame	vcscommand.txt	/*:VCSBlame*
+:VCSCommit	vcscommand.txt	/*:VCSCommit*
+:VCSDelete	vcscommand.txt	/*:VCSDelete*
+:VCSDiff	vcscommand.txt	/*:VCSDiff*
+:VCSGotoOriginal	vcscommand.txt	/*:VCSGotoOriginal*
+:VCSInfo	vcscommand.txt	/*:VCSInfo*
+:VCSLock	vcscommand.txt	/*:VCSLock*
+:VCSLog	vcscommand.txt	/*:VCSLog*
+:VCSRemove	vcscommand.txt	/*:VCSRemove*
+:VCSRevert	vcscommand.txt	/*:VCSRevert*
+:VCSReview	vcscommand.txt	/*:VCSReview*
+:VCSStatus	vcscommand.txt	/*:VCSStatus*
+:VCSUnlock	vcscommand.txt	/*:VCSUnlock*
+:VCSUpdate	vcscommand.txt	/*:VCSUpdate*
+:VCSVimDiff	vcscommand.txt	/*:VCSVimDiff*
 NERDTree	NERD_tree.txt	/*NERDTree*
 NERDTree-?	NERD_tree.txt	/*NERDTree-?*
 NERDTree-A	NERD_tree.txt	/*NERDTree-A*
 NERDTreeOptions	NERD_tree.txt	/*NERDTreeOptions*
 NERDTreeRender()	NERD_tree.txt	/*NERDTreeRender()*
 NERD_tree.txt	NERD_tree.txt	/*NERD_tree.txt*
+VCSCommandCVSDiffOpt	vcscommand.txt	/*VCSCommandCVSDiffOpt*
+VCSCommandCVSExec	vcscommand.txt	/*VCSCommandCVSExec*
+VCSCommandCommitOnWrite	vcscommand.txt	/*VCSCommandCommitOnWrite*
+VCSCommandDeleteOnHide	vcscommand.txt	/*VCSCommandDeleteOnHide*
+VCSCommandDiffSplit	vcscommand.txt	/*VCSCommandDiffSplit*
+VCSCommandDisableAll	vcscommand.txt	/*VCSCommandDisableAll*
+VCSCommandDisableExtensionMappings	vcscommand.txt	/*VCSCommandDisableExtensionMappings*
+VCSCommandDisableMappings	vcscommand.txt	/*VCSCommandDisableMappings*
+VCSCommandEdit	vcscommand.txt	/*VCSCommandEdit*
+VCSCommandEnableBufferSetup	vcscommand.txt	/*VCSCommandEnableBufferSetup*
+VCSCommandMapPrefix	vcscommand.txt	/*VCSCommandMapPrefix*
+VCSCommandMappings	vcscommand.txt	/*VCSCommandMappings*
+VCSCommandResultBufferNameExtension	vcscommand.txt	/*VCSCommandResultBufferNameExtension*
+VCSCommandResultBufferNameFunction	vcscommand.txt	/*VCSCommandResultBufferNameFunction*
+VCSCommandSVKExec	vcscommand.txt	/*VCSCommandSVKExec*
+VCSCommandSVNDiffExt	vcscommand.txt	/*VCSCommandSVNDiffExt*
+VCSCommandSVNDiffOpt	vcscommand.txt	/*VCSCommandSVNDiffOpt*
+VCSCommandSVNExec	vcscommand.txt	/*VCSCommandSVNExec*
+VCSCommandSplit	vcscommand.txt	/*VCSCommandSplit*
+VCSCommandVCSTypeOverride	vcscommand.txt	/*VCSCommandVCSTypeOverride*
 abc	fuf.txt	/*abc*
+b:VCSCommandCommand	vcscommand.txt	/*b:VCSCommandCommand*
+b:VCSCommandOriginalBuffer	vcscommand.txt	/*b:VCSCommandOriginalBuffer*
+b:VCSCommandSourceFile	vcscommand.txt	/*b:VCSCommandSourceFile*
+b:VCSCommandVCSType	vcscommand.txt	/*b:VCSCommandVCSType*
 command-t	command-t.txt	/*command-t*
 command-t-authors	command-t.txt	/*command-t-authors*
 command-t-commands	command-t.txt	/*command-t-commands*
 command-t-donations	command-t.txt	/*command-t-donations*
 command-t-history	command-t.txt	/*command-t-history*
 command-t-installation	command-t.txt	/*command-t-installation*
+command-t-intro	command-t.txt	/*command-t-intro*
 command-t-license	command-t.txt	/*command-t-license*
 command-t-mappings	command-t.txt	/*command-t-mappings*
 command-t-options	command-t.txt	/*command-t-options*
+command-t-pathogen	command-t.txt	/*command-t-pathogen*
 command-t-requirements	command-t.txt	/*command-t-requirements*
 command-t-trouble-shooting	command-t.txt	/*command-t-trouble-shooting*
 command-t-usage	command-t.txt	/*command-t-usage*
 command-t-website	command-t.txt	/*command-t-website*
 command-t-wildignore	command-t.txt	/*command-t-wildignore*
 command-t.txt	command-t.txt	/*command-t.txt*
+cvscommand-changes	vcscommand.txt	/*cvscommand-changes*
 fuf	fuf.txt	/*fuf*
 fuf-abbreviation	fuf.txt	/*fuf-abbreviation*
 fuf-about	fuf.txt	/*fuf-about*
 g:fuf_taggedfile_switchOrder	fuf.txt	/*g:fuf_taggedfile_switchOrder*
 g:fuf_timeFormat	fuf.txt	/*g:fuf_timeFormat*
 g:fuf_useMigemo	fuf.txt	/*g:fuf_useMigemo*
+vcscommand	vcscommand.txt	/*vcscommand*
+vcscommand-buffer-management	vcscommand.txt	/*vcscommand-buffer-management*
+vcscommand-buffer-variables	vcscommand.txt	/*vcscommand-buffer-variables*
+vcscommand-bugs	vcscommand.txt	/*vcscommand-bugs*
+vcscommand-commands	vcscommand.txt	/*vcscommand-commands*
+vcscommand-config	vcscommand.txt	/*vcscommand-config*
+vcscommand-contents	vcscommand.txt	/*vcscommand-contents*
+vcscommand-customize	vcscommand.txt	/*vcscommand-customize*
+vcscommand-events	vcscommand.txt	/*vcscommand-events*
+vcscommand-install	vcscommand.txt	/*vcscommand-install*
+vcscommand-intro	vcscommand.txt	/*vcscommand-intro*
+vcscommand-manual	vcscommand.txt	/*vcscommand-manual*
+vcscommand-mappings	vcscommand.txt	/*vcscommand-mappings*
+vcscommand-mappings-override	vcscommand.txt	/*vcscommand-mappings-override*
+vcscommand-naming	vcscommand.txt	/*vcscommand-naming*
+vcscommand-options	vcscommand.txt	/*vcscommand-options*
+vcscommand-ssh	vcscommand.txt	/*vcscommand-ssh*
+vcscommand-ssh-config	vcscommand.txt	/*vcscommand-ssh-config*
+vcscommand-ssh-env	vcscommand.txt	/*vcscommand-ssh-env*
+vcscommand-ssh-other	vcscommand.txt	/*vcscommand-ssh-other*
+vcscommand-ssh-wrapper	vcscommand.txt	/*vcscommand-ssh-wrapper*
+vcscommand-statusline	vcscommand.txt	/*vcscommand-statusline*
+vcscommand.txt	vcscommand.txt	/*vcscommand.txt*

.vim/plugin/command-t.vim

 command -nargs=? -complete=dir CommandT call <SID>CommandTShow(<q-args>)
 command CommandTFlush call <SID>CommandTFlush()
 
-silent! nmap <unique> <silent> <Leader>t :CommandT<CR>
+if !hasmapto(':CommandT<CR>')
+  silent! nmap <unique> <silent> <Leader>t :CommandT<CR>
+endif
 
 function s:CommandTRubyWarning()
   echohl WarningMsg
   # require Ruby files
   begin
     # prepare controller
-    require 'vim'
+    require 'command-t/vim'
     require 'command-t/controller'
     $command_t = CommandT::Controller.new
   rescue LoadError
     load_path_modified = false
-    VIM::evaluate('&runtimepath').to_s.split(',').each do |path|
+    ::VIM::evaluate('&runtimepath').to_s.split(',').each do |path|
       lib = "#{path}/ruby"
       if !$LOAD_PATH.include?(lib) and File.exist?(lib)
         $LOAD_PATH << lib
     end
     retry if load_path_modified
 
-    # could get here if C extension was not compiled
+    # could get here if C extension was not compiled, or was compiled
+    # for the wrong architecture or Ruby version
     require 'command-t/stub'
     $command_t = CommandT::Stub.new
   end

.vim/ruby/command-t/Makefile

 #### Start of system configuration section. ####
 
 srcdir = .
-topdir = /opt/local/lib/ruby/1.8/i686-darwin9
+topdir = /usr/lib/ruby/1.8/x86_64-linux
 hdrdir = $(topdir)
 VPATH = $(srcdir):$(topdir):$(hdrdir)
 exec_prefix = $(prefix)
-prefix = $(DESTDIR)/opt/local
+prefix = $(DESTDIR)/usr
 sharedstatedir = $(prefix)/com
-mandir = $(DESTDIR)/opt/local/share/man
+mandir = $(prefix)/share/man
 psdir = $(docdir)
 oldincludedir = $(DESTDIR)/usr/include
 localedir = $(datarootdir)/locale
 bindir = $(exec_prefix)/bin
-libexecdir = $(exec_prefix)/libexec
-sitedir = $(libdir)/ruby/site_ruby
+libexecdir = $(prefix)/lib/ruby1.8
+sitedir = $(DESTDIR)/usr/local/lib/site_ruby
 htmldir = $(docdir)
 vendorarchdir = $(vendorlibdir)/$(sitearch)
 includedir = $(prefix)/include
-infodir = $(datarootdir)/info
+infodir = $(prefix)/share/info
 vendorlibdir = $(vendordir)/$(ruby_version)
-sysconfdir = $(prefix)/etc
+sysconfdir = $(DESTDIR)/etc
 libdir = $(exec_prefix)/lib
 sbindir = $(exec_prefix)/sbin
 rubylibdir = $(libdir)/ruby/$(ruby_version)
 docdir = $(datarootdir)/doc/$(PACKAGE)
 dvidir = $(docdir)
-vendordir = $(DESTDIR)/opt/local/lib/ruby/vendor_ruby
+vendordir = $(libdir)/ruby/vendor_ruby
 datarootdir = $(prefix)/share
 pdfdir = $(docdir)
 archdir = $(rubylibdir)/$(arch)
 sitearchdir = $(sitelibdir)/$(sitearch)
 datadir = $(datarootdir)
-localstatedir = $(prefix)/var
+localstatedir = $(DESTDIR)/var
 sitelibdir = $(sitedir)/$(ruby_version)
 
-CC = /usr/bin/gcc-4.0
+CC = gcc
 LIBRUBY = $(LIBRUBY_SO)
 LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
 LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
 LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
 
 RUBY_EXTCONF_H = 
-CFLAGS   =  -fno-common -O2 -arch i386  -fno-common -pipe -fno-common $(cflags) -arch i386
+CFLAGS   =  -fPIC -fno-strict-aliasing -g -g -O2  -fPIC $(cflags) 
 INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
 DEFS     = 
-CPPFLAGS = -DHAVE_RUBY_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
+CPPFLAGS = -DHAVE_RUBY_H  $(DEFS) $(cppflags)
 CXXFLAGS = $(CFLAGS) 
-ldflags  = -L. -L/opt/local/lib -arch i386
+ldflags  = -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic
 dldflags = 
-archflag = -arch i386
+archflag = 
 DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
-LDSHARED = $(CC) -dynamic -bundle -undefined suppress -flat_namespace
+LDSHARED = $(CC) -shared
 AR = ar
 EXEEXT = 
 
-RUBY_INSTALL_NAME = ruby
-RUBY_SO_NAME = ruby
-arch = i686-darwin9
-sitearch = i686-darwin9
+RUBY_INSTALL_NAME = ruby1.8
+RUBY_SO_NAME = ruby1.8
+arch = x86_64-linux
+sitearch = x86_64-linux
 ruby_version = 1.8
-ruby = /opt/local/bin/ruby
+ruby = /usr/bin/ruby1.8
 RUBY = $(ruby)
 RM = rm -f
 MAKEDIRS = mkdir -p
 extout_prefix = 
 target_prefix = 
 LOCAL_LIBS = 
-LIBS = $(LIBRUBYARG_SHARED)  -lpthread -ldl -lobjc  
-SRCS = ext.c match.c matcher.c
-OBJS = ext.o match.o matcher.o
+LIBS = $(LIBRUBYARG_SHARED)  -lpthread -lrt -ldl -lcrypt -lm   -lc
+SRCS = match.c ext.c matcher.c
+OBJS = match.o ext.o matcher.o
 TARGET = ext
-DLLIB = $(TARGET).bundle
+DLLIB = $(TARGET).so
 EXTSTATIC = 
 STATIC_LIB = 
 
 RUBYARCHDIR   = $(sitearchdir)$(target_prefix)
 
 TARGET_SO     = $(DLLIB)
-CLEANLIBS     = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
+CLEANLIBS     = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
 CLEANOBJS     = *.o *.a *.s[ol] *.pdb *.exp *.bak
 
 all:		$(DLLIB)

.vim/ruby/command-t/controller.rb

 
     def show
       # optional parameter will be desired starting directory, or ""
-      @path           = File.expand_path(VIM::evaluate('a:arg'), VIM::pwd)
+      @path           = File.expand_path(::VIM::evaluate('a:arg'), VIM::pwd)
       @finder.path    = @path
       @initial_window = $curwin
       @initial_buffer = $curbuf
       @focus          = @prompt
       @prompt.focus
       register_for_key_presses
-      clear # clears prompt and list matches
+      clear # clears prompt and lists matches
     rescue Errno::ENOENT
       # probably a problem with the optional parameter
       @match_window.print_no_such_file_or_directory
 
     def hide
       @match_window.close
-      if @initial_window.select
-        VIM::command "silent b #{@initial_buffer.number}"
+      if VIM::Window.select @initial_window
+        if @initial_buffer.number == 0
+          # upstream bug: buffer number misreported as 0
+          # see: https://wincent.com/issues/1617
+          ::VIM::command "silent b #{@initial_buffer.name}"
+        else
+          ::VIM::command "silent b #{@initial_buffer.number}"
+        end
       end
     end
 
     end
 
     def handle_key
-      key = VIM::evaluate('a:arg').to_i.chr
+      key = ::VIM::evaluate('a:arg').to_i.chr
       if @focus == @prompt
         @prompt.add! key
         list_matches
 
     def toggle_focus
       @focus.unfocus # old focus
-      if @focus == @prompt
-        @focus = @match_window
-      else
-        @focus = @prompt
-      end
+      @focus = @focus == @prompt ? @match_window : @prompt
       @focus.focus # new focus
     end
 
       @prompt.cursor_start if @focus == @prompt
     end
 
+    def leave
+      @match_window.leave
+    end
+
+    def unload
+      @match_window.unload
+    end
+
   private
 
     def set_up_max_height
         :scan_dot_directories   => get_bool('g:CommandTScanDotDirectories')
     end
 
+    def exists? name
+      ::VIM::evaluate("exists(\"#{name}\")").to_i != 0
+    end
+
     def get_number name
-      return nil if VIM::evaluate("exists(\"#{name}\")").to_i == 0
-      VIM::evaluate("#{name}").to_i
+      exists?(name) ? ::VIM::evaluate("#{name}").to_i : nil
     end
 
     def get_bool name
-      return nil if VIM::evaluate("exists(\"#{name}\")").to_i == 0
-      VIM::evaluate("#{name}").to_i != 0
+      exists?(name) ? ::VIM::evaluate("#{name}").to_i != 0 : nil
     end
 
     def get_string name
-      return nil if VIM::evaluate("exists(\"#{name}\")").to_i == 0
-      VIM::evaluate("#{name}").to_s
+      exists?(name) ? ::VIM::evaluate("#{name}").to_s : nil
+    end
+
+    # expect a string or a list of strings
+    def get_list_or_string name
+      return nil unless exists?(name)
+      list_or_string = ::VIM::evaluate("#{name}")
+      if list_or_string.kind_of?(Array)
+        list_or_string.map { |item| item.to_s }
+      else
+        list_or_string.to_s
+      end
+    end
+
+    def relative_path_under_working_directory path
+      # any path under the working directory will be specified as a relative
+      # path to improve the readability of the buffer list etc
+      pwd = File.expand_path(VIM::pwd) + '/'
+      path.index(pwd) == 0 ? path[pwd.length..-1] : path
     end
 
     # Backslash-escape space, \, |, %, #, "
       end
     end
 
+    def ensure_appropriate_window_selection
+      # normally we try to open the selection in the current window, but there
+      # is one exception:
+      #
+      # - we don't touch any "unlisted" buffer with buftype "nofile" (such as
+      #   NERDTree or MiniBufExplorer); this is to avoid things like the "Not
+      #   enough room" error which occurs when trying to open in a split in a
+      #   shallow (potentially 1-line) buffer like MiniBufExplorer is current
+      #
+      # Other "unlisted" buffers, such as those with buftype "help" are treated
+      # normally.
+      initial = $curwin
+      while true do
+        break unless ::VIM::evaluate('&buflisted').to_i == 0 &&
+          ::VIM::evaluate('&buftype').to_s == 'nofile'
+        ::VIM::command 'wincmd w'     # try next window
+        break if $curwin == initial # have already tried all
+      end
+    end
+
     def open_selection selection, options = {}
       command = options[:command] || default_open_command
       selection = File.expand_path selection, @path
+      selection = relative_path_under_working_directory selection
       selection = sanitize_path_string selection
-      VIM::command "silent #{command} #{selection}"
+      ensure_appropriate_window_selection
+      ::VIM::command "silent #{command} #{selection}"
     end
 
     def map key, function, param = nil
-      VIM::command "noremap <silent> <buffer> #{key} " \
+      ::VIM::command "noremap <silent> <buffer> #{key} " \
         ":call CommandT#{function}(#{param})<CR>"
     end
 
     def xterm?
-      !!(VIM::evaluate('&term') =~ /\Axterm/)
+      !!(::VIM::evaluate('&term') =~ /\Axterm/)
     end
 
     def vt100?
-      !!(VIM::evaluate('&term') =~ /\Avt100/)
+      !!(::VIM::evaluate('&term') =~ /\Avt100/)
     end
 
     def register_for_key_presses
         'CursorRight'           => ['<Right>', '<C-l>'],
         'CursorEnd'             => '<C-e>',
         'CursorStart'           => '<C-a>' }.each do |key, value|
-        if override = get_string("g:CommandT#{key}Map")
-          map override, key
+        if override = get_list_or_string("g:CommandT#{key}Map")
+          [override].flatten.each do |mapping|
+            map mapping, key
+          end
         else
           [value].flatten.each do |mapping|
             map mapping, key unless mapping == '<Esc>' && (xterm? || vt100?)

.vim/ruby/command-t/ext.c

 
     // methods
     rb_define_method(cCommandTMatcher, "initialize", CommandTMatcher_initialize, -1);
-    rb_define_method(cCommandTMatcher, "sorted_matches_for", CommandTMatcher_sorted_matchers_for, 2);
+    rb_define_method(cCommandTMatcher, "sorted_matches_for", CommandTMatcher_sorted_matches_for, 2);
     rb_define_method(cCommandTMatcher, "matches_for", CommandTMatcher_matches_for, 1);
 }
Add a comment to this file

.vim/ruby/command-t/ext.o

Binary file modified.

.vim/ruby/command-t/match.c

     for (long i = abbrev_idx; i < m->abbrev_len; i++)
     {
         char c = m->abbrev_p[i];
-        if (c >= 'A' && c <= 'Z')
-            c += 'a' - 'A'; // add 32 to downcase
-        else if (c == '.')
+        if (c == '.')
             dot_search = 1;
         int found = 0;
         for (long j = str_idx; j < m->str_len; j++, str_idx++)
     if (rb_scan_args(argc, argv, "21", &str, &abbrev, &options) == 2)
         options = Qnil;
     str             = StringValue(str);
-    abbrev          = StringValue(abbrev);
+    abbrev          = StringValue(abbrev); // already downcased by caller
 
     // check optional options hash for overrides
     VALUE always_show_dot_files = CommandT_option_from_hash("always_show_dot_files", options);
Add a comment to this file

.vim/ruby/command-t/match.o

Binary file modified.

.vim/ruby/command-t/match_window.rb

     @@selection_marker  = '> '
     @@marker_length     = @@selection_marker.length
     @@unselected_marker = ' ' * @@marker_length
+    @@buffer            = nil
 
     def initialize options = {}
       @prompt = options[:prompt]
 
       # save existing window dimensions so we can restore them later
       @windows = []
-      (0..(VIM::Window.count - 1)).each do |i|
-        window = OpenStruct.new :index => i, :height => VIM::Window[i].height
+      (0..(::VIM::Window.count - 1)).each do |i|
+        window = OpenStruct.new :index => i, :height => ::VIM::Window[i].height
         @windows << window
       end
 
       # global settings (must manually save and restore)
       @settings = Settings.new
-      VIM::set_option 'timeoutlen=0'    # respond immediately to mappings
-      VIM::set_option 'nohlsearch'      # don't highlight search strings
-      VIM::set_option 'noinsertmode'    # don't make Insert mode the default
-      VIM::set_option 'noshowcmd'       # don't show command info on last line
-      VIM::set_option 'report=9999'     # don't show "X lines changed" reports
-      VIM::set_option 'sidescroll=0'    # don't sidescroll in jumps
-      VIM::set_option 'sidescrolloff=0' # don't sidescroll automatically
-      VIM::set_option 'noequalalways'   # don't auto-balance window sizes
+      ::VIM::set_option 'timeout'         # ensure mappings timeout
+      ::VIM::set_option 'timeoutlen=0'    # respond immediately to mappings
+      ::VIM::set_option 'nohlsearch'      # don't highlight search strings
+      ::VIM::set_option 'noinsertmode'    # don't make Insert mode the default
+      ::VIM::set_option 'noshowcmd'       # don't show command info on last line
+      ::VIM::set_option 'report=9999'     # don't show "X lines changed" reports
+      ::VIM::set_option 'sidescroll=0'    # don't sidescroll in jumps
+      ::VIM::set_option 'sidescrolloff=0' # don't sidescroll automatically
+      ::VIM::set_option 'noequalalways'   # don't auto-balance window sizes
 
-      # create match window and set it up
+      # show match window
       split_location = options[:match_window_at_top] ? 'topleft' : 'botright'
-      split_command = "silent! #{split_location} 1split GoToFile"
-      [
-        split_command,
-        'setlocal bufhidden=delete',  # delete buf when no longer displayed
-        'setlocal buftype=nofile',    # buffer is not related to any file
-        'setlocal nomodifiable',      # prevent manual edits
-        'setlocal noswapfile',        # don't create a swapfile
-        'setlocal nowrap',            # don't soft-wrap
-        'setlocal nonumber',          # don't show line numbers
-        'setlocal nolist',            # don't use List mode (visible tabs etc)
-        'setlocal foldcolumn=0',      # don't show a fold column at side
-        'setlocal nocursorline',      # don't highlight line cursor is on
-        'setlocal nospell',           # spell-checking off
-        'setlocal nobuflisted',       # don't show up in the buffer list
-        'setlocal textwidth=0'        # don't hard-wrap (break long lines)
-      ].each { |command| VIM::command command }
+      if @@buffer # still have buffer from last time
+        ::VIM::command "silent! #{split_location} #{@@buffer.number}sbuffer"
+        raise "Can't re-open GoToFile buffer" unless $curbuf.number == @@buffer.number
+        $curwin.height = 1
+      else        # creating match window for first time and set it up
+        split_command = "silent! #{split_location} 1split GoToFile"
+        [
+          split_command,
+          'setlocal bufhidden=unload',  # unload buf when no longer displayed
+          'setlocal buftype=nofile',    # buffer is not related to any file
+          'setlocal nomodifiable',      # prevent manual edits
+          'setlocal noswapfile',        # don't create a swapfile
+          'setlocal nowrap',            # don't soft-wrap
+          'setlocal nonumber',          # don't show line numbers
+          'setlocal nolist',            # don't use List mode (visible tabs etc)
+          'setlocal foldcolumn=0',      # don't show a fold column at side
+          'setlocal foldlevel=99',      # don't fold anything
+          'setlocal nocursorline',      # don't highlight line cursor is on
+          'setlocal nospell',           # spell-checking off
+          'setlocal nobuflisted',       # don't show up in the buffer list
+          'setlocal textwidth=0'        # don't hard-wrap (break long lines)
+        ].each { |command| ::VIM::command command }
 
-      # sanity check: make sure the buffer really was created
-      raise "Can't find buffer" unless $curbuf.name.match /GoToFile/
+        # sanity check: make sure the buffer really was created
+        raise "Can't find GoToFile buffer" unless $curbuf.name.match /GoToFile\z/
+        @@buffer = $curbuf
+      end
 
       # syntax coloring
       if VIM::has_syntax?
-        VIM::command "syntax match CommandTSelection \"^#{@@selection_marker}.\\+$\""
-        VIM::command 'syntax match CommandTNoEntries "^-- NO MATCHES --$"'
-        VIM::command 'syntax match CommandTNoEntries "^-- NO SUCH FILE OR DIRECTORY --$"'
-        VIM::command 'highlight link CommandTSelection Visual'
-        VIM::command 'highlight link CommandTNoEntries Error'
-        VIM::evaluate 'clearmatches()'
+        ::VIM::command "syntax match CommandTSelection \"^#{@@selection_marker}.\\+$\""
+        ::VIM::command 'syntax match CommandTNoEntries "^-- NO MATCHES --$"'
+        ::VIM::command 'syntax match CommandTNoEntries "^-- NO SUCH FILE OR DIRECTORY --$"'
+        ::VIM::command 'highlight link CommandTSelection Visual'
+        ::VIM::command 'highlight link CommandTNoEntries Error'
+        ::VIM::evaluate 'clearmatches()'
 
         # hide cursor
         @cursor_highlight = get_cursor_highlight
         hide_cursor
       end
 
+      # perform cleanup using an autocmd to ensure we don't get caught out
+      # by some unexpected means of dismissing or leaving the Command-T window
+      # (eg. <C-W q>, <C-W k> etc)
+      ::VIM::command 'autocmd! * <buffer>'
+      ::VIM::command 'autocmd BufLeave <buffer> ruby $command_t.leave'
+      ::VIM::command 'autocmd BufUnload <buffer> ruby $command_t.unload'
 
       @has_focus  = false
       @selection  = nil
       @abbrev     = ''
       @window     = $curwin
-      @buffer     = $curbuf
     end
 
     def close
-      VIM::command "bwipeout! #{@buffer.number}"
+      # Workaround for upstream bug in Vim 7.3 on some platforms
+      #
+      # On some platforms, $curbuf.number always returns 0. One workaround is
+      # to build Vim with --disable-largefile, but as this is producing lots of
+      # support requests, implement the following fallback to the buffer name
+      # instead, at least until upstream gets fixed.
+      #
+      # For more details, see: https://wincent.com/issues/1617
+      if $curbuf.number == 0
+        # use bwipeout as bunload fails if passed the name of a hidden buffer
+        ::VIM::command 'bwipeout! GoToFile'
+        @@buffer = nil
+      else
+        ::VIM::command "bunload! #{@@buffer.number}"
+      end
+    end
+
+    def leave
+      close
+      unload
+    end
+
+    def unload
       restore_window_dimensions
       @settings.restore
       @prompt.dispose
       unless @has_focus
         @has_focus = true
         if VIM::has_syntax?
-          VIM::command 'highlight link CommandTSelection Search'
+          ::VIM::command 'highlight link CommandTSelection Search'
         end
       end
     end
       if @has_focus
         @has_focus = false
         if VIM::has_syntax?
-          VIM::command 'highlight link CommandTSelection Visual'
+          ::VIM::command 'highlight link CommandTSelection Visual'
         end
       end
     end
   private
 
     def print_error msg
-      return unless @window.select
+      return unless VIM::Window.select(@window)
       unlock
       clear
       @window.height = 1
-      @buffer[1] = "-- #{msg} --"
+      @@buffer[1] = "-- #{msg} --"
       lock
     end
 
       # preventing windows on the side of vertical splits from regaining
       # their original full size
       @windows.each do |w|
-        VIM::Window[w.index].height = w.height
+        # beware: window may be nil
+        window = ::VIM::Window[w.index]
+        window.height = w.height if window
       end
     end
 
 
     # Print just the specified match.
     def print_match idx
-      return unless @window.select
+      return unless VIM::Window.select(@window)
       unlock
-      @buffer[idx + 1] = match_text_for_idx idx
+      @@buffer[idx + 1] = match_text_for_idx idx
       lock
     end
 
       if match_count == 0
         print_error 'NO MATCHES'
       else
-        return unless @window.select
+        return unless VIM::Window.select(@window)
         unlock
         clear
         actual_lines = 1
         @window.height = actual_lines
         (1..actual_lines).each do |line|
           idx = line - 1
-          if @buffer.count >= line
-            @buffer[line] = match_text_for_idx idx
+          if @@buffer.count >= line
+            @@buffer[line] = match_text_for_idx idx
           else
-            @buffer.append line - 1, match_text_for_idx(idx)
+            @@buffer.append line - 1, match_text_for_idx(idx)
           end
         end
         lock
       # range = % (whole buffer)
       # action = d (delete)
       # register = _ (black hole register, don't record deleted text)
-      VIM::command 'silent %d _'
+      ::VIM::command 'silent %d _'
     end
 
     def get_cursor_highlight
       # as :highlight returns nothing and only prints,
       # must redirect its output to a variable
-      VIM::command 'silent redir => g:command_t_cursor_highlight'
+      ::VIM::command 'silent redir => g:command_t_cursor_highlight'
 
       # force 0 verbosity to ensure origin information isn't printed as well
-      VIM::command 'silent! 0verbose highlight Cursor'
-      VIM::command 'silent redir END'
+      ::VIM::command 'silent! 0verbose highlight Cursor'
+      ::VIM::command 'silent redir END'
 
       # there are 3 possible formats to check for, each needing to be
       # transformed in a certain way in order to reapply the highlight:
       #   Cursor xxx guifg=bg guibg=fg      -> :hi! Cursor guifg=bg guibg=fg
       #   Cursor xxx links to SomethingElse -> :hi! link Cursor SomethingElse
       #   Cursor xxx cleared                -> :hi! clear Cursor
-      highlight = VIM::evaluate 'g:command_t_cursor_highlight'
+      highlight = ::VIM::evaluate 'g:command_t_cursor_highlight'
       if highlight =~ /^Cursor\s+xxx\s+links to (\w+)/
         "link Cursor #{$~[1]}"
       elsif highlight =~ /^Cursor\s+xxx\s+cleared/
 
     def hide_cursor
       if @cursor_highlight
-        VIM::command 'highlight Cursor NONE'
+        ::VIM::command 'highlight Cursor NONE'
       end
     end
 
     def show_cursor
       if @cursor_highlight
-        VIM::command "highlight #{@cursor_highlight}"
+        ::VIM::command "highlight #{@cursor_highlight}"
       end
     end
 
     def lock
-      VIM::command 'setlocal nomodifiable'
+      ::VIM::command 'setlocal nomodifiable'
     end
 
     def unlock
-      VIM::command 'setlocal modifiable'
+      ::VIM::command 'setlocal modifiable'
     end
   end
 end

.vim/ruby/command-t/matcher.c

     return Qnil;
 }
 
-VALUE CommandTMatcher_sorted_matchers_for(VALUE self, VALUE abbrev, VALUE options)
+VALUE CommandTMatcher_sorted_matches_for(VALUE self, VALUE abbrev, VALUE options)
 {
     // process optional options hash
     VALUE limit_option = CommandT_option_from_hash("limit", options);
 
     // apply optional limit option
     long limit = NIL_P(limit_option) ? 0 : NUM2LONG(limit_option);
-    if (limit == 0 || RARRAY_LEN(matches)< limit)
+    if (limit == 0 || RARRAY_LEN(matches) < limit)
         limit = RARRAY_LEN(matches);
 
     // will return an array of strings, not an array of Match objects
         options = rb_hash_new();
         rb_hash_aset(options, ID2SYM(rb_intern("never_show_dot_files")), never_show_dot_files);
     }
+    abbrev = rb_funcall(abbrev, rb_intern("downcase"), 0);
     VALUE paths = rb_funcall(scanner, rb_intern("paths"), 0);
     for (long i = 0, max = RARRAY_LEN(paths); i < max; i++)
     {

.vim/ruby/command-t/matcher.h

 #include <ruby.h>
 
 extern VALUE CommandTMatcher_initialize(int argc, VALUE *argv, VALUE self);
-extern VALUE CommandTMatcher_sorted_matchers_for(VALUE self, VALUE abbrev, VALUE options);
+extern VALUE CommandTMatcher_sorted_matches_for(VALUE self, VALUE abbrev, VALUE options);
 
 // most likely the function will be subsumed by the sorted_matcher_for function
 extern VALUE CommandTMatcher_matches_for(VALUE self, VALUE abbrev);
Add a comment to this file

.vim/ruby/command-t/matcher.o

Binary file modified.

.vim/ruby/command-t/mkmf.log

 have_header: checking for ruby.h... -------------------- yes
 
-"/usr/bin/gcc-4.0 -E -I. -I/opt/local/lib/ruby/1.8/i686-darwin9 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -O2 -arch i386  -fno-common -pipe -fno-common    conftest.c -o conftest.i"
+"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I.    -fno-strict-aliasing -g -g -O2  -fPIC    conftest.c -o conftest.i"
 checked program was:
 /* begin */
 1: #include <ruby.h>

.vim/ruby/command-t/prompt.rb

     # Erase whatever is displayed in the prompt line,
     # effectively disposing of the prompt
     def dispose
-      VIM::command 'echo'
-      VIM::command 'redraw'
+      ::VIM::command 'echo'
+      ::VIM::command 'redraw'
     end
 
     # Clear any entered text.
       # see ':help :echo' for why forcing a redraw here helps
       # prevent the status line from getting inadvertantly cleared
       # after our echo commands
-      VIM::command 'redraw'
+      ::VIM::command 'redraw'
       while (highlight = args.shift) and  (text = args.shift) do
         text = VIM::escape_for_single_quotes text
-        VIM::command "echohl #{highlight}"
-        VIM::command "echon '#{text}'"
+        ::VIM::command "echohl #{highlight}"
+        ::VIM::command "echon '#{text}'"
       end
-      VIM::command 'echohl None'
+      ::VIM::command 'echohl None'
     end
   end # class Prompt
 end # module CommandT

.vim/ruby/command-t/scanner.rb

 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 # POSSIBILITY OF SUCH DAMAGE.
 
-require 'vim'
+require 'command-t/vim'
 
 module CommandT
   # Reads the current directory recursively for the paths to all regular files.
       # first strip common prefix (@path) from path to match VIM's behavior
       path = path[(@prefix_len + 1)..-1]
       path = VIM::escape_for_single_quotes path
-      VIM::evaluate("empty(expand(fnameescape('#{path}')))").to_i == 1
+      ::VIM::evaluate("empty(expand(fnameescape('#{path}')))").to_i == 1
     end
 
     def add_paths_for_directory dir, accumulator

.vim/ruby/command-t/settings.rb

       @report         = get_number 'report'
       @sidescroll     = get_number 'sidescroll'
       @sidescrolloff  = get_number 'sidescrolloff'
+      @timeout        = get_bool 'timeout'
       @equalalways    = get_bool 'equalalways'
       @hlsearch       = get_bool 'hlsearch'
       @insertmode     = get_bool 'insertmode'
       set_number 'report', @report
       set_number 'sidescroll', @sidescroll
       set_number 'sidescrolloff', @sidescrolloff
+      set_bool 'timeout', @timeout
       set_bool 'equalalways', @equalalways
       set_bool 'hlsearch', @hlsearch
       set_bool 'insertmode', @insertmode
   private
 
     def get_number setting
-      VIM::evaluate("&#{setting}").to_i
+      ::VIM::evaluate("&#{setting}").to_i
     end
 
     def get_bool setting
-      VIM::evaluate("&#{setting}").to_i == 1
+      ::VIM::evaluate("&#{setting}").to_i == 1
     end
 
     def set_number setting, value
-      VIM::set_option "#{setting}=#{value}"
+      ::VIM::set_option "#{setting}=#{value}"
     end
 
     def set_bool setting, value
       if value
-        VIM::set_option setting
+        ::VIM::set_option setting
       else
-        VIM::set_option "no#{setting}"
+        ::VIM::set_option "no#{setting}"
       end
     end
   end # class Settings

.vim/ruby/command-t/stub.rb

   private
 
     def warn *msg
-      VIM::command 'echohl WarningMsg'
-      msg.each { |m| VIM::command "echo '#{m}'" }
-      VIM::command 'echohl none'
+      ::VIM::command 'echohl WarningMsg'
+      msg.each { |m| ::VIM::command "echo '#{m}'" }
+      ::VIM::command 'echohl none'
     end
   end # class Stub
 end # module CommandT
 set viminfo='1000,f1,<500,
 
 " Spell checking
-set spell    
+"set spell    
 
 " Mouse is on all the time
 set mouse=a
 " NERDTree
 map <leader>d :execute 'NERDTreeToggle ' . getcwd()<CR>
 
-" MiniBufExplorer
-map <leader>b :TMiniBufExplorer<CR>
+" buftabs
+set laststatus=2
+:let g:buftabs_in_statusline=1
+:let g:buftabs_active_highlight_group="Visual"
 
-let g:miniBufExplVSplit = 20
-let g:miniBufExplMaxSize = 40
-
-" Tab actually completes in insert
-function! CleverTab()
-    if pumvisible()
-        return "\<C-N>"
-    endif
-    if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$'
-        return "\<Tab>"
-    elseif exists('&omnifunc') && &omnifunc != ''
-        return "\<C-X>\<C-O>"
-    else
-        return "\<C-N>"
-    endif
-endfunction
-inoremap <Tab> <C-R>=CleverTab()<CR>
+" Makefiles need special tab handling
+:autocmd BufEnter *akefile* :set noexpandtab
+:autocmd BufEnter *akefile* :set tw=0
+:autocmd BufEnter *.mk :set noexpandtab
+:autocmd BufEnter *.mk :set tw=0
 if [[ $ARCH == "Darwin"* ]]; then
     alias locate="mdfind -name"
 fi
+
+if [[ $ARCH == "SunOS"* ]]; then
+    if [[ $TERM == "xterm-256color" ]]; then
+        export TERM=xterm-color
+    fi        
+fi
-# Path to your oh-my-zsh configuration.
-export ZSH=$HOME/.oh-my-zsh
+## Prompt
+autoload -U colors; colors
+setopt PROMPT_SUBST
+PROMPT='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%~ %{$reset_color%}%(!.#.$) '
 
-# Set to the name theme to load.
-# Look in ~/.oh-my-zsh/themes/
-export ZSH_THEME="jt"
+## ls colors
+export LSCOLORS="Gxfxcxdxbxegedabagacad"
+# Find the option for using colors in ls, depending on the version: Linux or BSD
+ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G'
 
-# Set to this to use case-sensitive completion
-export CASE_SENSITIVE="true"
+## Completion
+setopt auto_menu
+#setopt complete_in_word
+setopt always_to_end
 
-# Comment this out to disable weekly auto-update checks
-export DISABLE_AUTO_UPDATE="true"
+#WORDCHARS=''
+#autoload -U compinit
+#compinit -i
 
-source $ZSH/oh-my-zsh.sh
+# Disable flowcontrol keys
+unsetopt flowcontrol
+
+## History
+# number of lines kept in history
+export HISTSIZE=10000
+# number of lines saved in the history after logout
+export SAVEHIST=10000
+# location of history
+export HISTFILE=~/.zhistory
+# append command to history file once executed
+setopt inc_append_history
+
+
+
+
 
 # Prepend /opt/local/bin if it exists (MacPorts on Darwin)
 if [ -d /opt/local/bin ]; then
-    PATH=$PATH:/opt/local/bin
+    PATH=/opt/local/bin:$PATH
 fi
 
 # Always prepend /usr/local/bin
 PATH=/usr/local/bin:$PATH
 
 # And always prepend architecture specific bin directory under $HOME, as well
-PATH=$HOME/arch/$ARCH/bin:$PATH
+PATH=$HOME/arch/$ARCH/bin:$HOME/bin:$PATH
 
 PYTHONUSERBASE=$HOME/arch/$ARCH
 #LD_LIBRARY_PATH=$HOME/arch/$ARCH/lib:$LD_LIBRARY_PATH
 
-export ARCH PATH PYTHONUSERBASE LD_LIBRARY_PATH
+# I don't automatically add this to the path, but a nice variable to have
+SW=/aut/proj/bx/sw/arch/$ARCH
+
+export ARCH PATH PYTHONUSERBASE LD_LIBRARY_PATH SW
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.