tamago324 / vim-autoimport

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

Home Page:https://work.in.progress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

: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:

nmap <silent> <M-CR>   :ImportSymbol<CR>
imap <silent> <M-CR>   <Esc>:ImportSymbol<CR>a

Tip: How to sort imports?

command! -buffer ImportOrganize    :CocCommand python.sortImports

License

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

About

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

https://work.in.progress


Languages

Language:Python 82.2%Language:Vim Script 17.8%