Comments (10)
Can you give your example main.go here? I think you have an environment problem. stat
is called nowhere. See: https://github.com/fatih/vim-go/blob/master/autoload/go/command.vim#L1
The $
is unknown to me.
from vim-go.
Thanks for the amazingly fast response!
The main.go is a simple as:
package main
import (
"fmt"
)
func main() {
fmt.Print("hello world")
}
I will first try a clean setup before investigating it further.
from vim-go.
It's working without any problem. Can you invoke manually your code? Maybe your Go environment is installed wrong. Below is an example output showing "hello world" printing. If you have terminal it would show it in a clean screen.
from vim-go.
It looks like I'm at least a step further. I tried it on a clean Mac OSX environment, and it works like a charm. Yet, I also tried it on a new clean Ubuntu environment, and it still fails.
I can successfully execute the following command:
GoRun main.go
I cannot execute:
GoRun
What I find strange is that the command GoFiles
returns a result with a $
sign:
$/home/pjvds/go/src/github.com/pjvds/foobar/main.go
from vim-go.
I was able to fix it by removing the $
from the changing files command at line 2:
Before:
let command = "go list -f $'{{range $f := .GoFiles}}{{$.Dir}}/{{$f}}\n{{end}}'"
After:
let command = "go list -f '{{range $f := .GoFiles}}{{$.Dir}}/{{$f}}\n{{end}}'"
from vim-go.
What shell are you using? That's a weird error.
from vim-go.
I have tried the following shells:
zsh 5.0.2 (x86_64-pc-linux-gnu)
<-- my primaryGNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
from vim-go.
I could reproduce the error on Mac OSX with the fish-shell.
Edit: This was another error with subshells. Ignore my comment
Make sure to add the following to .vimrc
set shell=bash
from vim-go.
@weitzj: Thanks, that fixed it!
@fatih: Thanks for the support
from vim-go.
As I side note: #30 (comment)
from vim-go.
Related Issues (20)
- Vim jumps to end of file on save HOT 2
- GoSameIds end position miscalculated for identifiers at the end of line
- GoExtract sends incorrect location to LSP HOT 1
- Error detected while processing Buf WritePre HOT 1
- Error detected while processing function <SNR>129_debugasync: E117 Unknown function: state ... HOT 1
- Typecheck errors when calling a function in another go file in the same package. HOT 9
- Godef has been Invalid in code with "import C" HOT 4
- Merged #3617 breaks UltiSnips placeholder mechanism HOT 3
- Cannot install or make it work with NeoVim gives error E492: Not an editor command :GoDef HOT 2
- Auto imports not working HOT 1
- Error in identifier/syntax prevents autocommands to be executed HOT 7
- Support quoting arguments to :GoImpl HOT 3
- Development: `make lint` always fails using GNU grep 3.8 or later HOT 5
- Vim randomly stops when go_highlight_function_calls is on HOT 4
- Execution: GoFmt changes the Chinese at the end to <e4> HOT 2
- Startup time ~4 s on nvim, macos, even with empty init.lua HOT 1
- c-x c-o error HOT 8
- Running :GoDef or any other commands that require gopls fails without error HOT 9
- vim has defined a set of key positions that span the ages
- Thank you for sharing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-go.