Ⅰ. 插件描述
type "self." by pressing "."Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'narfdotpl/selfdot'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'narfdotpl/selfdot'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'narfdotpl/selfdot'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/narfdotpl/selfdot.vim
Ⅳ. 文档说明
selfdot.vim
Vim plugin that lets you type self. by pressing . in Python files.
Typing self. can be annoying, mistyping -- even more. This plugin
lets you save keystrokes by expanding . into self. in places where
putting a dot is usually a syntax error (e.g. right after if).
selfdot recognizes conditionals, operators, line continuations, etc. It
tries not to get in your way and is disabled inside strings and comments
(so you can type cd .. and stay sane). Code-awareness relies heavily
on syntax item names defined in default Python syntax file, so
if you're using something else, selfdot might not work.
Installation
In a Nutshell
Put selfdot.vim in ~/.vim/ftplugin/python and be sure to have:filetype plugin on.
With Bare Hands
mkdir -p ~/.vim/ftplugin/python
cd !$
curl -O https://raw.github.com/narfdotpl/selfdot.vim/master/ftplugin/python/selfdot.vim
With [Pathogen][] and Git
You know what to do.
Meta
selfdot.vim is written by [Maciej Konieczny][]. This software is
released into the [public domain][] and uses [semantic versioning][] for
release numbering.