Versions in this module Expand all Collapse all v0 v0.1.6 Jan 3, 2022 v0.1.5 Dec 25, 2021 v0.1.4 Dec 24, 2021 v0.1.3 Dec 21, 2021 v0.1.2 Dec 17, 2021 v0.1.1 Dec 12, 2021 v0.1.0 Dec 12, 2021 Changes in this version + const ActionBackspace + const ActionCenter + const ActionCopy + const ActionCursorDown + const ActionCursorEnd + const ActionCursorLeft + const ActionCursorPageDown + const ActionCursorPageUp + const ActionCursorRight + const ActionCursorStart + const ActionCursorUp + const ActionCut + const ActionCutLine + const ActionDelete + const ActionDeleteLine + const ActionDeleteWordLeft + const ActionDeleteWordRight + const ActionDuplicateLine + const ActionEnd + const ActionEndOfLine + const ActionEscape + const ActionHalfPageDown + const ActionHalfPageUp + const ActionIndentSelection + const ActionInsertEnter + const ActionInsertNewline + const ActionInsertSpace + const ActionInsertTab + const ActionJumpToMatchingBrace + const ActionMoveLinesDown + const ActionMoveLinesUp + const ActionOutdentLine + const ActionOutdentSelection + const ActionPageDown + const ActionPageUp + const ActionParagraphNext + const ActionParagraphPrevious + const ActionPaste + const ActionRedo + const ActionRemoveAllMultiCursors + const ActionRemoveMultiCursor + const ActionScrollDown + const ActionScrollUp + const ActionSelectAll + const ActionSelectDown + const ActionSelectLeft + const ActionSelectLine + const ActionSelectPageDown + const ActionSelectPageUp + const ActionSelectRight + const ActionSelectToEnd + const ActionSelectToEndOfLine + const ActionSelectToStart + const ActionSelectToStartOfLine + const ActionSelectUp + const ActionSelectWordLeft + const ActionSelectWordRight + const ActionSkipMultiCursor + const ActionSpawnMultiCursor + const ActionSpawnMultiCursorSelect + const ActionStart + const ActionStartOfLine + const ActionToggleOverwriteMode + const ActionToggleRuler + const ActionUnbindKey + const ActionUndo + const ActionWordLeft + const ActionWordRight + const LargeFileThreshold + const RTColorscheme + const RTSyntax + const TextEventInsert + const TextEventRemove + const TextEventReplace + func Abs(n int) int + func ByteOffset(pos Loc, buf *Buffer) int + func CommonSubstring(arr ...string) string + func Contains(list []string, a string) bool + func Count(s string) int + func DefaultLocalSettings() map[string]interface + func Diff(a, b Loc, buf *Buffer) int + func EscapePath(path string) string + func ExecuteTextEvent(t *TextEvent, buf *Buffer) + func FSize(f *os.File) int64 + func FuncName(i interface{}) string + func GetColor(color string) tcell.Style + func GetColor256(color int) tcell.Color + func GetLeadingWhitespace(str string) string + func GetModTime(path string) (time.Time, bool) + func GetPathAndCursorPosition(path string) (string, []string) + func InBounds(pos Loc, buf *Buffer) bool + func Insert(str string, pos int, value string) string + func IsSpaces(str []byte) bool + func IsSpacesOrTabs(str string) bool + func IsStrWhitespace(str string) bool + func IsWhitespace(c rune) bool + func IsWordChar(str string) bool + func MakeRelative(path, base string) (string, error) + func Max(a, b int) int + func Min(a, b int) int + func NumOccurrences(s string, c byte) int + func ParseBool(str string) (bool, error) + func SetDefaultColorscheme(scheme Colorscheme) + func ShortFuncName(i interface{}) string + func ShowMultiCursor(screen tcell.Screen, x, y, i int) + func Spaces(n int) string + func StringToColor(str string) tcell.Color + func StringToStyle(str string) tcell.Style + func StringWidth(str string, tabsize int) int + func ToCharPos(start Loc, buf *Buffer) int + func UndoTextEvent(t *TextEvent, buf *Buffer) + func WidthOfLargeRunes(str string, tabsize int) int + type Buffer struct + Cursor Cursor + IsModified bool + NumLines int + Path string + Settings map[string]interface{} + func NewBuffer(reader io.Reader, size int64, path string, cursorPosition []string) *Buffer + func NewBufferFromString(text, path string) *Buffer + func (b *Buffer) ClearMatches() + func (b *Buffer) End() Loc + func (b *Buffer) FileType() string + func (b *Buffer) FindMatchingBrace(braceType [2]rune, start Loc) Loc + func (b *Buffer) GetName() string + func (b *Buffer) IndentString() string + func (b *Buffer) Len() (n int) + func (b *Buffer) Line(n int) string + func (b *Buffer) LineBytes(n int) []byte + func (b *Buffer) LineRunes(n int) []rune + func (b *Buffer) Lines(start, end int) []string + func (b *Buffer) LinesNum() int + func (b *Buffer) MergeCursors() + func (b *Buffer) Modified() bool + func (b *Buffer) MoveLinesDown(start int, end int) + func (b *Buffer) MoveLinesUp(start int, end int) + func (b *Buffer) RuneAt(loc Loc) rune + func (b *Buffer) Start() Loc + func (b *Buffer) UpdateCursors() + type CellView struct + func (c *CellView) Draw(buf *Buffer, colorscheme Colorscheme, top, height, left, width int) + type Char struct + type Colorscheme map[string]tcell.Style + func ParseColorscheme(text string) Colorscheme + func (colorscheme Colorscheme) GetColor(color string) tcell.Style + type Cursor struct + CurSelection [2]Loc + LastVisualX int + Num int + OrigSelection [2]Loc + func (c *Cursor) AddLineToSelection() + func (c *Cursor) AddWordToSelection() + func (c *Cursor) CopySelection(target string) + func (c *Cursor) DeleteSelection() + func (c *Cursor) Down() + func (c *Cursor) DownN(amount int) + func (c *Cursor) End() + func (c *Cursor) GetCharPosInLine(lineNum, visualPos int) int + func (c *Cursor) GetSelection() string + func (c *Cursor) GetVisualX() int + func (c *Cursor) Goto(b Cursor) + func (c *Cursor) GotoLoc(l Loc) + func (c *Cursor) HasSelection() bool + func (c *Cursor) Left() + func (c *Cursor) Relocate() + func (c *Cursor) ResetSelection() + func (c *Cursor) Right() + func (c *Cursor) RuneUnder(x int) rune + func (c *Cursor) SelectLine() + func (c *Cursor) SelectTo(loc Loc) + func (c *Cursor) SelectWord() + func (c *Cursor) SetSelectionEnd(pos Loc) + func (c *Cursor) SetSelectionStart(pos Loc) + func (c *Cursor) Start() + func (c *Cursor) StartOfText() + func (c *Cursor) StoreVisualX() + func (c *Cursor) Up() + func (c *Cursor) UpN(amount int) + func (c *Cursor) WordLeft() + func (c *Cursor) WordRight() + type Delta struct + End Loc + Start Loc + Text string + type Element struct + Next *Element + Value *TextEvent + type EventHandler struct + RedoStack *Stack + UndoStack *Stack + func NewEventHandler(buf *Buffer) *EventHandler + func (eh *EventHandler) ApplyDiff(new string) + func (eh *EventHandler) Execute(t *TextEvent) + func (eh *EventHandler) Insert(start Loc, text string) + func (eh *EventHandler) MultipleReplace(deltas []Delta) + func (eh *EventHandler) Redo() + func (eh *EventHandler) RedoOneEvent() + func (eh *EventHandler) Remove(start, end Loc) + func (eh *EventHandler) Replace(start, end Loc, replace string) + func (eh *EventHandler) Undo() + func (eh *EventHandler) UndoOneEvent() + type KeyBindings map[keyDesc][]func(*View) bool + var DefaultKeyBindings KeyBindings + func NewKeyBindings(bindings map[string]string) KeyBindings + func (bindings KeyBindings) BindKey(key string, actions string) KeyBindings + func (bindings KeyBindings) BindKeys(keys map[string]string) KeyBindings + type Line struct + func Append(slice []Line, data ...Line) []Line + type LineArray struct + func NewLineArray(size int64, reader io.Reader) *LineArray + func (la *LineArray) DeleteByte(pos Loc) + func (la *LineArray) DeleteFromStart(pos Loc) + func (la *LineArray) DeleteLine(y int) + func (la *LineArray) DeleteToEnd(pos Loc) + func (la *LineArray) JoinLines(a, b int) + func (la *LineArray) Match(lineN int) highlight.LineMatch + func (la *LineArray) NewlineBelow(y int) + func (la *LineArray) SaveString(useCrlf bool) string + func (la *LineArray) SetMatch(lineN int, m highlight.LineMatch) + func (la *LineArray) SetState(lineN int, s highlight.State) + func (la *LineArray) Split(pos Loc) + func (la *LineArray) State(lineN int) highlight.State + func (la *LineArray) String() string + func (la *LineArray) Substr(start, end Loc) string + type Loc struct + X int + Y int + func FromCharPos(loc int, buf *Buffer) Loc + func (l Loc) GreaterEqual(b Loc) bool + func (l Loc) GreaterThan(b Loc) bool + func (l Loc) LessEqual(b Loc) bool + func (l Loc) LessThan(b Loc) bool + func (l Loc) Move(n int, buf *Buffer) Loc + type RuntimeFile interface + Data func() ([]byte, error) + Name func() string + type RuntimeFiles struct + func NewRuntimeFiles(fs http.FileSystem) *RuntimeFiles + func (rfs *RuntimeFiles) AddFile(fileType string, file RuntimeFile) + func (rfs *RuntimeFiles) AddFilesFromDirectory(fs http.FileSystem, fileType, directory, pattern string) + func (rfs RuntimeFiles) FindFile(fileType, name string) RuntimeFile + func (rfs RuntimeFiles) ListRuntimeFiles(fileType string) []RuntimeFile + type ScrollBar struct + func (sb *ScrollBar) Display(screen tcell.Screen) + type Stack struct + Size int + Top *Element + func (s *Stack) Len() int + func (s *Stack) Peek() *TextEvent + func (s *Stack) Pop() (value *TextEvent) + func (s *Stack) Push(value *TextEvent) + type TextEvent struct + C Cursor + Deltas []Delta + EventType int + Time time.Time + type View struct + Buf *Buffer + Cursor *Cursor + Readonly bool + Topline int + func NewView(buf *Buffer) *View + func (v *View) Backspace() bool + func (v *View) Bottomline() int + func (v *View) Center() bool + func (v *View) Copy() bool + func (v *View) CursorDown() bool + func (v *View) CursorEnd() bool + func (v *View) CursorLeft() bool + func (v *View) CursorPageDown() bool + func (v *View) CursorPageUp() bool + func (v *View) CursorRight() bool + func (v *View) CursorStart() bool + func (v *View) CursorUp() bool + func (v *View) Cut() bool + func (v *View) CutLine() bool + func (v *View) Delete() bool + func (v *View) DeleteLine() bool + func (v *View) DeleteWordLeft() bool + func (v *View) DeleteWordRight() bool + func (v *View) Draw(screen tcell.Screen) + func (v *View) DuplicateLine() bool + func (v *View) End() bool + func (v *View) EndOfLine() bool + func (v *View) Escape() bool + func (v *View) ExecuteActions(actions []func(*View) bool) bool + func (v *View) GetKeybindings() KeyBindings + func (v *View) HalfPageDown() bool + func (v *View) HalfPageUp() bool + func (v *View) HandleEvent(event tcell.Event) + func (v *View) IndentSelection() bool + func (v *View) InputHandler() func(event *tcell.EventKey, _ func(p tview.Primitive)) + func (v *View) InsertNewline() bool + func (v *View) InsertSpace() bool + func (v *View) InsertTab() bool + func (v *View) JumpToMatchingBrace() bool + func (v *View) MoveLinesDown() bool + func (v *View) MoveLinesUp() bool + func (v *View) OpenBuffer(buf *Buffer) + func (v *View) OutdentLine() bool + func (v *View) OutdentSelection() bool + func (v *View) PageDown() bool + func (v *View) PageUp() bool + func (v *View) ParagraphNext() bool + func (v *View) ParagraphPrevious() bool + func (v *View) Paste() bool + func (v *View) Redo() bool + func (v *View) Relocate() bool + func (v *View) RemoveAllMultiCursors() bool + func (v *View) RemoveMultiCursor() bool + func (v *View) Retab() bool + func (v *View) ScrollDown(n int) + func (v *View) ScrollDownAction() bool + func (v *View) ScrollUp(n int) + func (v *View) ScrollUpAction() bool + func (v *View) SelectAll() bool + func (v *View) SelectDown() bool + func (v *View) SelectLeft() bool + func (v *View) SelectLine() bool + func (v *View) SelectPageDown() bool + func (v *View) SelectPageUp() bool + func (v *View) SelectRight() bool + func (v *View) SelectToEnd() bool + func (v *View) SelectToEndOfLine() bool + func (v *View) SelectToStart() bool + func (v *View) SelectToStartOfLine() bool + func (v *View) SelectUp() bool + func (v *View) SelectWordLeft() bool + func (v *View) SelectWordRight() bool + func (v *View) SetColorscheme(colorscheme Colorscheme) + func (v *View) SetCursor(c *Cursor) bool + func (v *View) SetKeybindings(bindings KeyBindings) + func (v *View) SetRect(x, y, width, height int) + func (v *View) SetRuntimeFiles(runtimeFiles *RuntimeFiles) + func (v *View) SkipMultiCursor() bool + func (v *View) SpawnMultiCursor() bool + func (v *View) SpawnMultiCursorSelect() bool + func (v *View) Start() bool + func (v *View) StartOfLine() bool + func (v *View) ToggleOverwriteMode() bool + func (v *View) ToggleRuler() bool + func (v *View) Undo() bool + func (v *View) WordLeft() bool + func (v *View) WordRight() bool