Skip to content

Commit b8dbc46

Browse files
committed
Add Build And Install A Go Program as a vim til
1 parent fae4df4 commit b8dbc46

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ _325 TILs and counting..._
318318
- [The Black Hole Register](vim/the-black-hole-register.md)
319319
- [Breaking The Undo Sequence](vim/breaking-the-undo-sequence.md)
320320
- [Buffer Time Travel](vim/buffer-time-travel.md)
321+
- [Build And Install A Go Program](vim/build-and-install-a-go-program.md)
321322
- [Case-Aware Substitution With vim-abolish](vim/case-aware-substitution-with-vim-abolish.md)
322323
- [Case-Insensitive Substitution](vim/case-insensitive-substitution.md)
323324
- [Center The Cursor](vim/center-the-cursor.md)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Build And Install A Go Program
2+
3+
With the [`vim-go`](https://github.com/fatih/vim-go) plugin, Vim gets all
4+
kinds of support for working with a Go project. Generally, with a Go
5+
project, you have to run `go build` to compile the project and if that is
6+
successful, you can run `go install` to put the executable binary on the
7+
`$GOPATH`.
8+
9+
This plugin allows you to tighten the feedback loop. You can build right
10+
within your Vim session using
11+
12+
```
13+
:GoBuild
14+
```
15+
16+
which will alert you to any compilation errors.
17+
18+
You can then install the program using
19+
20+
```
21+
:GoInstall
22+
```
23+
24+
Your program is now ready to run.
25+
26+
It's worth noting that this plugin will also notify you about syntax errors
27+
when you save, if they exist.

0 commit comments

Comments
 (0)