nvim

package module
v0.0.0-...-845dea2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2015 License: MIT Imports: 11 Imported by: 0

README

go-vim

! Still on pre-alpha ;)

Go client for nvim

go get github.com/juanolon/go-nvim

Example

package main

import (
	"log"

	"github.com/juanolon/go-nvim"
)

func main() {

	n, err := nvim.Dial(nvim.CONN_NET, "/var/folders/x6/h18jf2xj10bgb1_jlf_fy0rr0000gn/T/nvimaGKXbS/0")
	if err != nil {
		log.Fatal("error connecting: ", err)
	}
	line := n.GetCurrentLine()
	log.Println(line)
}

License

MIT, see LICENSE

Documentation

Index

Constants

View Source
const (
	CONN_NET connType = iota
	CONN_STD
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Identifier

type Identifier interface {
	GetId() uint8
}

Identifier represents raw vim objects like Buffer..

type Vim

type Vim struct {
	// contains filtered or unexported fields
}

Vim object itself is not registered on the nvim api as a custom type. so define here it's called Vim and not NVim for now. as we just generate the struct names based on the rpc method names eg: vim_get_current_buffer

func Dial

func Dial(network connType, addr string) (*Vim, error)

type WRCloser

type WRCloser struct {
	// contains filtered or unexported fields
}

WRCloser r/w wrapper

func NewWRCloser

func NewWRCloser(r io.ReadCloser, w io.WriteCloser) *WRCloser

func (*WRCloser) Close

func (b *WRCloser) Close() error

func (*WRCloser) Read

func (b *WRCloser) Read(p []byte) (n int, err error)

func (*WRCloser) Write

func (b *WRCloser) Write(data []byte) (n int, err error)

Directories

Path Synopsis
+build ignore
+build ignore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL