Documentation ¶
Index ¶
- Constants
- Variables
- func NewView() tree.View
- type BoundariesArray
- func (b *BoundariesArray) BoundariesLen(rowIndex int) int
- func (b *BoundariesArray) Boundary(rowIndex, logicalRowIndex int) Boundary
- func (b *BoundariesArray) ClearAll()
- func (b *BoundariesArray) Delete(rowIndex, count int) error
- func (b *BoundariesArray) Insert(rowIndex, count int)
- func (b *BoundariesArray) LastBoundary(rowIndex int) Boundary
- func (b *BoundariesArray) Len() int
- func (b *BoundariesArray) Set(rowIndex int, bs []Boundary)
- type Boundary
- 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) 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)
- func (e *Editor) InsertTab()
- func (e *Editor) Kill(leaf *tree.Leaf, isActive bool) *tree.Leaf
- func (e *Editor) KillLine()
- func (e *Editor) KillRegion()
- 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) MoveCursorNextWord()
- func (e *Editor) MoveCursorPrevLine()
- func (e *Editor) MoveCursorPreviousWord()
- 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) Redo()
- 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) 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 Number
- type View
Constants ¶
const ( INSERT syncType = iota DELETE )
Variables ¶
var ( // Initialization has been moved to the newEditor function // BufferSets, _ = buffer.NewBufferSets(gecore.Files) BufferSets *buffer.BufferSets Marks = mark.NewMarks() )
Functions ¶
Types ¶
type BoundariesArray ¶
type BoundariesArray struct {
// contains filtered or unexported fields
}
Don't want to separate it into a separate package.
func NewBoundariesArray ¶
func NewBoundariesArray(editor *Editor) BoundariesArray
func (*BoundariesArray) BoundariesLen ¶
func (b *BoundariesArray) BoundariesLen(rowIndex int) int
Return number of logical row
func (*BoundariesArray) Boundary ¶
func (b *BoundariesArray) Boundary(rowIndex, logicalRowIndex int) Boundary
Return the logical row boundary information
func (*BoundariesArray) ClearAll ¶
func (b *BoundariesArray) ClearAll()
func (*BoundariesArray) Delete ¶
func (b *BoundariesArray) Delete(rowIndex, count int) error
func (*BoundariesArray) Insert ¶
func (b *BoundariesArray) Insert(rowIndex, count int)
Insert count number of elements into BoundariesArray at rowIndex position.
func (*BoundariesArray) LastBoundary ¶
func (b *BoundariesArray) LastBoundary(rowIndex int) Boundary
func (*BoundariesArray) Set ¶
func (b *BoundariesArray) Set(rowIndex int, bs []Boundary)
Set a Boundary-Array (logical row information) at a specified row index, extending the slice if necessary
type Editor ¶
type Editor struct { utils.Rect // overall 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) Event ¶
func (e *Editor) Event(tev *tcell.Event) *tcell.Event
If event requires special handling For EventResize, use the Resize method of interface
func (*Editor) GetBuffers ¶
func (e *Editor) GetBuffers() *buffer.BufferSets
func (*Editor) GetFindIndexes ¶
func (e *Editor) GetFindIndexes() []foundPosition
func (*Editor) KillLine ¶
func (e *Editor) KillLine()
Kill line: If not at the EOL, remove contents of the current line from the cursor to the end. Otherwise behave like 'delete'. 行を削除します: EOL でない場合は、カーソルから末尾までの現在の行の内容を削除します。 それ以外の場合は、「delete」のように動作します。
func (*Editor) KillRegion ¶
func (e *Editor) KillRegion()
Kill region between last mark to cursor and push undo and kill buffers
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) MoveCursorPreviousWord ¶
func (e *Editor) MoveCursorPreviousWord()
func (*Editor) MoveCursorToLine ¶
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) ViewActive ¶
func (*Editor) YankFromClipboard ¶
func (e *Editor) YankFromClipboard()