Documentation ¶
Index ¶
- Variables
- func ContentCmdFromTextArea(erow *ERow, index int)
- func DeleteSession(ed *Editor, part *toolbarparser.Part)
- func ExecCmd(ctx context.Context, dir string, args ...string) ([]byte, error)
- func ExecCmdStdin(ctx context.Context, dir string, rd io.Reader, args ...string) ([]byte, error)
- func ExternalCmd(erow *ERow, part *toolbarparser.Part)
- func ExternalCmdFromArgs(erow *ERow, cargs []string, fend func(error))
- func FindFileInfo(name, dir string) (string, os.FileInfo, bool)
- func FindShortcut(erow *ERow)
- func InternalCmdFromRootTb(ed *Editor, tb *ui.Toolbar)
- func InternalCmdFromRowTb(erow *ERow)
- func ListDirContext(ctx context.Context, w io.Writer, filepath string, tree, hidden bool) error
- func ListDirERow(erow *ERow, filepath string, tree, hidden bool)
- func ListSessions(ed *Editor)
- func OpenFileERow(ed *Editor, conf *OpenFileERowConfig)
- func OpenSession(ed *Editor, part *toolbarparser.Part)
- func OpenSessionFromString(ed *Editor, sessionName string)
- func SaveSession(ed *Editor, part *toolbarparser.Part)
- type ByListOrder
- type ColumnState
- type ContentCmd
- type ContentCmdFn
- type DndHandler
- type EEventId
- type EEvents
- type ERow
- func ExistingERowOrNewBasic(ed *Editor, name string) (_ *ERow, isNew bool)
- func ExistingERowOrNewLoaded(ed *Editor, name string) (_ *ERow, isNew bool, _ error)
- func NewBasicERow(info *ERowInfo, rowPos *ui.RowPos) *ERow
- func NewLoadedERow(info *ERowInfo, rowPos *ui.RowPos) (*ERow, error)
- func NewLoadedERowOrNewBasic(info *ERowInfo, rowPos *ui.RowPos) *ERow
- func (erow *ERow) CancelContentCmd()
- func (erow *ERow) CancelInternalCmd()
- func (erow *ERow) Flash()
- func (erow *ERow) MakeIndexVisibleAndFlash(index int)
- func (erow *ERow) MakeRangeVisibleAndFlash(index int, len int)
- func (erow *ERow) Reload()
- func (erow *ERow) TextAreaAppendBytes(p []byte)
- func (erow *ERow) TextAreaAppendBytesAsync(p []byte) func()
- func (erow *ERow) TextAreaReadWriteCloser() io.ReadWriteCloser
- func (erow *ERow) ToolbarSetStrAfterNameClearHistory(s string)
- func (erow *ERow) UpdateToolbarNameEncoding()
- type ERowExec
- type ERowInfo
- func (info *ERowInfo) AddERow(erow *ERow)
- func (info *ERowInfo) Dir() string
- func (info *ERowInfo) ERowsInUIOrder() []*ERow
- func (info *ERowInfo) EqualToBytesHash(size int, hash []byte) bool
- func (info *ERowInfo) FileInfoErr() error
- func (info *ERowInfo) FirstERow() (*ERow, bool)
- func (info *ERowInfo) HandleRWEvWrite2(erow *ERow, ev *iorw.RWEvWrite2)
- func (info *ERowInfo) HasFileinfo() bool
- func (info *ERowInfo) HasRowState(st ui.RowState) bool
- func (info *ERowInfo) IsDir() bool
- func (info *ERowInfo) IsFileButNotDir() bool
- func (info *ERowInfo) IsNotExist() bool
- func (info *ERowInfo) IsSpecial() bool
- func (info *ERowInfo) Name() string
- func (info *ERowInfo) ReloadFile() error
- func (info *ERowInfo) RemoveERow(erow *ERow)
- func (info *ERowInfo) SaveFile() error
- func (info *ERowInfo) SetRowsBytes(b []byte)
- func (info *ERowInfo) UpdateActiveRowState(erow *ERow)
- func (info *ERowInfo) UpdateAnnotationsEditedRowState(v bool)
- func (info *ERowInfo) UpdateAnnotationsRowState(v bool)
- func (info *ERowInfo) UpdateDiskEvent()
- func (info *ERowInfo) UpdateDuplicateHighlightRowState()
- func (info *ERowInfo) UpdateDuplicateRowState()
- func (info *ERowInfo) UpdateEditedRowState()
- func (info *ERowInfo) UpdateExistsRowState()
- func (info *ERowInfo) UpdateFsDifferRowState()
- type ERowTermIO
- type EdAnnotationsRequester
- type Editor
- func (ed *Editor) ActiveERow() (*ERow, bool)
- func (ed *Editor) CanModifyAnnotations(req EdAnnotationsRequester, ta *ui.TextArea, option string) bool
- func (ed *Editor) Close()
- func (ed *Editor) DeleteERowInfo(name string)
- func (ed *Editor) ERowInfo(name string) (*ERowInfo, bool)
- func (ed *Editor) ERowInfoKey(name string) string
- func (ed *Editor) ERowInfos() []*ERowInfo
- func (ed *Editor) ERows() []*ERow
- func (ed *Editor) EnsureOneColumn()
- func (ed *Editor) Error(err error)
- func (ed *Editor) Errorf(f string, a ...interface{})
- func (ed *Editor) GoodRowPos() *ui.RowPos
- func (ed *Editor) Message(s string)
- func (ed *Editor) Messagef(f string, a ...interface{})
- func (ed *Editor) NewColumn() *ui.Column
- func (ed *Editor) NodeERow(node widget.Node) (*ERow, bool)
- func (ed *Editor) ReadERowInfo(name string) *ERowInfo
- func (ed *Editor) RunAsyncBusyCursor(node widget.Node, fn func(done func()))
- func (ed *Editor) SetAnnotations(req EdAnnotationsRequester, ta *ui.TextArea, on bool, selIndex int, ...)
- func (ed *Editor) SetERowInfo(name string, info *ERowInfo)
- type GDDataIndex
- type GDFileMsgs
- type GDLineMsg
- type GDLineMsgs
- type GoDebugInstance
- type GoDebugManager
- func (gdm *GoDebugManager) AnnotationFind(s string) error
- func (gdm *GoDebugManager) CancelAndClear()
- func (gdm *GoDebugManager) Printf(format string, args ...interface{})
- func (gdm *GoDebugManager) RunAsync(reqCtx context.Context, erow *ERow, args []string) error
- func (gdm *GoDebugManager) SelectAnnotation(rowPos *ui.RowPos, ev *ui.RootSelectAnnotationEvent)
- func (gdm *GoDebugManager) SelectERowAnnotation(erow *ERow, ev *ui.TextAreaSelectAnnotationEvent)
- func (gdm *GoDebugManager) UpdateUIERowInfo(info *ERowInfo)
- type HomeVars
- type InfoFloatBoxWrap
- type InlineComplete
- type InternalCmd
- type InternalCmdArgs
- type InternalCmdFn
- type OpenFileERowConfig
- type Options
- type Plug
- type Plugins
- type PostFileSaveEEvent
- type PostNewERowEEvent
- type PreRowCloseEEvent
- type RegistrationsOpt
- type RowReopener
- type RowState
- type RowStateChangeEEvent
- type Session
- type Sessions
- type TerminalFilter
- type TerminalIO
Constants ¶
This section is empty.
Variables ¶
var ContentCmds contentCmds
global cmds added via init() from "contentcmds" pkg
var InternalCmds = internalCmds{}
cmds added via init() from "internalcmds" pkg
Functions ¶
func ContentCmdFromTextArea ¶
func DeleteSession ¶
func DeleteSession(ed *Editor, part *toolbarparser.Part)
func ExecCmdStdin ¶
func ExternalCmd ¶
func ExternalCmd(erow *ERow, part *toolbarparser.Part)
func ExternalCmdFromArgs ¶
func FindFileInfo ¶
Checks in GOROOT/GOPATH, and some C include dirs.
func FindShortcut ¶
func FindShortcut(erow *ERow)
Search/add the toolbar find command and warps the pointer to it.
func InternalCmdFromRootTb ¶
func InternalCmdFromRowTb ¶
func InternalCmdFromRowTb(erow *ERow)
func ListDirContext ¶
func ListDirERow ¶
func ListSessions ¶
func ListSessions(ed *Editor)
func OpenFileERow ¶
func OpenFileERow(ed *Editor, conf *OpenFileERowConfig)
TODO: make it UI safe? rename to openfileerowasync?
func OpenSession ¶
func OpenSession(ed *Editor, part *toolbarparser.Part)
func OpenSessionFromString ¶
func SaveSession ¶
func SaveSession(ed *Editor, part *toolbarparser.Part)
Types ¶
type ByListOrder ¶
func (ByListOrder) Len ¶
func (a ByListOrder) Len() int
func (ByListOrder) Less ¶
func (a ByListOrder) Less(i, j int) bool
func (ByListOrder) Swap ¶
func (a ByListOrder) Swap(i, j int)
type ColumnState ¶
func NewColumnState ¶
func NewColumnState(ed *Editor, col *ui.Column) *ColumnState
type ContentCmd ¶
type ContentCmd struct { Name string // for removal and error msgs Fn ContentCmdFn }
type ContentCmdFn ¶
type DndHandler ¶
type DndHandler struct {
// contains filtered or unexported fields
}
func NewDndHandler ¶
func NewDndHandler(ed *Editor) *DndHandler
func (*DndHandler) OnDrop ¶
func (h *DndHandler) OnDrop(ev *event.DndDrop)
func (*DndHandler) OnPosition ¶
func (h *DndHandler) OnPosition(ev *event.DndPosition)
type EEvents ¶
type EEvents struct {
// contains filtered or unexported fields
}
Editor events.
func NewEEvents ¶
func NewEEvents() *EEvents
type ERow ¶
type ERow struct { Ed *Editor Row *ui.Row Info *ERowInfo Exec *ERowExec TbData toolbarparser.Data // contains filtered or unexported fields }
func ExistingERowOrNewBasic ¶
Used for ex. in: +messages, +sessions.
func ExistingERowOrNewLoaded ¶
func NewLoadedERowOrNewBasic ¶
Allows creating rows in place even if a file/dir doesn't exist anymore (ex: show non-existent files rows in a saved session).
func (*ERow) CancelContentCmd ¶
func (erow *ERow) CancelContentCmd()
func (*ERow) CancelInternalCmd ¶
func (erow *ERow) CancelInternalCmd()
func (*ERow) MakeIndexVisibleAndFlash ¶
func (*ERow) MakeRangeVisibleAndFlash ¶
func (*ERow) TextAreaAppendBytesAsync ¶
UI safe, with option to wait.
func (*ERow) TextAreaReadWriteCloser ¶
func (erow *ERow) TextAreaReadWriteCloser() io.ReadWriteCloser
func (*ERow) ToolbarSetStrAfterNameClearHistory ¶
func (*ERow) UpdateToolbarNameEncoding ¶
func (erow *ERow) UpdateToolbarNameEncoding()
type ERowExec ¶
type ERowExec struct {
// contains filtered or unexported fields
}
func NewERowExec ¶
type ERowInfo ¶
type ERowInfo struct { Ed *Editor ERows []*ERow // added order // contains filtered or unexported fields }
Editor Row Info.
func (*ERowInfo) ERowsInUIOrder ¶
func (*ERowInfo) EqualToBytesHash ¶
func (*ERowInfo) FileInfoErr ¶
func (*ERowInfo) HandleRWEvWrite2 ¶
func (info *ERowInfo) HandleRWEvWrite2(erow *ERow, ev *iorw.RWEvWrite2)
func (*ERowInfo) HasFileinfo ¶
func (*ERowInfo) IsFileButNotDir ¶
func (*ERowInfo) IsNotExist ¶
func (*ERowInfo) ReloadFile ¶
func (*ERowInfo) RemoveERow ¶
func (*ERowInfo) SetRowsBytes ¶
func (*ERowInfo) UpdateActiveRowState ¶
func (*ERowInfo) UpdateAnnotationsEditedRowState ¶
func (*ERowInfo) UpdateAnnotationsRowState ¶
func (*ERowInfo) UpdateDiskEvent ¶
func (info *ERowInfo) UpdateDiskEvent()
Should be called under UI goroutine.
func (*ERowInfo) UpdateDuplicateHighlightRowState ¶
func (info *ERowInfo) UpdateDuplicateHighlightRowState()
func (*ERowInfo) UpdateDuplicateRowState ¶
func (info *ERowInfo) UpdateDuplicateRowState()
func (*ERowInfo) UpdateEditedRowState ¶
func (info *ERowInfo) UpdateEditedRowState()
func (*ERowInfo) UpdateExistsRowState ¶
func (info *ERowInfo) UpdateExistsRowState()
func (*ERowInfo) UpdateFsDifferRowState ¶
func (info *ERowInfo) UpdateFsDifferRowState()
type ERowTermIO ¶
type ERowTermIO struct {
// contains filtered or unexported fields
}
func NewERowTermIO ¶
func NewERowTermIO(erow *ERow) *ERowTermIO
func (*ERowTermIO) AddToRead ¶
func (tio *ERowTermIO) AddToRead(b []byte)
func (*ERowTermIO) Close ¶
func (tio *ERowTermIO) Close() error
func (*ERowTermIO) Init ¶
func (tio *ERowTermIO) Init(tf *TerminalFilter)
func (*ERowTermIO) WriteOp ¶
func (tio *ERowTermIO) WriteOp(op interface{}) error
type EdAnnotationsRequester ¶
type EdAnnotationsRequester int
const ( EdAnnReqGoDebug EdAnnotationsRequester = iota EdAnnReqInlineComplete )
type Editor ¶
type Editor struct { UI *ui.UI HomeVars *HomeVars Watcher fswatcher.Watcher RowReopener *RowReopener GoDebug *GoDebugManager LSProtoMan *lsproto.Manager InlineComplete *InlineComplete Plugins *Plugins EEvents *EEvents // editor events (used by plugins) FsCaseInsensitive bool // filesystem // contains filtered or unexported fields }
func (*Editor) ActiveERow ¶
func (*Editor) CanModifyAnnotations ¶
func (*Editor) DeleteERowInfo ¶
func (*Editor) ERowInfoKey ¶
func (*Editor) EnsureOneColumn ¶
func (ed *Editor) EnsureOneColumn()
func (*Editor) GoodRowPos ¶
func (*Editor) ReadERowInfo ¶
func (*Editor) RunAsyncBusyCursor ¶
Caller should call done function in the end.
func (*Editor) SetAnnotations ¶
func (ed *Editor) SetAnnotations(req EdAnnotationsRequester, ta *ui.TextArea, on bool, selIndex int, entries []*drawer4.Annotation)
func (*Editor) SetERowInfo ¶
type GDDataIndex ¶
type GDDataIndex struct { sync.RWMutex // used internally, not to be locked outside // contains filtered or unexported fields }
GoDebug data Index
func NewGDDataIndex ¶
func NewGDDataIndex(ed *Editor) *GDDataIndex
func (*GDDataIndex) FilesIndex ¶
func (di *GDDataIndex) FilesIndex(name string) (int, bool)
func (*GDDataIndex) FilesIndexKey ¶
func (di *GDDataIndex) FilesIndexKey(name string) string
type GDFileMsgs ¶
type GDFileMsgs struct {
// contains filtered or unexported fields
}
func NewGDFileMsgs ¶
func NewGDFileMsgs(n int) *GDFileMsgs
type GDLineMsgs ¶
type GDLineMsgs struct {
// contains filtered or unexported fields
}
type GoDebugInstance ¶
type GoDebugInstance struct {
// contains filtered or unexported fields
}
type GoDebugManager ¶
type GoDebugManager struct {
// contains filtered or unexported fields
}
func NewGoDebugManager ¶
func NewGoDebugManager(ed *Editor) *GoDebugManager
func (*GoDebugManager) AnnotationFind ¶
func (gdm *GoDebugManager) AnnotationFind(s string) error
func (*GoDebugManager) CancelAndClear ¶
func (gdm *GoDebugManager) CancelAndClear()
func (*GoDebugManager) Printf ¶
func (gdm *GoDebugManager) Printf(format string, args ...interface{})
func (*GoDebugManager) SelectAnnotation ¶
func (gdm *GoDebugManager) SelectAnnotation(rowPos *ui.RowPos, ev *ui.RootSelectAnnotationEvent)
func (*GoDebugManager) SelectERowAnnotation ¶
func (gdm *GoDebugManager) SelectERowAnnotation(erow *ERow, ev *ui.TextAreaSelectAnnotationEvent)
func (*GoDebugManager) UpdateUIERowInfo ¶
func (gdm *GoDebugManager) UpdateUIERowInfo(info *ERowInfo)
type HomeVars ¶
type HomeVars struct {
// contains filtered or unexported fields
}
func NewHomeVars ¶
func NewHomeVars() *HomeVars
func (*HomeVars) ParseToolbarVars ¶
type InfoFloatBoxWrap ¶
type InfoFloatBoxWrap struct {
// contains filtered or unexported fields
}
func NewInfoFloatBox ¶
func NewInfoFloatBox(ed *Editor) *InfoFloatBoxWrap
func (*InfoFloatBoxWrap) Cancel ¶
func (ifbw *InfoFloatBoxWrap) Cancel()
type InlineComplete ¶
type InlineComplete struct {
// contains filtered or unexported fields
}
func NewInlineComplete ¶
func NewInlineComplete(ed *Editor) *InlineComplete
func (*InlineComplete) CancelAndClear ¶
func (ic *InlineComplete) CancelAndClear()
func (*InlineComplete) CancelOnCursorChange ¶
func (ic *InlineComplete) CancelOnCursorChange()
func (*InlineComplete) Complete ¶
func (ic *InlineComplete) Complete(erow *ERow, ev *ui.TextAreaInlineCompleteEvent) bool
type InternalCmd ¶
type InternalCmd struct { Name string Fn InternalCmdFn NeedsERow bool Detach bool // run outside UI goroutine (care must be taken) }
type InternalCmdArgs ¶
type InternalCmdFn ¶
type InternalCmdFn func(args *InternalCmdArgs) error
type OpenFileERowConfig ¶
type Options ¶
type Options struct { Font string FontSize float64 FontHinting string DPI float64 TabWidth int WrapLineRune int ColorTheme string CommentsColor int StringsColor int ScrollBarWidth int ScrollBarLeft bool Shadows bool SessionName string Filenames []string UseMultiKey bool Plugins string LSProtos RegistrationsOpt }
type Plugins ¶
type Plugins struct {
// contains filtered or unexported fields
}
func NewPlugins ¶
func (*Plugins) RunAutoComplete ¶
func (p *Plugins) RunAutoComplete(ctx context.Context, cfb *ui.ContextFloatBox) (_ error, handled bool)
Runs all plugins until it finds one that returns handled=true and has no errors.
func (*Plugins) RunToolbarCmd ¶
func (p *Plugins) RunToolbarCmd(erow *ERow, part *toolbarparser.Part) bool
type PostFileSaveEEvent ¶
type PostFileSaveEEvent struct {
Info *ERowInfo
}
type PostNewERowEEvent ¶
type PostNewERowEEvent struct {
ERow *ERow
}
type PreRowCloseEEvent ¶
type PreRowCloseEEvent struct {
ERow *ERow
}
type RegistrationsOpt ¶
type RegistrationsOpt struct {
// contains filtered or unexported fields
}
implements flag.Value interface
func (*RegistrationsOpt) MustSet ¶
func (ro *RegistrationsOpt) MustSet(s string)
func (*RegistrationsOpt) Set ¶
func (ro *RegistrationsOpt) Set(s string) error
func (*RegistrationsOpt) String ¶
func (ro *RegistrationsOpt) String() string
type RowReopener ¶
type RowReopener struct {
// contains filtered or unexported fields
}
func NewRowReopener ¶
func NewRowReopener(ed *Editor) *RowReopener
func (*RowReopener) Add ¶
func (rr *RowReopener) Add(row *ui.Row)
func (*RowReopener) Reopen ¶
func (rr *RowReopener) Reopen()
type RowState ¶
type RowState struct { TbStr string TbCursorIndex int TaCursorIndex int TaOffsetIndex int StartPercent float64 }
Used in sessions and reopenrow.
func (*RowState) RestorePos ¶
type RowStateChangeEEvent ¶
type Session ¶
type Session struct { Name string RootTbStr string Columns []*ColumnState }
func NewSessionFromEditor ¶
type TerminalFilter ¶
type TerminalFilter struct {
// contains filtered or unexported fields
}
func NewTerminalFilter ¶
func NewTerminalFilter(erow *ERow) *TerminalFilter
func NewTerminalFilter2 ¶
func NewTerminalFilter2(tio TerminalIO, erow *ERow) *TerminalFilter
func (*TerminalFilter) Close ¶
func (tf *TerminalFilter) Close() error