Giter Site home page Giter Site logo

fatih / vim-go Goto Github PK

View Code? Open in Web Editor NEW
15.9K 15.9K 1.4K 6.73 MB

Go development plugin for Vim

Home Page: https://www.patreon.com/bhcleek

License: Other

Shell 1.69% Go 8.54% Makefile 0.09% Python 0.49% Dockerfile 0.10% Vim Snippet 2.64% Vim Script 86.46%
go golang gopls hacktoberfest lps vim vim-go vim-plugins viml

vim-go's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-go's Issues

gofmt integration is not working

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.

Support for `go vet`

GoVet has some useful features. It would be nice if you had a command to call and populate the quickfix window like :GoErrCheck

Add g:go_fmt_failsilently option

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

Don't disable GoUpdateBinaries with g:go_disable_autoinstall = 1

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 not working with nested packages

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

GoErrCheck only opens a new window the first time it is run

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.

error detected while processing function GoFiles

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.

GoDoc opens browser

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.

:GoFmt on :w mess with Vim :redo

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:

  • Open a Go source file.
  • Make some modification.
  • :w to save it.
  • Press u to undo the previous change.
  • :w to save it again, now with the original content.
  • Try press 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.

Error installing goimports, oracle and errcheck

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

E154: Duplicate tag ":GoFmt" in file github-fatih-vim-go/doc/vim-go.txt

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.

gosnippet.vim breaks supertab

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).

Check a trailing path slash

let g:go_bin_path = expand("$GOPATH/bin")(without a trailing slash) would cause auto-installing on every restart.

installer doesn't report GOPATH issue

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.

Fix :make and :GoBuild

:make should not source GoFiles at startup and :GoBuild shouldn't produce any binary. Basically they should be inversed.

Wrong stat

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?

Cannot autocomplete on assigment

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?

Removes imports on :w.

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

Error when running Fmt:

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?

Warn when mercurial isn't installed

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.

nicer build visualization

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.