Skip to content

wookayin/vim-autoimport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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) without LSP

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published