vim-mypy


Ⅰ. 插件描述

Vim plugin for executing Python's optional static type checker MyPy (http://mypy-lang.org/)

Ⅱ. 基本信息

创建日期:  2017-01-16
使用用户:  26
Github星:  74
插件作者:  Mark McDonnell

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-mypy

Vim plugin for executing Python's optional static type checker MyPy

Example

def example(n: int) -> str:
    print(type(n))
    return 'hello'

example("a")  # << incorrect, we've passed a String and not an Integer 

To trigger the plugin, execute either :Mypy or the mapping <Leader>mp

Install

Pathogen

git clone https://github.com/integralist/vim-mypy ~/.vim/bundle/vim-mypy

Vundle

Plugin 'integralist/vim-mypy'

Alternatives

It seems both Syntastic and Neomake include support for MyPy.

添加新评论