A small improvement in goimports

I am a vim party, and I like to use the vim-go plugin for golang development . There is a GoImports that I like very much, but using GoImports to automatically complete the import package name must exist in the code <包名>.<有效成员名>, but when I get older, sometimes I can't remember the <valid member name>, and I really want to have an input package name at this time. Just help me with the function of auto-completing the import statement. I went to the VIM function of GoImports, and found that it actually calls goimports . Then I went to the implementation of goimports and changed a few lines of code.

diff see: https://github.com/lujinda/tools/commit/41faba617cb563ca85614abd118119cccd79c787

Now I can use GoImports to complete the import statement by typing <package name>._ (eg grpc._).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324897071&siteId=291194637