vim-pony


Ⅰ. 插件描述

Pony power for working with Django projects.

Ⅱ. 基本信息

创建日期:  2011-04-25
使用用户:  50
Github星:  54
插件作者:  Jean-Marie Comets

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'jmcomets/vim-pony'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'jmcomets/vim-pony'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'jmcomets/vim-pony'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# pony.vim

Pony power for working with Django projects in Vim.

Pony powered

Installation

For those using pathogen,
simply copy/clone the entire repo in your ~/.vim/bundle.

Otherwise, copy plugin/pony.vim to your ~/.vim/plugin folder.

Jump commands

Some basic commands are available to jump to commonly used files in Django:

  • Dadmin: admin.py
  • Dmodels: models.py
  • Dsettings: settings.py
  • Dtests: tests.py
  • Durls: urls.py
  • Dviews: views.py

All these jump commands take an optional "app" argument, and will
jump accordingly to the file in that app. Defaults to the current directory.

Example :

:Dviews app " opens app/views.py
:Dmodels " opens app/models.py

Managing commands

The manage.py utility script is available via :Dmanage.
Note that any command involving the manage.py utility must be run
from that directory.

Shortcuts are available for a few common manage.py commands:

  • Drunserver : manage.py runserver
  • Dsyncdb : manage.py syncdb
  • Dshell : manage.py shell
  • Ddbshell : manage.py dbshell

Tip: I use :Dr for runserver, :Dsy for syncdb and :Dsh for shell.

Configuration

g:pony_prefix           prefix to all Pony's commands (default: "D")
g:pony_display_colors   flag indicating if the manage.py should output colors (default: 1)
g:pony_manage_filename  filename of the manage.py script (default: manage.py)
g:pony_python_cmd       exact command to run on the manage.py script (default: python)

Credits

添加新评论