Documentation
¶
Overview ¶
gecore/cancelable_manager.go
gecore/echo.go
Index ¶
- Constants
- Variables
- func Dispatch(ev tcell.EventKey)
- func InitQuitGuardManager(quit chan struct{})
- 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) GetHangingIndentWidth(rowIndex int) int
- 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, boundaries []Boundary, hangingIndentWidth int)
- type Boundary
- type CancelManagerStruct
- type Cancelable
- type EchoStruct
- func (e *EchoStruct) AddText(s ...string) *chainStruct
- func (e *EchoStruct) Clear()
- func (e *EchoStruct) Draw(screen tcell.Screen)
- func (e *EchoStruct) IsActive() bool
- func (e *EchoStruct) RequiredHeight() int
- func (e *EchoStruct) Resize(overlayRect utils.Rect)
- func (e *EchoStruct) SetText(s string) *chainStruct
- func (e *EchoStruct) UniversalCancel()
- type EditorKeymapBinder
- type Editorleaf
- func (e *Editorleaf) Active(a bool)
- func (e *Editorleaf) Autoindent()
- func (e Editorleaf) BackwardKillLine()
- func (e *Editorleaf) ChangeFilePath(path string)
- func (e *Editorleaf) CharInfo()
- func (e *Editorleaf) CommandPalette(s string)
- func (e *Editorleaf) CopyRegion()
- func (e *Editorleaf) DeleteRune()
- func (e *Editorleaf) DeleteRuneBackward()
- func (e *Editorleaf) DispatchKey(ev tcell.EventKey) (string, keychord.KeyDispatchTransition)
- func (e *Editorleaf) Draw()
- func (e *Editorleaf) FilterByCharacters(chars string) []*mark.Mark
- func (e *Editorleaf) GetBuffers() *buffer.BufferSets
- func (e *Editorleaf) GetBuffersFilterByCharacters(chars string) *buffer.BufferSets
- func (e *Editorleaf) GetBytes() []byte
- func (e *Editorleaf) GetPath() string
- func (e *Editorleaf) GetString() string
- func (e *Editorleaf) Init()
- func (e *Editorleaf) InsertRune(ch rune)
- func (e *Editorleaf) InsertString(s string)
- func (e *Editorleaf) InsertTab()
- func (e *Editorleaf) IsActive() bool
- func (e *Editorleaf) IsDirtyFlag() bool
- func (e Editorleaf) IsEndOfLine() bool
- func (e *Editorleaf) IsRedoEmpty() bool
- func (e *Editorleaf) Kill(leaf tree.Leaf, isActive bool) tree.Leaf
- func (e *Editorleaf) KillLine()
- func (e *Editorleaf) KillRegion()
- func (e *Editorleaf) LeafType() tree.LeafType
- func (e *Editorleaf) MinibufferMode(mode Mode)
- func (e *Editorleaf) MoveCursorBackward()
- func (e *Editorleaf) MoveCursorBeginningOfFile()
- func (e *Editorleaf) MoveCursorBeginningOfLine()
- func (e *Editorleaf) MoveCursorBeginningOfLogicalLine()
- func (e *Editorleaf) MoveCursorEndOfFile()
- func (e *Editorleaf) MoveCursorEndOfLine()
- func (e *Editorleaf) MoveCursorEndOfLogicalLine()
- func (e *Editorleaf) MoveCursorForward()
- func (e *Editorleaf) MoveCursorNextLine()
- func (e *Editorleaf) MoveCursorNextWord()
- func (e *Editorleaf) MoveCursorPrevLine()
- func (e *Editorleaf) MoveCursorPreviousWord()
- func (e *Editorleaf) MoveCursorToLine(lineNumber int)
- func (e *Editorleaf) MoveNextFoundWord()
- func (e *Editorleaf) MovePrevFoundWord()
- func (e *Editorleaf) MoveViewHalfBackward()
- func (e *Editorleaf) MoveViewHalfForward()
- func (e *Editorleaf) OpenFile(path string) (editbuffer.Result, error)
- func (e *Editorleaf) Recenter()
- func (e *Editorleaf) Redo()
- func (e *Editorleaf) ReplaceCurrentSearchString(str string)
- func (e *Editorleaf) Resize(viewArea utils.Rect)
- func (e *Editorleaf) Resume()
- func (e *Editorleaf) RowsLength() int
- func (e *Editorleaf) RuneStatus(ch rune) string
- func (e *Editorleaf) SaveFile()
- func (e *Editorleaf) SearchRegexp(searchTerm string, caseSensitive bool, ctx context.Context)
- func (e *Editorleaf) SearchText(text string, caseSensitive, isRegexp bool, ctx context.Context)
- func (e *Editorleaf) SetCurrentMark(m *mark.Mark)
- func (e *Editorleaf) SetCursor(c editbuffer.Cursor)
- func (e *Editorleaf) SetKeyDispatcher(km *keychord.RootNode)
- func (e *Editorleaf) SetMarkAtCursor()
- func (e Editorleaf) SetRows(r [][]byte)
- func (e *Editorleaf) SwapCursorAndMark()
- func (e *Editorleaf) Undo()
- func (e *Editorleaf) WillClose()
- func (e *Editorleaf) Yank()
- func (e *Editorleaf) YankFromClipboard()
- type GuardEventStatus
- type GuardType
- type LeafType
- type MacroModeStruct
- func (m *MacroModeStruct) AbortRecording()
- func (m *MacroModeStruct) Append(ev tcell.EventKey)
- func (m *MacroModeStruct) CurrentMode() mode.Mode
- func (m *MacroModeStruct) Draw()
- func (m *MacroModeStruct) Keys() *keychord.RootNode
- func (m *MacroModeStruct) Name() string
- func (m *MacroModeStruct) Replay()
- func (m *MacroModeStruct) StartRecording()
- func (m *MacroModeStruct) StopRecording()
- func (m *MacroModeStruct) WillEnter()
- func (m *MacroModeStruct) WillExit()
- type MinibufferManagerStruct
- func (m *MinibufferManagerStruct) Active(b bool)
- func (m *MinibufferManagerStruct) Cancel()
- func (m *MinibufferManagerStruct) Close()
- func (m *MinibufferManagerStruct) Dispatch(ev tcell.EventKey) keychord.KeyDispatchTransition
- func (m *MinibufferManagerStruct) Draw(s tcell.Screen)
- func (m *MinibufferManagerStruct) Editor() *Editorleaf
- func (m *MinibufferManagerStruct) GetBytes() []byte
- func (m *MinibufferManagerStruct) GetString() string
- func (m *MinibufferManagerStruct) IsActive() bool
- func (m *MinibufferManagerStruct) MinibufferResize(overlayRect utils.Rect) int
- func (m *MinibufferManagerStruct) Priority() int
- func (m *MinibufferManagerStruct) RequiredHeight() int
- func (m *MinibufferManagerStruct) Resize(overlayRect utils.Rect)
- func (m *MinibufferManagerStruct) SetBytes(content []byte)
- func (m *MinibufferManagerStruct) SetPrompt(prompt string)
- func (m *MinibufferManagerStruct) SetString(content string)
- func (m *MinibufferManagerStruct) Start(session *Session, onComplete func(result keychord.KeyDispatchTransition))
- func (m *MinibufferManagerStruct) UniversalCancel()
- type Mode
- type QuitGuardManagerStruct
- func (q *QuitGuardManagerStruct) CurrentQuitGuardResolver() QuitGuardResolver
- func (q *QuitGuardManagerStruct) ExitApp()
- func (q *QuitGuardManagerStruct) HandleNextResolver()
- func (q *QuitGuardManagerStruct) Register(c QuitGuardResolver, t GuardType)
- func (q *QuitGuardManagerStruct) Reset(result GuardEventStatus)
- func (q *QuitGuardManagerStruct) Unregister(c QuitGuardResolver)
- type QuitGuardResolver
- type RowLayout
- type Session
Constants ¶
const ( EchoNormal activeFlag = iota EchoBlue EchoGreen EchoYellow EchoRed )
const ( INSERT syncType = iota DELETE )
Variables ¶
var ( WorkSpaces []string // directory Switches []string // prefix - Files []string )
Arguments groups
var ( // Initialization has been moved to the newEditor function // BufferSets, _ = buffer.NewBufferSets(gecore.Files) BufferSets *buffer.BufferSets Marks = mark.NewMarks() )
var ( CancelKeyOnly = keychord.NewRootNode() GlobalKey = keychord.NewRootNode() RootKey = keychord.NewRootNode() ModeManager = mode.NewManager(RootKey) // Keyboard macro mode MacroKey *keychord.RootNode = keychord.NewRootNode() MacroModeManager *mode.Manager = mode.NewManager(MacroKey) MacroMode *MacroModeStruct )
Functions ¶
func InitQuitGuardManager ¶ added in v0.1.1
func InitQuitGuardManager(quit chan struct{})
Types ¶
type BoundariesArray ¶ added in v0.1.1
type BoundariesArray struct {
// contains filtered or unexported fields
}
BoundariesArray manages layout cache information per physical row.
It lazily computes wrapping information when needed and stores per-row layout metadata.
func NewBoundariesArray ¶ added in v0.1.1
func NewBoundariesArray(editor *Editorleaf) BoundariesArray
NewBoundariesArray creates a new BoundariesArray.
func (*BoundariesArray) BoundariesLen ¶ added in v0.1.1
func (b *BoundariesArray) BoundariesLen(rowIndex int) int
BoundariesLen returns the number of logical rows (wrapped segments) for the specified physical row.
func (*BoundariesArray) Boundary ¶ added in v0.1.1
func (b *BoundariesArray) Boundary(rowIndex, logicalRowIndex int) Boundary
Boundary returns the Boundary for the specified row and logical row index.
func (*BoundariesArray) ClearAll ¶ added in v0.1.1
func (b *BoundariesArray) ClearAll()
ClearAll clears all cached layout information.
func (*BoundariesArray) Delete ¶ added in v0.1.1
func (b *BoundariesArray) Delete(rowIndex, count int) error
Delete removes count rows starting from rowIndex.
func (*BoundariesArray) GetHangingIndentWidth ¶ added in v0.1.1
func (b *BoundariesArray) GetHangingIndentWidth(rowIndex int) int
GetHangingIndentWidth returns the hanging indentation width for the specified row. It returns 0 if the row is out of range.
func (*BoundariesArray) Insert ¶ added in v0.1.1
func (b *BoundariesArray) Insert(rowIndex, count int)
Insert inserts count empty rows at rowIndex.
func (*BoundariesArray) LastBoundary ¶ added in v0.1.1
func (b *BoundariesArray) LastBoundary(rowIndex int) Boundary
LastBoundary returns the last logical row boundary for the specified physical row.
func (*BoundariesArray) Len ¶ added in v0.1.1
func (b *BoundariesArray) Len() int
Len returns the number of rows currently stored.
type Boundary ¶ added in v0.1.1
type Boundary struct {
// StartLogicalRowByteIndex is the inclusive start byte index
// within the original row.
StartLogicalRowByteIndex int
// StopLogicalRowByteIndex is the exclusive end byte index
// within the original row.
StopLogicalRowByteIndex int
// LogicalRowWidth is the rendered width (in cells)
// of this logical row.
LogicalRowWidth int
// TotalCellWidth includes tab expansion width.
TotalCellWidth int
}
Boundary represents a single wrapped logical row segment within a physical line.
A physical line (row) may be split into multiple logical rows due to wrapping. Each Boundary describes one such segment.
type CancelManagerStruct ¶ added in v0.1.1
type CancelManagerStruct struct {
// contains filtered or unexported fields
}
func CancelManager ¶ added in v0.1.1
func CancelManager() *CancelManagerStruct
func (*CancelManagerStruct) CancelAll ¶ added in v0.1.1
func (m *CancelManagerStruct) CancelAll()
func (*CancelManagerStruct) CancelTop ¶ added in v0.1.1
func (m *CancelManagerStruct) CancelTop() bool
func (*CancelManagerStruct) Register ¶ added in v0.1.1
func (m *CancelManagerStruct) Register(c Cancelable)
Manager を Cancelable として登録する Cancelable = Manager Session = 状態 Popupmenu / Editorleaf = 部品 Cancel / Close / Dispatch 集約点は CancelManager
func (*CancelManagerStruct) Unregister ¶ added in v0.1.1
func (m *CancelManagerStruct) Unregister(c Cancelable)
type Cancelable ¶ added in v0.1.1
type EchoStruct ¶ added in v0.1.1
type EchoStruct struct {
// contains filtered or unexported fields
}
Required implement Overlay interface
var Echo *EchoStruct = NewEcho()
func NewEcho ¶ added in v0.1.1
func NewEcho() *EchoStruct
func (*EchoStruct) AddText ¶ added in v0.1.1
func (e *EchoStruct) AddText(s ...string) *chainStruct
func (*EchoStruct) Clear ¶ added in v0.1.1
func (e *EchoStruct) Clear()
func (*EchoStruct) Draw ¶ added in v0.1.1
func (e *EchoStruct) Draw(screen tcell.Screen)
func (*EchoStruct) IsActive ¶ added in v0.1.1
func (e *EchoStruct) IsActive() bool
Overlay interface
func (*EchoStruct) RequiredHeight ¶ added in v0.1.1
func (e *EchoStruct) RequiredHeight() int
Overlay interface
func (*EchoStruct) Resize ¶ added in v0.1.1
func (e *EchoStruct) Resize(overlayRect utils.Rect)
func (*EchoStruct) SetText ¶ added in v0.1.1
func (e *EchoStruct) SetText(s string) *chainStruct
func (*EchoStruct) UniversalCancel ¶ added in v0.1.1
func (e *EchoStruct) UniversalCancel()
type EditorKeymapBinder ¶ added in v0.1.1
type EditorKeymapBinder func(root *keychord.RootNode, editor *Editorleaf)
type Editorleaf ¶ added in v0.1.1
type Editorleaf struct {
// contains filtered or unexported fields
}
Editorleaf Struct implements the gecore.tree.Leaf interface
func NewMinibufferLeaf ¶ added in v0.1.1
func NewMinibufferLeaf() *Editorleaf
MinibufferLeaf は tree に属さない Editor が生成されたタイミングで keymap をバインドしない
func (*Editorleaf) Active ¶ added in v0.1.1
func (e *Editorleaf) Active(a bool)
func (*Editorleaf) Autoindent ¶ added in v0.1.1
func (e *Editorleaf) Autoindent()
func (Editorleaf) BackwardKillLine ¶ added in v0.1.1
func (e Editorleaf) BackwardKillLine()
unix-line-discard backward-kill-line
func (*Editorleaf) ChangeFilePath ¶ added in v0.1.1
func (e *Editorleaf) ChangeFilePath(path string)
If an existing file is specified, it will be overwritten Backup works so no data is lost, but...
func (*Editorleaf) CharInfo ¶ added in v0.1.1
func (e *Editorleaf) CharInfo()
func (*Editorleaf) CommandPalette ¶ added in v0.1.1
func (e *Editorleaf) CommandPalette(s string)
func (*Editorleaf) CopyRegion ¶ added in v0.1.1
func (e *Editorleaf) CopyRegion()
Copy cursor region to Kill Buffer and Clipboard
func (*Editorleaf) DeleteRune ¶ added in v0.1.1
func (e *Editorleaf) 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 (*Editorleaf) DeleteRuneBackward ¶ added in v0.1.1
func (e *Editorleaf) DeleteRuneBackward()
func (*Editorleaf) DispatchKey ¶ added in v0.1.1
func (e *Editorleaf) DispatchKey(ev tcell.EventKey) (string, keychord.KeyDispatchTransition)
func (*Editorleaf) Draw ¶ added in v0.1.1
func (e *Editorleaf) Draw()
func (*Editorleaf) FilterByCharacters ¶ added in v0.1.1
func (e *Editorleaf) FilterByCharacters(chars string) []*mark.Mark
func (*Editorleaf) GetBuffers ¶ added in v0.1.1
func (e *Editorleaf) GetBuffers() *buffer.BufferSets
func (*Editorleaf) GetBuffersFilterByCharacters ¶ added in v0.1.1
func (e *Editorleaf) GetBuffersFilterByCharacters(chars string) *buffer.BufferSets
func (*Editorleaf) GetBytes ¶ added in v0.1.1
func (e *Editorleaf) GetBytes() []byte
編集中のテキストの []byte を返す editorleaf.editbuffer.RowsStruct.Bytes() のラッパー
func (*Editorleaf) GetPath ¶ added in v0.1.1
func (e *Editorleaf) GetPath() string
func (*Editorleaf) GetString ¶ added in v0.1.1
func (e *Editorleaf) GetString() string
func (*Editorleaf) Init ¶ added in v0.1.1
func (e *Editorleaf) Init()
func (*Editorleaf) InsertRune ¶ added in v0.1.1
func (e *Editorleaf) InsertRune(ch rune)
Wrapper is insertBytes
func (*Editorleaf) InsertString ¶ added in v0.1.1
func (e *Editorleaf) InsertString(s string)
Wrapper is insertBytes
func (*Editorleaf) InsertTab ¶ added in v0.1.1
func (e *Editorleaf) InsertTab()
func (*Editorleaf) IsActive ¶ added in v0.1.1
func (e *Editorleaf) IsActive() bool
func (*Editorleaf) IsDirtyFlag ¶ added in v0.1.1
func (e *Editorleaf) IsDirtyFlag() bool
func (Editorleaf) IsEndOfLine ¶ added in v0.1.1
func (e Editorleaf) IsEndOfLine() bool
func (*Editorleaf) IsRedoEmpty ¶ added in v0.1.1
func (e *Editorleaf) IsRedoEmpty() bool
func (*Editorleaf) KillLine ¶ added in v0.1.1
func (e *Editorleaf) 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 (*Editorleaf) KillRegion ¶ added in v0.1.1
func (e *Editorleaf) KillRegion()
Kill region between last mark to cursor and push undo and kill buffers
func (*Editorleaf) LeafType ¶ added in v0.1.1
func (e *Editorleaf) LeafType() tree.LeafType
func (*Editorleaf) MinibufferMode ¶ added in v0.1.1
func (e *Editorleaf) MinibufferMode(mode Mode)
func (*Editorleaf) MoveCursorBackward ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorBackward()
Move cursor one character backward.
func (*Editorleaf) MoveCursorBeginningOfFile ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorBeginningOfFile()
func (*Editorleaf) MoveCursorBeginningOfLine ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorBeginningOfLine()
Move cursor to the beginning of the line. Consider indentation
func (*Editorleaf) MoveCursorBeginningOfLogicalLine ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorBeginningOfLogicalLine()
Move cursor to the beginning of the logical row. Consider logical row Consider indentation....
func (*Editorleaf) MoveCursorEndOfFile ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorEndOfFile()
func (*Editorleaf) MoveCursorEndOfLine ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorEndOfLine()
Move cursor to the end of the line.
func (*Editorleaf) MoveCursorEndOfLogicalLine ¶ added in v0.1.1
func (e *Editorleaf) 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 (*Editorleaf) MoveCursorForward ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorForward()
Move cursor one character forward.
func (*Editorleaf) MoveCursorNextLine ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorNextLine()
Move cursor to the next line.
func (*Editorleaf) MoveCursorNextWord ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorNextWord()
Move cursor to next word.
func (*Editorleaf) MoveCursorPrevLine ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorPrevLine()
Move cursor to the previous line.
func (*Editorleaf) MoveCursorPreviousWord ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorPreviousWord()
func (*Editorleaf) MoveCursorToLine ¶ added in v0.1.1
func (e *Editorleaf) MoveCursorToLine(lineNumber int)
func (*Editorleaf) MoveNextFoundWord ¶ added in v0.1.1
func (e *Editorleaf) MoveNextFoundWord()
func (*Editorleaf) MovePrevFoundWord ¶ added in v0.1.1
func (e *Editorleaf) MovePrevFoundWord()
func (*Editorleaf) MoveViewHalfBackward ¶ added in v0.1.1
func (e *Editorleaf) MoveViewHalfBackward()
Move view 'n' lines forward or backward.
func (*Editorleaf) MoveViewHalfForward ¶ added in v0.1.1
func (e *Editorleaf) MoveViewHalfForward()
Move view 'n' lines forward or backward only if it's possible.
func (*Editorleaf) OpenFile ¶ added in v0.1.1
func (e *Editorleaf) OpenFile(path string) (editbuffer.Result, error)
If the file has already been read, use that buffer
func (*Editorleaf) Recenter ¶ added in v0.1.1
func (e *Editorleaf) Recenter()
func (*Editorleaf) Redo ¶ added in v0.1.1
func (e *Editorleaf) Redo()
func (*Editorleaf) ReplaceCurrentSearchString ¶ added in v0.1.1
func (e *Editorleaf) ReplaceCurrentSearchString(str string)
func (*Editorleaf) Resize ¶ added in v0.1.1
func (e *Editorleaf) Resize(viewArea utils.Rect)
func (*Editorleaf) Resume ¶ added in v0.1.1
func (e *Editorleaf) Resume()
func (*Editorleaf) RowsLength ¶ added in v0.1.1
func (e *Editorleaf) RowsLength() int
func (*Editorleaf) RuneStatus ¶ added in v0.1.1
func (e *Editorleaf) RuneStatus(ch rune) string
Convert rune to displaying string on mode line Conversion target:
- control code: ^X
- newline code
Line feed code is depending the editing buffer newline
func (*Editorleaf) SaveFile ¶ added in v0.1.1
func (e *Editorleaf) SaveFile()
If the file does not exist, a backup error will occur
func (*Editorleaf) SearchRegexp ¶ added in v0.1.1
func (e *Editorleaf) SearchRegexp(searchTerm string, caseSensitive bool, ctx context.Context)
func (*Editorleaf) SearchText ¶ added in v0.1.1
func (e *Editorleaf) SearchText(text string, caseSensitive, isRegexp bool, ctx context.Context)
When not using regular expressions
func (*Editorleaf) SetCurrentMark ¶ added in v0.1.1
func (e *Editorleaf) SetCurrentMark(m *mark.Mark)
func (*Editorleaf) SetCursor ¶ added in v0.1.1
func (e *Editorleaf) SetCursor(c editbuffer.Cursor)
func (*Editorleaf) SetKeyDispatcher ¶ added in v0.1.1
func (e *Editorleaf) SetKeyDispatcher(km *keychord.RootNode)
func (*Editorleaf) SetMarkAtCursor ¶ added in v0.1.1
func (e *Editorleaf) SetMarkAtCursor()
func (Editorleaf) SetRows ¶ added in v0.1.1
func (e Editorleaf) SetRows(r [][]byte)
func (*Editorleaf) SwapCursorAndMark ¶ added in v0.1.1
func (e *Editorleaf) SwapCursorAndMark()
func (*Editorleaf) Undo ¶ added in v0.1.1
func (e *Editorleaf) Undo()
func (*Editorleaf) WillClose ¶ added in v0.1.1
func (e *Editorleaf) WillClose()
func (*Editorleaf) Yank ¶ added in v0.1.1
func (e *Editorleaf) Yank()
func (*Editorleaf) YankFromClipboard ¶ added in v0.1.1
func (e *Editorleaf) YankFromClipboard()
type GuardEventStatus ¶ added in v0.1.1
type GuardEventStatus int
const ( EventWait GuardEventStatus = iota EventGaveUp EventReadyToClose )
type LeafType ¶ added in v0.1.1
type LeafType struct {
// contains filtered or unexported fields
}
Implements LeafType interface
func NewLeafType ¶ added in v0.1.1
func NewLeafType(bind EditorKeymapBinder) *LeafType
type MacroModeStruct ¶ added in v0.1.1
type MacroModeStruct struct {
ModeManager *mode.Manager
RootNode *keychord.RootNode
// contains filtered or unexported fields
}
func NewMacroMode ¶ added in v0.1.1
func NewMacroMode(mm *mode.Manager, key func(*keychord.RootNode, *MacroModeStruct), dispatch func(tcell.EventKey)) *MacroModeStruct
func (*MacroModeStruct) AbortRecording ¶ added in v0.1.1
func (m *MacroModeStruct) AbortRecording()
func (*MacroModeStruct) Append ¶ added in v0.1.1
func (m *MacroModeStruct) Append(ev tcell.EventKey)
func (*MacroModeStruct) CurrentMode ¶ added in v0.1.1
func (m *MacroModeStruct) CurrentMode() mode.Mode
--- Mode pointer ---
func (*MacroModeStruct) Draw ¶ added in v0.1.1
func (m *MacroModeStruct) Draw()
func (*MacroModeStruct) Keys ¶ added in v0.1.1
func (m *MacroModeStruct) Keys() *keychord.RootNode
func (*MacroModeStruct) Name ¶ added in v0.1.1
func (m *MacroModeStruct) Name() string
--- Mode interface ---
func (*MacroModeStruct) Replay ¶ added in v0.1.1
func (m *MacroModeStruct) Replay()
func (*MacroModeStruct) StartRecording ¶ added in v0.1.1
func (m *MacroModeStruct) StartRecording()
--- Macro functions ---
func (*MacroModeStruct) StopRecording ¶ added in v0.1.1
func (m *MacroModeStruct) StopRecording()
func (*MacroModeStruct) WillEnter ¶ added in v0.1.1
func (m *MacroModeStruct) WillEnter()
func (*MacroModeStruct) WillExit ¶ added in v0.1.1
func (m *MacroModeStruct) WillExit()
type MinibufferManagerStruct ¶ added in v0.1.1
type MinibufferManagerStruct struct {
// contains filtered or unexported fields
}
Required implement Overlay interface
func MinibufferManager ¶ added in v0.1.1
func MinibufferManager() *MinibufferManagerStruct
func (*MinibufferManagerStruct) Active ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Active(b bool)
func (*MinibufferManagerStruct) Cancel ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Cancel()
func (*MinibufferManagerStruct) Close ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Close()
func (*MinibufferManagerStruct) Dispatch ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Dispatch(ev tcell.EventKey) keychord.KeyDispatchTransition
func (*MinibufferManagerStruct) Draw ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Draw(s tcell.Screen)
func (*MinibufferManagerStruct) Editor ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Editor() *Editorleaf
func (*MinibufferManagerStruct) GetBytes ¶ added in v0.1.1
func (m *MinibufferManagerStruct) GetBytes() []byte
Return input content
func (*MinibufferManagerStruct) GetString ¶ added in v0.1.1
func (m *MinibufferManagerStruct) GetString() string
Return input content
func (*MinibufferManagerStruct) IsActive ¶ added in v0.1.1
func (m *MinibufferManagerStruct) IsActive() bool
func (*MinibufferManagerStruct) MinibufferResize ¶ added in v0.1.1
func (m *MinibufferManagerStruct) MinibufferResize(overlayRect utils.Rect) int
return Remaining height overlayRect.Height: この値のみ画面の高さ
func (*MinibufferManagerStruct) Priority ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Priority() int
func (*MinibufferManagerStruct) RequiredHeight ¶ added in v0.1.1
func (m *MinibufferManagerStruct) RequiredHeight() int
return minibuffer height
func (*MinibufferManagerStruct) Resize ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Resize(overlayRect utils.Rect)
func (*MinibufferManagerStruct) SetBytes ¶ added in v0.1.1
func (m *MinibufferManagerStruct) SetBytes(content []byte)
func (*MinibufferManagerStruct) SetPrompt ¶ added in v0.1.1
func (m *MinibufferManagerStruct) SetPrompt(prompt string)
func (*MinibufferManagerStruct) SetString ¶ added in v0.1.1
func (m *MinibufferManagerStruct) SetString(content string)
func (*MinibufferManagerStruct) Start ¶ added in v0.1.1
func (m *MinibufferManagerStruct) Start(session *Session, onComplete func(result keychord.KeyDispatchTransition))
func (*MinibufferManagerStruct) UniversalCancel ¶ added in v0.1.1
func (m *MinibufferManagerStruct) UniversalCancel()
type QuitGuardManagerStruct ¶ added in v0.1.1
type QuitGuardManagerStruct struct {
// contains filtered or unexported fields
}
var ( QuitGuardManager *QuitGuardManagerStruct = &QuitGuardManagerStruct{ timeout: 10 * time.Second, } )
func (*QuitGuardManagerStruct) CurrentQuitGuardResolver ¶ added in v0.1.1
func (q *QuitGuardManagerStruct) CurrentQuitGuardResolver() QuitGuardResolver
func (*QuitGuardManagerStruct) ExitApp ¶ added in v0.1.1
func (q *QuitGuardManagerStruct) ExitApp()
func (*QuitGuardManagerStruct) HandleNextResolver ¶ added in v0.1.1
func (q *QuitGuardManagerStruct) HandleNextResolver()
func (*QuitGuardManagerStruct) Register ¶ added in v0.1.1
func (q *QuitGuardManagerStruct) Register(c QuitGuardResolver, t GuardType)
func (*QuitGuardManagerStruct) Reset ¶ added in v0.1.1
func (q *QuitGuardManagerStruct) Reset(result GuardEventStatus)
func (*QuitGuardManagerStruct) Unregister ¶ added in v0.1.1
func (q *QuitGuardManagerStruct) Unregister(c QuitGuardResolver)
type QuitGuardResolver ¶ added in v0.1.1
type QuitGuardResolver interface {
Priority() int
Name() string
Keys() *keychord.RootNode
WillEnter()
WillExit()
Draw()
}
func NewQuitGuard ¶ added in v0.1.1
func NewQuitGuard(bufferSets *buffer.BufferSets) QuitGuardResolver
type RowLayout ¶ added in v0.1.1
type RowLayout struct {
// Boundaries contains all wrapped logical row segments.
Boundaries []Boundary
// HangingIndentWidth is the indentation width applied to
// wrapped logical rows after the first one.
HangingIndentWidth int
}
RowLayout represents layout information for a single physical row.
It contains all computed wrapping boundaries and additional layout metadata such as hanging indentation width.
type Session ¶ added in v0.1.1
type Session struct {
Editor *Editorleaf
Prompt string
PromptWidth int
Mode Mode
}
func NewSession ¶ added in v0.1.1
func NewSession( prompt string, bind func(*keychord.RootNode, *Editorleaf), ) *Session
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
gecore/modes/redo_mode.go 最もシンプルなモード
|
gecore/modes/redo_mode.go 最もシンプルなモード |
|
gecore/popupmenu/popupmenu.go
|
gecore/popupmenu/popupmenu.go |
|
editorleaf/search/search.go
|
editorleaf/search/search.go |