Versions in this module Expand all Collapse all v0 v0.4.0 Jan 14, 2020 Changes in this version + const ProgramAuthor + const ProgramName + const ProgramVersion + func AttoFolderPath() (string, error) + func ConfigPath() (string, error) + func HighlightLine(l *BufferLine, s *Syntax) + func IsInsertable(c rune) bool + func IsSeparator(c rune) bool + func Start(args []string) + type Buffer struct + CursorDX int + CursorX int + CursorY int + Editor *Editor + FileName string + FileType FileType + IsDirty bool + Lines []BufferLine + OffsetX int + OffsetY int + func CreateBuffer(editor *Editor, path string) (Buffer, error) + func (b *Buffer) BreakLine() + func (b *Buffer) DeleteChar() + func (b *Buffer) FocusedRow() *BufferLine + func (b *Buffer) InsertChar(c rune) + func (b *Buffer) InsertLine(i int, text string) + func (b *Buffer) Length() int + func (b *Buffer) RemoveLine(i int) + type BufferLine struct + Buffer *Buffer + DisplayText string + Highlighting []HighlightType + Text string + func MakeBufferLine(buffer *Buffer, text string) (bl BufferLine) + func (l *BufferLine) AdjustX(x int) int + func (l *BufferLine) AppendString(s string) + func (l *BufferLine) DeleteChar(i int) + func (l *BufferLine) IndentLength() (indent int) + func (l *BufferLine) InsertChar(i int, c rune) + func (l *BufferLine) Update() + type Config struct + SoftTabs bool + TabSize int + UseHighlighting bool + func DefaultConfig() Config + func LoadConfig() (Config, error) + type CursorMove int + const CursorMoveDown + const CursorMoveLeft + const CursorMoveLineEnd + const CursorMoveLineStart + const CursorMovePageDown + const CursorMovePageUp + const CursorMoveRight + const CursorMoveUp + type Editor struct + Buffers []Buffer + Config Config + FocusIndex int + Height int + PromptAnswer string + PromptIsActive bool + PromptQuestion string + StatusMessage string + StatusMessageTime time.Time + Width int + func CreateEditor() (editor Editor) + func (e *Editor) Ask(q, a string) (string, error) + func (e *Editor) AskChar(q string, choices []rune) (rune, error) + func (e *Editor) BufferCount() int + func (e *Editor) Close(i int) + func (e *Editor) DeletePromptChar() + func (e *Editor) DirtyBufferCount() (count int) + func (e *Editor) Draw() + func (e *Editor) DrawBuffer() + func (e *Editor) DrawStatusBar() + func (e *Editor) DrawTitleBar() + func (e *Editor) FB() *Buffer + func (e *Editor) HandleEvent(event termbox.Event) + func (e *Editor) InsertPromptChar(c rune) + func (e *Editor) MoveCursor(move CursorMove) + func (e *Editor) MovePromptCursor(move CursorMove) + func (e *Editor) Open() + func (e *Editor) Read(path string) + func (e *Editor) Run(args []string) + func (e *Editor) Save() + func (e *Editor) ScrollView() + func (e *Editor) SetStatusMessage(format string, args ...interface{}) + func (e *Editor) Shutdown() + type FileType string + const FileTypeC + const FileTypeCMake + const FileTypeCPP + const FileTypeGo + const FileTypeGoModule + const FileTypeMakefile + const FileTypeMarkdown + const FileTypePlaintext + const FileTypeUnknown + func GuessFileType(name string) FileType + type HighlightType int + const HighlightTypeComment + const HighlightTypeNormal + const HighlightTypeNumber + const HighlightTypePrimaryKeyword + const HighlightTypeSecondaryKeyword + const HighlightTypeString + func (t HighlightType) Color() termbox.Attribute + type Syntax struct + Keywords []string + Patterns SyntaxPatterns + var SyntaxC Syntax = Syntax{ ... } + var SyntaxGo Syntax = Syntax{ ... } + type SyntaxPatterns struct + MultiLineCommendStart string + MultiLineCommentEnd string + SingleLineCommentStart string