fatih / vim-go Goto Github PK
View Code? Open in Web Editor NEWGo development plugin for Vim
Home Page: https://www.patreon.com/bhcleek
License: Other
Go development plugin for Vim
Home Page: https://www.patreon.com/bhcleek
License: Other
I was using :Fmt
without problems before trying to adopt vim-go, I have then removed all previous integration and switched to vim-go but now, when I try to save a go source file, I get a screen with all the buffer contents non-highlighted, I must scroll down to the bottom of this message (yes, the buffer contents is being output as an output message), at the bottom it says I must press any key to have the file saved. Also, in the end, no formatting is being applyed, both with the command, nor when it's being saved. I'm on Ubuntu 13.10 with a quite recent Vim build, 7.4.211.
GoVet has some useful features. It would be nice if you had a command to call and populate the quickfix window like :GoErrCheck
:GoFmt
or auto go fmt does shows the errors of the gofmt
(or goimports
) command. This option is going to try to save the file, but will prevent showing, and therefore populating the quickfix window.
I use vim for all of my text editing tasks. I like the fact that vim-go would fetch all necessary binaries for me, but on the other hand, every time I edit a file different than go, I get this:
vim.go: $GOPATH is not set
vim.go: you can disable auto install with 'let g:go_disable_autoinstall = 1'
Press ENTER or type command to continue
I can of course disable autoinstall, and do away with the message - but I'd still like to be able to use :GoUpdateBinaries
by hand. Can you please change it so the command is not disabled? This way I can get uninterrupted vim startup and possibility to quickly install stuff by hand if it's missing.
Or perhaps just do away with the warning.
GoDoc on e.g. io.EOF works, but not on ioutil.TempDir
GoDef works on both though
2014/04/04 02:46:28 open /usr/local/Cellar/go/1.2.1/libexec/src/pkg/ioutil: no such file or directory
Hi,
I get this E117 error whenever I try to autocomplete . I reduced my vimrc to a minimum to avoid any conflicts (Vundle setup + vim-go bundle, see http://pastebin.com/9HYy4i5f), and I still get this error.
Any help appreciated, thanks.
When running :GoErrCheck, the first time it is run a new window is opened listing the errors found. Running it subsequent times, though, no window opens listing the errors.
Note: it's quite possible that I have something misconfigured as I just began using vim-go. Overall it's a great tool and more than replaces the extensive go vim config I was previously using. Thanks for creating it.
Related to the closed issue #5
It would be great to add support for neosnippet as well.
Just installed vim-go (on windows) and getting errors when opening .go files:
E484: Can't open file <path>\AppData\Local\Temp\VIo5EB7.tmp
.vim-go dir has: errcheck, golint, oracle, godef, goimports, gocode and installation didn't have any errors.
This is very much just a feature request.
I'd be interested in a feature in which GoDoc opens a browser window to show the documentation.
I thought this plugin has settled this issue but sadly, it didn't. I was one of those who tried to provide a solution to a related question on SO. Still my approach, which I guess is the same being used here, will mess with redo. This is very simple to reproduce:
:w
to save it.u
to undo the previous change.:w
to save it again, now with the original content.ctrl-r
to redo the previous modification, it won't redo, but it should.Playing with undo and redo, the cursor may go to the top of the file without one asking for, it's very annoying.
When installing the three packages listed in the title do not install. None of them give an error message:
Installing code.google.com/p/go.tools/cmd/goimports Error installing code.google.com/p/go.tools/cmd/goimports: Installing code.google.com/p/go.tools/cmd/oracle Error installing code.google.com/p/go.tools/cmd/oracle: Installing github.com/kisielk/errcheck Error installing github.com/kisielk/errcheck: Press ENTER or type command to continue
I'm getting the error E154: Duplicate tag ":GoFmt" in file github-fatih-vim-go/doc/vim-go.txt
when installing/updating the plugin, this happens on generating help tags, and this should be happening because ":GoFmt" is not being escaped I think... when it's being referred as text inside vim-go.txt.
Hi,
I noticed that the snippet discovery in gosnippet.vim breaks supertab since it overwrites all <tab>
settings. I discovered this when running :verbose imap <tab>
and verified it by removing gosnippet.vim (which gives me back the expected behaviour).
let g:go_bin_path = expand("$GOPATH/bin")
(without a trailing slash) would cause auto-installing on every restart.
Loving vim-go! I noticed another installer issue. If GOPATH isn't set correctly the installer fails. It would be great if you surfaced this issue to the user while installing too.
Thanks.
:make should not source GoFiles at startup and :GoBuild shouldn't produce any binary. Basically they should be inversed.
Whenever I execute GoRun
I get the following error:
stat $/home/pjvds/go/src/github.com/pjvds/foobar/main.go: no such file or directory
Where is that $
sign coming from?
i really like your vim plugin but i ran into an issue,
package main
import (
"net"
)
func main() {
l, err := net.Li // <-- hit CTRL + x CTRL + o
}
autocompletion works fine if the net.Li
is on a single line alone, but with l, err :=
preceding it does not work for me, am i doing something wrong?
Like the GoDef
command, it should support various window options, probably implemented with mappings.
On :w it removes all lines enclosed in import
. It was working fine before, but now it doesn't.
(Thanks for making this plugin, by the way, it's very useful. :))
I'm incredibly impressed with the plugin, looking to switch to this full time for my Go development!
Have come across one issue, but I'm having a bit of trouble getting some troubleshooting information about it. Running Fmt is returning an error, but I can't seem to figure out what that error or the return code of goimports is.
My test file:
package test
import (
"fmt"
)
func main() {
fmt.Println("This is a test.")
}
When running Fmt:
:Fmt
1 package test
2
3 import (
4 "fmt"
5 )
6
7 func main() {
8 fmt.Println("This is a test.")
9 }
Gofmt returned error
My Go version:
➜ .vim-go go version
go version go1.2 linux/amd64
Checking to see what the Fmt command delegates to:
:Let g:co_fmt_command
g:go_fmt_command goimports
Running goimports manually seems to work:
➜ .vim-go ~/.vim-go/goimports $GOPATH/src/test.go
package test
import (
"fmt"
)
func main() {
fmt.Println("This is a test.")
}
➜ .vim-go echo $?
0
I'm happy to keep debugging here locally as I'm assuming this will be very tricky to reproduce. Do you have any advice as to where I would start looking to get some more valuable debugging information?
When starting vim-go for the first time, the downloader accesses 4 repos which appear to use mercurial. This may not be installed by default, it would be great if you could warn the user about this. I had to try and go get the packages by hand to figure out why it was failing. Many Thanks.
before this plugin for build i was using Gobu https://github.com/Kashomon/gobu (actually i'm still using it overwriting some of your commands) it's quite a simple plugin, but it has much nicer visualization of errors without losing sight of your code
can something like this merged in?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.