snipmate_for_django


Ⅰ. 插件描述

Django snippets for SnipMate, the excellent Vim plugin

Ⅱ. 基本信息

创建日期:  2009-08-06
使用用户:  20
Github星:  150
插件作者:  Rob Hudson

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'robhudson/snipmate-for-django'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'robhudson/snipmate-for-django'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'robhudson/snipmate-for-django'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/robhudson/snipmate_for_django

Ⅳ. 文档说明

Installation

Install SnipMate:
http://www.vim.org/scripts/script.php?script_id=2540

Copy django.snippets and django_template.snippets to your snippets
directory, typically at ~/.vim/snippets.

Activate the snippets by using the filetype setting. For example:

:set ft=python.django

For Django templates:

:set ft=htmldjango.html

To set these automatically each time you run vim, add the following lines to
your .vimrc:

autocmd FileType python set ft=python.django " For SnipMate
autocmd FileType html set ft=htmldjango.html " For SnipMate

Enjoy!

添加新评论