Documentation ¶
Index ¶
- Variables
- func NewView() tree.View
- type Editor
- func (e *Editor) Autoindent()
- func (e *Editor) ChangeFilePath(path string)
- func (e *Editor) CharInfo()
- func (e *Editor) CopyRegion()
- func (e *Editor) DeleteRune()
- func (e *Editor) DeleteRuneBackward()
- func (e *Editor) Draw()
- func (e *Editor) DrawLine(n, rowIndex, cursorLogicalCY int)
- func (e *Editor) Event(tev *tcell.Event) *tcell.Event
- func (e *Editor) GetBuffers() *buffer.BufferSets
- func (e *Editor) GetFindIndexes() []foundPosition
- func (e *Editor) Init()
- func (e *Editor) InsertRune(ch rune)
- func (e *Editor) InsertString(s string) (file.Cursor, bool)
- func (e *Editor) InsertTab()
- func (e *Editor) Kill(leaf *tree.Leaf, isActive bool) *tree.Leaf
- func (e *Editor) KillLine()
- func (e *Editor) Kill_region()
- func (e *Editor) MoveCursorBackward()
- func (e *Editor) MoveCursorBeginningOfFile()
- func (e *Editor) MoveCursorBeginningOfLine()
- func (e *Editor) MoveCursorBeginningOfLogicalLine()
- func (e *Editor) MoveCursorEndOfFile()
- func (e *Editor) MoveCursorEndOfLine()
- func (e *Editor) MoveCursorEndOfLogicalLine()
- func (e *Editor) MoveCursorForward()
- func (e *Editor) MoveCursorNextLine()
- func (e *Editor) MoveCursorPrevLine()
- func (e *Editor) MoveCursorToLine(lineNumber int)
- func (e *Editor) MoveNextFoundWord()
- func (e *Editor) MovePrevFoundWord()
- func (e *Editor) MoveViewHalfBackward()
- func (e *Editor) MoveViewHalfForward()
- func (e *Editor) OpenFile(path string) error
- func (e *Editor) Redraw()
- func (e *Editor) ReplaceCurrentSearchString(str string)
- func (e *Editor) Resize(width, height int, rect utils.Rect)
- func (e *Editor) Resume()
- func (e *Editor) SaveFile()
- func (e *Editor) SearchRegexp(searchTerm string, caseSensitive bool, ctx context.Context)
- func (e *Editor) SearchText(text string, caseSensitive, isRegexp bool, ctx context.Context, ...)
- func (e *Editor) SetFile(ff *file.File)
- func (e *Editor) SetMark()
- func (e *Editor) SwapCursorAndMark()
- func (e *Editor) SyncEdits(sync syncType, ff *file.File, start, end file.Cursor)
- func (e *Editor) VC_Redo()
- func (e *Editor) VC_Undo()
- func (e *Editor) View() *tree.View
- func (e *Editor) ViewActive(a bool)
- func (e *Editor) WillClose()
- func (e *Editor) Yank()
- func (e *Editor) YankFromClipboard()
- type View
Constants ¶
This section is empty.
Variables ¶
var (
BufferSets, _ = buffer.NewBufferSets(gecore.Files)
Marks = mark.NewMarks()
)
Functions ¶
Types ¶
type Editor ¶
type Editor struct { utils.Rect // over all // position on screen *file.File *buffer.Meta // contains filtered or unexported fields }
Editor Struct implements the gecore.tree.Leaf interface
func (*Editor) Autoindent ¶
func (e *Editor) Autoindent()
func (*Editor) ChangeFilePath ¶
If an existing file is specified, it will be overwritten Backup works so no data is lost, but...
func (*Editor) CopyRegion ¶
func (e *Editor) CopyRegion()
Copy cursor region to Kill Buffer and Clipboard
func (*Editor) DeleteRune ¶
func (e *Editor) DeleteRune()
If at the EOL, move contents of the next line to the end of the current line, erasing the next line after that. Otherwise, delete one character under the cursor.
func (*Editor) DeleteRuneBackward ¶
func (e *Editor) DeleteRuneBackward()
func (*Editor) DrawLine ¶
draw one row
- n: y position within the Leaf to draw the row
- cursorLogicalCY: Logical row number where the cursor is located, If the row to draw is not the cursor row, set -1 and call
func (*Editor) GetBuffers ¶
func (e *Editor) GetBuffers() *buffer.BufferSets
func (*Editor) GetFindIndexes ¶
func (e *Editor) GetFindIndexes() []foundPosition
func (*Editor) InsertRune ¶
Insert a rune 'ch' at the current cursor position, advance cursor one character forward.
func (*Editor) Kill ¶
This Kill function will be called twice in a row First call to active tree.Leaf The second time is a circular call to tree
Process active tree.Leaf in first call Remove from buffer BufferSets matching leafEditor.File
Handle non-active windows in second call Check if Editor.File exists in BufferSets If it doesn't exist, replace it with another buffer
func (*Editor) KillLine ¶
func (e *Editor) KillLine()
If not at the EOL, remove contents of the current line from the cursor to the end. Otherwise behave like 'delete'.
func (*Editor) Kill_region ¶
func (e *Editor) Kill_region()
func (*Editor) MoveCursorBackward ¶
func (e *Editor) MoveCursorBackward()
Move cursor one character backward.
func (*Editor) MoveCursorBeginningOfFile ¶
func (e *Editor) MoveCursorBeginningOfFile()
func (*Editor) MoveCursorBeginningOfLine ¶
func (e *Editor) MoveCursorBeginningOfLine()
Move cursor to the beginning of the line.
func (*Editor) MoveCursorBeginningOfLogicalLine ¶
func (e *Editor) MoveCursorBeginningOfLogicalLine()
Move cursor to the beginning of the logical line.
func (*Editor) MoveCursorEndOfFile ¶
func (e *Editor) MoveCursorEndOfFile()
func (*Editor) MoveCursorEndOfLine ¶
func (e *Editor) MoveCursorEndOfLine()
Move cursor to the end of the line.
func (*Editor) MoveCursorEndOfLogicalLine ¶
func (e *Editor) MoveCursorEndOfLogicalLine()
Move cursor to the end of logical the line. At the end of a logical line, the cursor should at the beginning of the next logical line. so I see...
func (*Editor) MoveCursorForward ¶
func (e *Editor) MoveCursorForward()
Move cursor one character forward.
func (*Editor) MoveCursorNextLine ¶
func (e *Editor) MoveCursorNextLine()
Move cursor to the next line.
func (*Editor) MoveCursorPrevLine ¶
func (e *Editor) MoveCursorPrevLine()
Move cursor to the previous line.
func (*Editor) MoveCursorToLine ¶
"lemp" stands for "line edit mode params"
func (*Editor) MoveNextFoundWord ¶
func (e *Editor) MoveNextFoundWord()
func (*Editor) MovePrevFoundWord ¶
func (e *Editor) MovePrevFoundWord()
func (*Editor) MoveViewHalfBackward ¶
func (e *Editor) MoveViewHalfBackward()
Move view 'n' lines forward or backward.
func (*Editor) MoveViewHalfForward ¶
func (e *Editor) MoveViewHalfForward()
Move view 'n' lines forward or backward only if it's possible.
func (*Editor) ReplaceCurrentSearchString ¶
func (*Editor) SaveFile ¶
func (e *Editor) SaveFile()
If the file does not exist, a backup error will occur
func (*Editor) SearchRegexp ¶
func (*Editor) SearchText ¶
func (e *Editor) SearchText(text string, caseSensitive, isRegexp bool, ctx context.Context, wg *sync.WaitGroup)
When not using regular expressions
func (*Editor) SwapCursorAndMark ¶
func (e *Editor) SwapCursorAndMark()
func (*Editor) SyncEdits ¶
Synchronize edits to other buffers
Synchronize cursor position and vline:
- BufferSets.metas[*].Cursor
- Editor.Cursor
- Editor.vlines
func (*Editor) ViewActive ¶
func (*Editor) YankFromClipboard ¶
func (e *Editor) YankFromClipboard()