2 ms·
Why? I code Go in Vim every day, and I think goimports is perfect. I don't even think about the import ( ... ) block at the top - I just use what packages I wan
by artursapek 11y ago
Why? I code Go in Vim every day, and I think goimports is perfect. I don't even think about the import ( ... ) block at the top - I just use what packages I want, save my code, and let the machine take care of the imports. If you have your GOPATH set up properly, it works 100% of the time.
- seletskiy 11y agoLooks like I was not clear enough. goimports works perfectly, but only on buffer save event (or by manual trigger). Take an example, start from scratch: package main func main() { fmt| } Cursor is at |, and when I type ., I immediatelly have fmt package imported and see completion menu for fmt package (without leaving insert mode or saving file, just by typing dot). Out of the box vim-go doesn't provide that.
- artursapek 11y agoAh, you want the full package exports available for autocomplete? Have you found a way to do that?