Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.05 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.05 KB

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.
  • Make sure that you install the latest version of isort (or at least >=5.7.0)

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.

Alternatively, use :IsortSync if you need the operation to complete synchronously (e.g. in a BufWritePre autocmd).

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.