| Path: | README |
| Last Update: | Wed Sep 26 20:48:58 -0400 2007 |
VimMate is a graphical add-on to Vim with IDE-like features: it does more than the plain Vim while still being lightweight. Even with the additional features, it stays out of the way for it‘s main task: editing files with Vim. VimMate adds functionality to Vim by embedding Vim GTK GUI (gVim) within VimMate.
Some of the ideas of VimMate comes from PIDA and others from TextMate (although I‘ve never used TextMate).
VimMate‘s homepage: vimmate.rubyforge.org
VimMate has the following features:
VimMate has only been tested under Linux (in fact, Gentoo Linux). It might work under other OSs, although I do not know. I think only the file list will work under Windows because Vim does not use GTK under Windows so it cannot be embedded. I know nothing about MacOSX so I cannot say if it works or not.
To install:
Run vimmate —help for more information.
Note that you don‘t have to do what‘s described in this section: everything will work anyway. It‘s just filled with nice tricks.
VimMate doesn‘t need any special configuration to run. But, when VimMate is first run, it creates a file named .vimmaterc in your HOME directory. You can edit this file at your own risk. If anything goes wrong, you can always delete this file and it will be recreated with the default configuration.
Most variables are self explanatory. One variable deserves a special explanation because it can be useful to change. It‘s the line that starts with :terminals_autoexec:. This line specifies a string that is automatically executed by every terminals that are created by VimMate. I‘m sure you can think about a way to use this, but the idea of this configuration line is to initialize the terminal so that it can execute Vim (the console vim) without weird warnings about escape characters. Here is how to configure it so that it works without warnings with the bash shell:
# Other configurations before... # (Because of a small quirk in rdoc, I put a space between the # colon (:) and terminals_autoexec but there must be no space.) : terminals_autoexec: | export TERM="gnome" clear # Other configurations after...
You can adapt those commands for your shell. If you wonder about the syntax of this file, it‘s a Ruby hash with Ruby symbols as keys dumped with YAML.
If you have problems getting it to work, watch out for whitespace because YAML is whitespace sensitive (like python). If you still can‘t get it to work, try running this in a shell:
ruby -ryaml -e 'puts({:terminals_autoexec => %{export TERM="gnome"\nclear}}.to_yaml)'
You can redirect the output of this command to overwrite your .vimmaterc file and then run VimMate: it should work this time.
An other nice trick is to add a special alias that exists only within VimMate‘s terminals (Thanks to Jonathan Hankins for this updated tip, see #13432 for details):
# Other configurations before... # (Because of a small quirk in rdoc, I put a space between the # colon (:) and terminals_autoexec but there must be no space.) : terminals_autoexec: | alias vm='gvim --servername $(gvim --serverlist | grep "VIMMATE_$PPID") --remote-tab' export TERM="gnome" clear # Other configurations after...
Again, you have to adapt for your shell because this is for bash. This will also only works if you have only one VimMate running. This will allow you to type
vm a_file
to edit a_file with the running VimMate. This can be handy for those who prefer the command line to the file tree.
If you use Subversion (SVN), you can add yet an other line to be able to edit your commit messages within VimMate:
# Other configurations before... # (Because of a small quirk in rdoc, I put a space between the # colon (:) and terminals_autoexec but there must be no space.) : terminals_autoexec: | alias vm='gvim --servername $(gvim --serverlist | grep "VIMMATE_$PPID") --remote-tab' export SVN_EDITOR='gvim --servername `gvim --serverlist | grep VIMMATE_` --remote-wait' export TERM="gnome" clear # Other configurations after...
Then, when you run:
svn commit
the commit message will be edited within VimMate and Subversion will wait for the buffer containing the file to be deleted with the command
:bd
within Vim.
Here are some of the Vim scripts that I think are useful with VimMate to make Vim more powerful:
There are a lot of other nice script out there so check Vim's web site for more scripts.
Here is a list of the various shortcut keys:
Thanks to Florian Frank who sent me a patch for the first 5 shortcuts. The other shortcuts where also added thanks to this patch by Florian Frank. (Note that if there are bugs in the processing of those shortcut keys, it‘s probably my fault and not is.)
VimMate was written and is Copyright (C) 2006 Guillaume Benny
See COPYING for more information.