Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wookayin/vim-autoimport

A vim plugin for adding import statements (for python and more) without LSP
https://github.com/wookayin/vim-autoimport

auto-import neovim nvim python vim

Last synced: 2 months ago
JSON representation

A vim plugin for adding import statements (for python and more) without LSP

Awesome Lists containing this project

README

        

vim-autoimport
==============

A vim plugin for easily adding import statements.

*This is still WIP* --- things might change rapidly.

Usage
-----

Currently only works **for python**. You need to have `has('python3')` enabled.

Commands:

```vim
:ImportSymbol " Add an import statement for the current symbol
:ImportSymbol np.zeros " Add an import statement for the given expression (e.g. np.zeros)
```

Recommended keymappings:

```vim
nmap :ImportSymbol
imap :ImportSymbola
```

Tip: How to sort imports?

```vim
command! -buffer ImportOrganize :CocCommand python.sortImports
```

License
-------

The MIT License (c) 2020 Jongwook Choi (@wookayin)