Ⅰ. 插件描述
snipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'nviennot/snipmate-vim-state-of-grace'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'nviennot/snipmate-vim-state-of-grace'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'nviennot/snipmate-vim-state-of-grace'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/nviennot/snipmate.vim
Ⅳ. 文档说明
============
snipmate.vim
:Author: Michael Sanders_
:Maintainer: Rok Garbas_
:Homepage: http://www.vim.org/scripts/script.php?script_id=2540
:Contributors: MarcWeber, lilydjwg_, henrik_, steveno_, asymmetric_, jherdman_, ironcamel_, honza_, jb55_, robhudson_, kozo2_, MicahElliott_, darkwise_, redpill_, thisgeek_, sickill_, pose_, marutanm_, r00k_, jbernard_, holizz_, muffinresearch_, statik_, Eustaquio Rangel, alderz
.. contents::
Why forking snipMate?
::
After several unsuccessful attempts of contacting Michael Sanders, no
commits in last half year and long pull request line on github (none of
pull requests were commented/replied/rejected) I decided to take action,
step up and bring some love to this widely used plugin.
But nothing to worry about. We all get busy, accupied with our daily work
or just lose interest in doing boring maintainance.
While reviewing pull requests on github.com/msanders I found lots of great
improvements and I decided to **friendly** fork it, review and apply patches
that were sent, notify all the patch submitters and decided to maintain
snipmate.vim from now on. Of course if somebody wants to
help, please do not hesitate to write me, I am open to any suggestions.
Maybe I will only maintain it for a while until Michael Sanders takes things
back into his hand or until some other super-hero shows up.
Tnx and happy snipmating, Rok Garbas, 2011-02-02
Changelog
1.0 [Unreleased]
* Updated README: added contributors, instructions how to install snipMate,
some spellchecking of my wonderfull english, added this Changelog
[2011-02-07, `garbas`_]
* From below mentioned merges I must specially mention `MarcWeber`_'s patch
which brought quite a few functionalities/improvements:
- snippets are loaded lazily.
- snippets are no longer cached. Thus you always get the snippets you
just wrote to a file without reloading anything.
- When visually selecting a snippet in a .snippets file you can press
<cr> to replace spaces by tabs automatically in a smart way.
Big +1 to `MarcWeber`_ for this. Important to note is that we now depend
on `vim-addon-mw-utils`_ and `tlib`_.
[2011-02-02, `garbas`_]
* Merged pull requests of `MarcWeber`_, `lilydjwg`_, `henrik`_, `steveno`_,
`asymmetric`_, `jherdman`_, `ironcamel`_, `honza`_, `jb55`_,
`robhudson`_, `kozo2`_, `MicahElliott`_, `darkwise`_, `redpill`_,
`thisgeek`_, `sickill`_, `pose`_,
[2011-02-02, `garbas`_]
0.83 [2009-07-13]
* last release done by `Michael Sanders`_, you can find it here:
http://www.vim.org/scripts/download_script.php?src_id=11006
How to install
Unfortunatly there are many ways to how to install vim plugins. If you don't
see you prefered way of installation plugins please consider adding updating
this section.
snipate dependencies
Important to note is that since version 1.0 we depend on this 2 vim plugins:
* `vim-addon-mw-utils`_ providing the implementation for caching parsed
.snippets files.
* `tlib`_ for tlib#input#List which provides the excellent filterable
list selection view (and more).
Using VAM_
::
Add snipmate to the names to be installed. Or use "github:name/repo" if you
want to use a non standard upstream.
VAM will also fetch the dependencies listed above for you automatically.
Using pathogen and git submodule
::
% cd ~/.vim
% mkdir bundle -p
% git submodule add git://github.com/garbas/vim-snipmate.git bundle/snipmate
Then install any dependencies (see above).
Using Vundle_
::
Install dependencies:
Bundle "git://github.com/MarcWeber/vim-addon-mw-utils.git"
Bundle "git://github.com/tomtom/tlib_vim.git"
Install:
Bundle "git://github.com/garbas/snipmate.vim.git"
And :BundleInstall
Manually
::
% git clone git://github.com/msanders/snipmate.vim.git
% cd snipmate.vim
% cp -R * ~/.vim
Then in vim::
:helptags ~/.vim/doc/
Then install any dependencies (see above).
TODO / Future
* Notify all "forkers" about new home and ask them nicely to review already
merged changes and possibly send their changes.
[2011-02-07, `garbas`_]
* I'd like to investigate whether xptemplate or snipmate has the better
engine. So maybe my vision of the future could be making xptemplate read
snippet files. It is not important enough for me to work on it right now as
snipmate works reasonable well for me.
[2011-02-02, `MarcWeber`_]
* Split core from snippets. Then reviewing patches and updates will be easier?
Snippets should be distributed in additional repositories. Eg
snipmate-snippets-ruby
snipmate-snippets-vim
snipmate-snippets-....
One repo containing snippets is:
git://github.com/scrooloose/snipmate-snippets.git
comment without verifying it:
< Silex> MarcWeber: btw, check out ultisnips. Much better than snipmate imho
And before this discussion xptemplate vs snipmate vs ultisnips .. continues
we should create a wiki page comparing them and keep that up to date.
If you volunteer tell me so that I can reference the link.
[2011-02-02, `MarcWeber`_]
.. _Michael Sanders: http://www.vim.org/account/profile.php?user_id=16544
.. _Rok Garbas: rok@garbas.si
.. _VAM: https://github.com/MarcWeber/vim-addon-manager
.. _pathogen: http://www.vim.org/scripts/script.php?script_id=2332
.. _git submodule: http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html
.. _vim-addon-mw-utils: https://github.com/MarcWeber/vim-addon-mw-utils
.. _tlib: https://github.com/tomtom/tlib_vim
.. _garbas: https://github.com/garbas
.. _MarcWeber: https://github.com/MarcWeber
.. _lilydjwg: https://github.com/lilydjwg
.. _henrik: https://github.com/henrik
.. _steveno: https://github.com/steveno
.. _asymmetric: https://github.com/asymmetric
.. _jherdman: https://github.com/jherdman
.. _ironcamel: https://github.com/ironcamel
.. _honza: https://github.com/honza
.. _jb55: https://github.com/jb55
.. _robhudson: https://github.com/robhudson
.. _kozo2: https://github.com/kozo2
.. _MicahElliott: https://github.com/MicahElliott
.. _darkwise: https://github.com/darkwise
.. _redpill: https://github.com/redpill
.. _thisgeek: https://github.com/thisgeek
.. _sickill: https://github.com/sickill
.. _pose: https://github.com/pose
.. _marutanm: https://github.com/marutanm
.. _r00k: https://github.com/r00k
.. _jbernard: https://github.com/jbernard
.. _holizz: https://github.com/holizz
.. _muffinresearch: https://github.com/muffinresearch
.. _statik: https://github.com/statik
.. _Vundle: https://github.com/gmarik/vundle
.. _alderz: https://github.com/alderz