Added a new option CommandTMatchWindowReverse

This allows you to reverse the order of the matches, bottom being
closest match instead of top.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Don't needlessly redisplay list when showing reversed lists

The "matches != @matches" comparison would spuriously pass for reversed
lists, except for the case where the list contains only 1 match, because
we were comparing the unreversed list with the reversed list.

So, reverse the list before doing the comparison, thus avoiding
unnecessary reprinting of the matches when the match list is unchanged.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Add Steven Moazami to the README credits

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Fix alignment problems in help text

While these tweaks actually make the help text look worse when viewed as
plain text, they correct alignment problems when rendered inside Vim
itself as a help document (where some of the markup characters become
invisible).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Fix typo/logic: "on" should be "off"

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Swap README.txt and doc/command-t.txt.

Make doc/command-t.txt the real file to make helptags work on
Windows.

Originally README.txt was a symlink, but GitHub didn't follow symlinks,
so things were swapped. Now, it does, so there's no penalty in swapping
back.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Add Daniel Hahler to README credits

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Added command-t.gemspec and :gem, :install targets to Rakefile

This will allow other applications to use Command-T ruby binding.
Currently another app uses it besides Command-T vim plugin itself:

mrT [http://github.com/vic/mrT] - Curses based file completion
                                  for the command line.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Warn about making non-release gems

Abbreviating the full version number of an intermediate build (eg.
"1.1b2-10-g61a374a") to the last tag (eg. "1.1b2") is evil, because it
means we end up labelling distinct versions of the software with the
same version number.

Unfortuantely, however, it is a necessary evil because RubyGems will
choke if passed an intermediate version number:

  Invalid gemspec in [command-t.gemspec]: Malformed version number string
  1.1b2-10-g61a374a
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `mark_version' for nil:NilClass
      rake aborted!

So, we resort to using the abbreviated, misleading version number in
this case. We can at least mitigate this evilness by displaying a
warning if the user ever tries to build a gem for an intermediate
release, by adding a dependency on the ":check_tag" task.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Clarify RubyGem description

Add a paragraph explaining that Command-T is a Vim plug-in first and
foremost, and that full functionality is only available when installed
as a Vim plug-in, but that it is also packaged as a RubyGem so that
third-party applications can make use of the search algorithm.
Add 'push' task for publishing to Gemcutter

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Add Victor Hugo Borja to the README credits

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Update docs for 1.2 release

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Shorten description in gemspec

The long description looks terrible on the RubyGems.org website, so trim
it down to the bare minimum.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Fix botched commit 2328b94

We were supposed to swap the symlink and the file; ie:

  README.txt (real file)
  doc/command-t.txt (symlink)

Was supposed to become:

  README.txt (symlink)
  doc/command-t.txt (real file)

But we ended up adding a duplicate copy of the documentation:

  README.txt (symlink to doc/README.txt)
  doc/README.txt (real file)
  doc/command-t.txt (real file)

This commit fixes that, removing the redundant doc/README.txt and making
sure that doc/command-t.txt contains all recent changes.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Rakefile: update "help" task with info about new tasks

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Move cursor to selected line in match window

In GUI Vim (eg MacVim) the cursor correctly hides, but when running in a
terminal it does not. By moving the cursor to the currently selected
line we at least minimize the visual distraction when it starts
blinking (at least it draws the eye to the selected line rather than
blinking in the upper-left corner).

For related discussion see:

  https://github.com/pMongoose/Command-T/commit/7e3e5f96b0bc5a2dfe4fd891c4ee0f77eb752332

It may be possible to teach some kinds of terminal, such as xterm, to
actually hide the cursor, but that will be a task for later development:

  http://vim.wikia.com/wiki/Configuring_the_cursor

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Extract cursor movement into separate method

This is more intention-revealing.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Update docs for 1.2.1 release

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Remove "install" Rake task as it is causing confusion

Looks like some people/scripts saw the "rake install" task and thought
that was the way to install the Command-T plug-in in Vim, but it is not:

  https://github.com/carlhuda/janus/issues/163

Remove the task to avoid such confusion. People who want to install the
Gem can still do so with "gem install command-t", which is easy enough.

(And to anyone reading this commit message, note that the gem was added
so that third-parties could access the Command-T matching algorithm from
outside of Vim, but to get the full functionality from inside Vim, you
must continue to install it as always, as a Vim plug-in and not as a
gem. See the docs for how to do this.)

Signed-off-by: Wincent Colaiuta <win@wincent.com>