Vim: add s:tmux and s:iterm variables

I am about to try to get FocusGained and FocusLost events working, to
take advantage of the per-pane focus events that have been added in tmux
1.8.

Create some named variables for convenient re-use.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim/Tmux: more refactoring of insert mode cursor handling

Based on snippets from:

  https://github.com/akracun/vitality.vim/blob/master/plugin/vitality.vim
  https://gist.github.com/1195581

This is an intermediate step towards getting cursor handling and focus
events working magically.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: hook up focus/enter events

This is largely stolen from:

  https://github.com/akracun/vitality.vim/blob/master/plugin/vitality.vim

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: don't complain about command-mode FocusGained autocmd

Apparently Vim doesn't want us to run `checktime` from within this
context, as it prints:

  E523: Not allowed here:   checktime

Rather than skipping the mapping entirely in command mode, let's just
swallow the error, er, gracefully.

For more info on how `checktime` behaves when run inside an autocmd, see
`:h :checktime`.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: remove ttymouse hack

For some reason that I never fully understood, the `set ttymouse`
directive wasn't sticking, so I had to keep resetting it from an
autocmd. Perhaps it was an interaction with some plug-in I was using, or
something that only manifesting under other versions of iTerm or tmux or
Vim.

Whatever the cause, it no longer seems to be an issue, so remove the
hack.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Slate: uncomment "test" bindings

While it's true that I don't make layout changes very often, I've found
that occasionally I want to force a reset rather than relying on the
auto-layout feature.

For example, I am not entirely sure it works if I plug in an external
monitor while the screensaver is active.

So, let's promote these to "always available" status by uncommenting
them.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: when clearing highlighting, clear prompt area as well

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: add hack for indicating iTerm-ness on remote hosts

At my work, our sshd is locked down to with PermitUserEnvironment at the
default value of false. Furthermore, the list of AllowEnv variables is
also locked down fairly tight (LANG, LC_* and such).

This means that ITERM_PROFILE, the way that the .vimrc is detecting that
it's running inside iTerm 2, is not getting passed along.

I'll see if I can get the sshd_config modified at work, but in the
meantime, rather than abusing one of the permitted variables to pass
along the hint that iTerm is running, I'm adding this other hack; a
"dot" file that I can touch whenever I want Vim to know that iTerm is on
the scene.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: drop 'nocompatible' setting

According to `:h compatible-default`, the mere presence of a ~/.vimrc
file makes 'nocompatible' take effect.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: move filetype config into ~/.vim/ftplugin

Clear some cruft out of the ~/.vimrc by moving it into filetype-specific
files under ~/.vim/ftplugin/.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: don't show folds in Git commit messages

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: move stuff from ~/.vimrc to ~/.vim/ftdetect

Again, in the spirit of thinning out a ~/.vimrc that is becoming
unwieldy and large.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: move Command-T config into a separate file

Part of the crusade to thin down my ~/.vimrc.

Since I originally added this config, something has changed in my
environment, and I no longer need to explicitly tell Command-T about
how the terminal sends the up and down cursor keys.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: move a.vim configuration into .vim/after/plugin/a.vim

Another two lines in the .vimrc bite the dust. It's still too big, but
we're getting there.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: move some Git-specific config into ftplugin/gitcommit.vim

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: adding some more feature detection

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: move MatchParen overwrite to ToggleVisibility function

This gives us an albeit indirect way to restore the MatchParen override
with a mapping.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Vim: overhaul color handling

<leader>w now cycles though:

  Solarized light, low visibility
  Solarized light, high visibility
  Solarized dark, low visibility
  Solarized dark, high visibility

and the MatchParen highlight overriding now works equally well for both
light and dark backgrounds.

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