Skip to content

Commit e0910c0

Browse files
author
Raphael
committed
Improve Reademe for usage.
1 parent e544052 commit e0910c0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Neovim/go-client is a [Neovim](https://neovim.io/) client and plugin host for [Go](https://golang.org/).
55

66
This example plugin adds the Hello command to Nvim.
7+
78
```go
89
package main
910

@@ -27,7 +28,16 @@ func main() {
2728
Build the program with the [go tool](https://golang.org/cmd/go/) to an
2829
executable named `hello`. Ensure that the executable is on your path.
2930

31+
```go
32+
// Use the go build to generate an executable
33+
// Enusre this hello executable on your path
34+
// you can move hello to your $GOPATH/bin
35+
// or set the current dir into env variable `path`
36+
go build -o hello
37+
```
38+
3039
Add the following plugin to Nvim:
40+
3141
```vim
3242
if exists('g:loaded_hello')
3343
finish
@@ -48,7 +58,9 @@ call remote#host#RegisterPlugin('hello', '0', [
4858
4959
" vim:ts=4:sw=4:et
5060
```
61+
5162
Start Nvim and run the following command:
63+
5264
```vim
5365
:echo Hello('world')
5466
```

0 commit comments

Comments
 (0)