isort.nvim


Ⅰ. 插件描述

Neovim plugin to sort Python imports using isort

Ⅱ. 基本信息

创建日期:  2018-02-02
使用用户:  7
Github星:  8
插件作者:  Santos Gallegos

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Isort.nvim

Neovim plugin to sort python imports using isort.

Inspired by vim-isort.

Requirements

  • Isort (pip install isort).
  • The isort command must be on your PATH.

Install

Install using vim-plug.
Put this on your init.vim.

Plug 'stsewd/isort.nvim', { 'do': ':UpdateRemotePlugins' }

Usage

Call :Isort and it will sort the imports of the current buffer.
You can also pass a range via the visual mode.

_All arguments of the command will be passed to isort_.

Configuration

Isort command.

g:isort_command = 'isort'

Differences with vim-isort

  • No need to install isort on the same python environment.
  • Pure python implementation.
  • Neovim only.

添加新评论