vogue

package module
v0.0.0-...-548ea0d Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 11 Imported by: 0

README

vogue

A terminal IDE written in Go.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BadPath   error = errors.New("bad path")
	Irregular error = errors.New("not a regular file")
)
View Source
var Empties int = 0

Functions

func ConfigFile

func ConfigFile(flag int, perm os.FileMode) (*os.File, error)

Types

type Buffer

type Buffer struct {
	Path  string
	Name  string
	Data  string
	Line  int
	Col   int
	Lexer chroma.Lexer
}

func BufEmpty

func BufEmpty() *Buffer

func BufFile

func BufFile(path string) (*Buffer, error)

func (*Buffer) FindLexer

func (b *Buffer) FindLexer()

func (*Buffer) Fresh

func (b *Buffer) Fresh(screen tcell.Screen)

func (*Buffer) Key

func (b *Buffer) Key(evk *tcell.EventKey)

type Config

type Config map[string]interface{}

func LoadConfig

func LoadConfig() (Config, error)

func (Config) Get

func (c Config) Get(name string, def interface{}) interface{}

func (Config) GetStyle

func (c Config) GetStyle(name string, def tcell.Style) tcell.Style

func (Config) Save

func (c Config) Save() error

type Status

type Status struct {
	Left   func() string
	Center func() string
	Right  func() string
}

func (*Status) Fresh

func (s *Status) Fresh(screen tcell.Screen, style tcell.Style)

type Tabs

type Tabs struct {
	Current int
	Buffers []*Buffer
}

func NewTabs

func NewTabs() *Tabs

func (*Tabs) Buffer

func (t *Tabs) Buffer() *Buffer

func (*Tabs) Fresh

func (t *Tabs) Fresh(screen tcell.Screen, focus tcell.Style, style tcell.Style)

func (*Tabs) Key

func (t *Tabs) Key(evk *tcell.EventKey)

type Vogue

type Vogue struct {
	Screen tcell.Screen

	Config Config

	Status *Status
	Tabs   *Tabs
}

func NewVogue

func NewVogue() (*Vogue, error)

func (*Vogue) Fini

func (v *Vogue) Fini()

func (*Vogue) Fresh

func (v *Vogue) Fresh()

func (*Vogue) Key

func (v *Vogue) Key(evk *tcell.EventKey)

func (*Vogue) Mouse

func (v *Vogue) Mouse(evm *tcell.EventMouse)

func (*Vogue) Run

func (v *Vogue) Run() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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