buffer

package
v0.0.0-...-bc0ec6d Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func New

func New(v *cnvim.Nvim, b cnvim.Buffer) *Buffer

func (*Buffer) Clear

func (b *Buffer) Clear() error

func (*Buffer) CommandOutputf

func (b *Buffer) CommandOutputf(format string, args ...interface{}) (string, error)

func (*Buffer) Commandf

func (b *Buffer) Commandf(format string, args ...interface{}) error

func (*Buffer) CurrentCursor

func (b *Buffer) CurrentCursor() (Position, error)

func (*Buffer) FileType

func (b *Buffer) FileType() (string, error)

func (*Buffer) Focus

func (b *Buffer) Focus() error

func (*Buffer) Focused

func (b *Buffer) Focused() (bool, error)

func (*Buffer) LineCount

func (b *Buffer) LineCount() (int, error)

func (*Buffer) Mode

func (b *Buffer) Mode() (string, error)

func (*Buffer) Modifiable

func (b *Buffer) Modifiable() (bool, error)

func (*Buffer) Name

func (b *Buffer) Name() (string, error)

func (*Buffer) Option

func (b *Buffer) Option() (Option, error)

func (*Buffer) SelectedRange

func (b *Buffer) SelectedRange() (Range, error)

func (*Buffer) SetCurrentCursor

func (b *Buffer) SetCurrentCursor(p Position) error

func (*Buffer) SetFileType

func (b *Buffer) SetFileType(t string) error

SetFileType sets filetype t to buffer.

func (*Buffer) SetModifiable

func (b *Buffer) SetModifiable(m bool) error

func (*Buffer) SetName

func (b *Buffer) SetName(name string) error

func (*Buffer) SetOption

func (b *Buffer) SetOption(o Option) error

func (*Buffer) Valid

func (b *Buffer) Valid() (bool, error)

func (*Buffer) Write

func (b *Buffer) Write(lines [][]byte) error

type Option

type Option struct {
	BufHidden  string
	BufListed  bool
	BufType    string
	ReadOnly   bool
	SwapFile   bool
	Modifiable bool
	Modified   bool
}

func (Option) MapPointer

func (o Option) MapPointer() map[string]uintptr

func (Option) MapValue

func (o Option) MapValue() map[string]interface{}

type Position

type Position struct {
	BufferNumber int
	LineNumber   int
	Column       int
	Offset       int
}

func NewPosition

func NewPosition(s string) (Position, error)

func (*Position) SetX

func (p *Position) SetX(x int)

func (*Position) SetY

func (p *Position) SetY(y int)

func (Position) String

func (p Position) String() string

func (Position) X

func (p Position) X() int

func (Position) Y

func (p Position) Y() int

type Range

type Range struct {
	Start, End Position
}

Jump to

Keyboard shortcuts

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