Documentation ¶
Overview ¶
Package gidev implements the GideView editor, using all the elements from the gide interface. Having it in a separate package allows GideView to also include other packages that tap into the gide interface, such as the GoPi interactive parser.
Index ¶
- Constants
- Variables
- func CheckForProjAtPath(path string) (string, bool)
- func ExecCmds(ge *GideView) [][]string
- func GideViewOpenNodes(it any, sc *gi.Scene) []string
- func ProjPathParse(path string) (root, projnm, fnm string, ok bool)
- func QuitReq() bool
- func TextLinkHandler(tl paint.TextLink) bool
- type GideView
- func (ge *GideView) ActiveFileNode() *filetree.Node
- func (ge *GideView) ActiveTextEditor() *gide.TextEditor
- func (ge *GideView) AppBarConfig(pw gi.Widget)
- func (ge *GideView) ApplyPrefs()
- func (ge *GideView) ApplyPrefsAction()
- func (ge *GideView) ArgVarVals() *gide.ArgVarVals
- func (ge *GideView) AutoSaveCheck(tv *gide.TextEditor, vidx int, fn *filetree.Node) bool
- func (ge *GideView) Build()
- func (ge *GideView) CallFind(ctx gi.Widget)
- func (ge *GideView) CallSaveActiveViewAs(ctx gi.Widget)
- func (ge *GideView) CallSplitsSetView(ctx gi.Widget)
- func (ge *GideView) CallViewFile(ctx gi.Widget)
- func (ge *GideView) ChooseRunExec(exePath gi.FileName)
- func (ge *GideView) ClearDebug()
- func (ge *GideView) CloneActiveView() (*gide.TextEditor, int)
- func (ge *GideView) CloseActiveView()
- func (ge *GideView) CloseOpenNodes(nodes []*gide.FileNode)
- func (ge *GideView) CloseWindow()
- func (ge *GideView) CloseWindowReq() bool
- func (ge *GideView) CmdHist() *gide.CmdNames
- func (ge *GideView) CmdRuns() *gide.CmdRuns
- func (ge *GideView) CommandFromMenu(fn *filetree.Node)
- func (ge *GideView) CommentOut() bool
- func (ge *GideView) Commit()
- func (ge *GideView) CommitNoChecks()
- func (ge *GideView) ConfigActiveFilename(fb *giv.FuncButton) *giv.FuncButton
- func (ge *GideView) ConfigFindButton(fb *giv.FuncButton) *giv.FuncButton
- func (ge *GideView) ConfigGideView()
- func (ge *GideView) ConfigSplits()
- func (ge *GideView) ConfigStatusBar()
- func (ge *GideView) ConfigTextBuf(tb *texteditor.Buf)
- func (ge *GideView) ConfigToolbar(tb *gi.Toolbar)
- func (ge *GideView) ConfigWidget()
- func (ge *GideView) CopyRect()
- func (ge *GideView) CountWords() string
- func (ge *GideView) CountWordsRegion() string
- func (ge *GideView) CurDebug() *gide.DebugView
- func (ge *GideView) CurPanel() int
- func (ge *GideView) CursorToHistNext() bool
- func (ge *GideView) CursorToHistPrev() bool
- func (ge *GideView) CutRect()
- func (ge *GideView) Debug()
- func (ge *GideView) DebugAttach(pid uint64)
- func (ge *GideView) DebugTest()
- func (ge *GideView) Defaults()
- func (ge *GideView) DiffFileNode(fna *filetree.Node, fnmB gi.FileName)
- func (ge *GideView) DiffFiles(fnmA, fnmB gi.FileName)
- func (ge *GideView) EditProjPrefs()
- func (ge *GideView) EditRecents()
- func (ge *GideView) ExecCmd()
- func (ge *GideView) ExecCmdFileNode(fn *filetree.Node)
- func (ge *GideView) ExecCmdName(cmdNm gide.CmdName, sel bool, clearBuf bool)
- func (ge *GideView) ExecCmdNameActive(cmdNm string)
- func (ge *GideView) ExecCmdNameFileName(fn string, cmdNm gide.CmdName, sel bool, clearBuf bool)
- func (ge *GideView) ExecCmdNameFileNode(fn *filetree.Node, cmdNm gide.CmdName, sel bool, clearBuf bool)
- func (ge *GideView) ExecCmds(cmdNms gide.CmdNames, sel bool, clearBuf bool)
- func (ge *GideView) ExecCmdsFileNode(fn *filetree.Node, cmdNms gide.CmdNames, sel bool, clearBuf bool)
- func (ge *GideView) FileNodeForFile(fpath string, add bool) *filetree.Node
- func (ge *GideView) FileNodeOpened(fn *filetree.Node)
- func (ge *GideView) FileNodeRunExe(fn *filetree.Node)
- func (ge *GideView) FileNodeSelected(fn *filetree.Node)
- func (ge *GideView) FileTree() *filetree.Tree
- func (ge *GideView) Find(find string, repl string, ignoreCase bool, regExp bool, loc gide.FindLoc, ...)
- func (ge *GideView) FocusNextPanel()
- func (ge *GideView) FocusOnPanel(panel int) bool
- func (ge *GideView) FocusOnTabs() bool
- func (ge *GideView) FocusPrevPanel()
- func (ge *GideView) GideViewKeys(kt events.Event)
- func (ge *GideView) GrabPrefs()
- func (ge *GideView) GuessMainLang() bool
- func (ge *GideView) HandleGideKeyEvent()
- func (ge *GideView) HandleGideViewEvents()
- func (ge *GideView) HandleOSFileEvent()
- func (ge *GideView) HelpWiki()
- func (ge *GideView) Indent() bool
- func (ge *GideView) IsConfiged() bool
- func (ge *GideView) IsEmpty() bool
- func (ge *GideView) JoinParaLines()
- func (t *GideView) KiType() *gti.Type
- func (ge *GideView) LangDefaults()
- func (ge *GideView) LastSaveTime() time.Time
- func (ge *GideView) LinkViewFile(fnm gi.FileName) (*gide.TextEditor, int, bool)
- func (ge *GideView) LinkViewFileNode(fn *filetree.Node) (*gide.TextEditor, int)
- func (ge *GideView) LookupFun(data any, text string, posLn, posCh int) (ld complete.Lookup)
- func (ge *GideView) NChangedFiles() int
- func (t *GideView) New() ki.Ki
- func (ge *GideView) NewFile(filename string, addToVcs bool)
- func (ge *GideView) NewProj(path gi.FileName, folder string, mainLang fi.Known, ...) *GideView
- func (ge *GideView) NextTextEditor() (*gide.TextEditor, int)
- func (ge *GideView) NextViewFile(fnm gi.FileName) (*gide.TextEditor, int, bool)
- func (ge *GideView) NextViewFileNode(fn *filetree.Node) (*gide.TextEditor, int)
- func (ge *GideView) OnInit()
- func (ge *GideView) OpenConsoleTab()
- func (ge *GideView) OpenFile(fnm string)
- func (ge *GideView) OpenFileAtRegion(filename gi.FileName, tr textbuf.Region) (tv *gide.TextEditor, ok bool)
- func (ge *GideView) OpenFileNode(fn *filetree.Node) (bool, error)
- func (ge *GideView) OpenFileURL(ur string, ftv *texteditor.Editor) bool
- func (ge *GideView) OpenFindURL(ur string, ftv *texteditor.Editor) bool
- func (ge *GideView) OpenNodeForTextEditor(tv *gide.TextEditor) (*filetree.Node, int, bool)
- func (ge *GideView) OpenPath(path gi.FileName) *GideView
- func (ge *GideView) OpenProj(filename gi.FileName) *GideView
- func (ge *GideView) OpenRecent(filename gi.FileName)
- func (ge *GideView) PanelIsOpen(panel int) bool
- func (ge *GideView) ParseOpenFindURL(ur string, ftv *texteditor.Editor) (tv *gide.TextEditor, reg textbuf.Region, findBufStLn, findCount int, ok bool)
- func (ge *GideView) PasteRect()
- func (ge *GideView) ProjPrefs() *gide.ProjPrefs
- func (ge *GideView) ReCase(c textbuf.Cases) string
- func (ge *GideView) RecycleCmdBuf(cmdNm string, clear bool) (*texteditor.Buf, bool)
- func (ge *GideView) RecycleCmdTab(cmdNm string, sel bool, clearBuf bool) (*texteditor.Buf, *texteditor.Editor, bool)
- func (ge *GideView) RecycleTabTextEditor(label string, sel bool) *texteditor.Editor
- func (ge *GideView) RegisterCopy(name string) bool
- func (ge *GideView) RegisterPaste(name gide.RegisterName) bool
- func (ge *GideView) ReplaceInActive()
- func (ge *GideView) ResourceCommands() uri.URIs
- func (ge *GideView) ResourceFiles() uri.URIs
- func (ge *GideView) ResourceSymbols() uri.URIs
- func (ge *GideView) RevertActiveView()
- func (ge *GideView) Run()
- func (ge *GideView) RunPostCmdsActiveView() bool
- func (ge *GideView) RunPostCmdsFileNode(fn *filetree.Node) bool
- func (ge *GideView) SaveActiveView()
- func (ge *GideView) SaveActiveViewAs(filename gi.FileName)
- func (ge *GideView) SaveAll()
- func (ge *GideView) SaveAllCheck(cancelOpt bool, fun func()) bool
- func (ge *GideView) SaveAllOpenNodes()
- func (ge *GideView) SaveProj()
- func (ge *GideView) SaveProjAs(filename gi.FileName) bool
- func (ge *GideView) SaveProjIfExists(saveAllFiles bool) bool
- func (ge *GideView) Scene() *gi.Scene
- func (ge *GideView) SelectOpenNode()
- func (ge *GideView) SelectTabByLabel(label string) gi.Widget
- func (ge *GideView) SelectedFileNode() *filetree.Node
- func (ge *GideView) SetActiveFileInfo(buf *texteditor.Buf)
- func (t *GideView) SetActiveLang(v fi.Known) *GideView
- func (ge *GideView) SetActiveTextEditor(av *gide.TextEditor) int
- func (ge *GideView) SetActiveTextEditorIdx(idx int) *gide.TextEditor
- func (ge *GideView) SetArgVarVals()
- func (t *GideView) SetClass(v string) *GideView
- func (t *GideView) SetCustomContextMenu(v func(m *gi.Scene)) *GideView
- func (t *GideView) SetOpenNodes(v gide.OpenNodes) *GideView
- func (t *GideView) SetPriorityEvents(v []events.Types) *GideView
- func (t *GideView) SetProjFilename(v gi.FileName) *GideView
- func (t *GideView) SetProjRoot(v gi.FileName) *GideView
- func (t *GideView) SetStackTop(v int) *GideView
- func (ge *GideView) SetStatus(msg string)
- func (t *GideView) SetStatusMessage(v string) *GideView
- func (t *GideView) SetStripes(v gi.Stripes) *GideView
- func (t *GideView) SetTooltip(v string) *GideView
- func (ge *GideView) SetWindowNameTitle()
- func (ge *GideView) ShowFile(fname string, ln int) (*gide.TextEditor, error)
- func (ge *GideView) SpacesToTabs()
- func (ge *GideView) Spell()
- func (ge *GideView) Splits() *gi.Splits
- func (ge *GideView) SplitsEdit()
- func (ge *GideView) SplitsSave(split gide.SplitName)
- func (ge *GideView) SplitsSaveAs(name, desc string)
- func (ge *GideView) SplitsSetView(split gide.SplitName)
- func (ge *GideView) StatusBar() *gi.Frame
- func (ge *GideView) StatusLabel() *gi.Label
- func (ge *GideView) SwapTextEditors() bool
- func (ge *GideView) Symbols()
- func (ge *GideView) TabByLabel(label string) gi.Widget
- func (ge *GideView) TabByLabelTry(label string) (gi.Widget, error)
- func (ge *GideView) TabDeleted(tabnm string)
- func (ge *GideView) Tabs() *gi.Tabs
- func (ge *GideView) TabsToSpaces()
- func (ge *GideView) TextBufForFile(fpath string, add bool) *texteditor.Buf
- func (ge *GideView) TextEditorButtonByIndex(idx int) *gi.Button
- func (ge *GideView) TextEditorButtonMenu(idx int, m *gi.Scene)
- func (ge *GideView) TextEditorByIndex(idx int) *gide.TextEditor
- func (ge *GideView) TextEditorForFile(fnm gi.FileName) (*gide.TextEditor, int, bool)
- func (ge *GideView) TextEditorForFileNode(fn *filetree.Node) (*gide.TextEditor, int, bool)
- func (ge *GideView) TextEditorIndex(av *gide.TextEditor) int
- func (ge *GideView) UpdateFiles()
- func (ge *GideView) UpdateStatusLabel()
- func (ge *GideView) UpdateTextButtons()
- func (ge *GideView) VCSLog(since string) (vci.Log, error)
- func (ge *GideView) VCSUpdateAll()
- func (ge *GideView) VersCtrl() filetree.VersCtrlName
- func (ge *GideView) ViewFile(fnm gi.FileName) (*gide.TextEditor, int, bool)
- func (ge *GideView) ViewFileInIdx(fnm gi.FileName, idx int) (*gide.TextEditor, int, bool)
- func (ge *GideView) ViewFileNode(tv *gide.TextEditor, vidx int, fn *filetree.Node)
- func (ge *GideView) ViewOpenNodeName(name string)
Constants ¶
const ( FileTreeIdx = iota TextEditor1Idx TextEditor2Idx TabsIdx )
These are then the fixed indices of the different elements in the splitview
const NTextEditors = 2
NTextEditors is the number of text views to create -- to keep things simple and consistent (e.g., splitter settings always have the same number of values), we fix this degree of freedom, and have flexibility in the splitter settings for what to actually show.
Variables ¶
var CatNoEdit = map[fi.Known]bool{ fi.Rtf: true, fi.MSWord: true, fi.OpenText: true, fi.OpenPres: true, fi.MSPowerpoint: true, fi.EBook: true, fi.EPub: true, }
CatNoEdit are the files to NOT edit from categories: Doc, Data
var GideViewType = gti.AddType(>i.Type{ Name: "goki.dev/gide/v2/gidev.GideView", ShortName: "gidev.GideView", IDName: "gide-view", Doc: "GideView is the core editor and tab viewer framework for the Gide system. The\ndefault view has a tree browser of files on the left, editor panels in the\nmiddle, and a tabbed viewer on the right.", Directives: gti.Directives{}, Fields: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"ProjRoot", >i.Field{Name: "ProjRoot", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "root directory for the project -- all projects must be organized within a top-level root directory, with all the files therein constituting the scope of the project -- by default it is the path for ProjFilename", Directives: gti.Directives{}, Tag: ""}}, {"ProjFilename", >i.Field{Name: "ProjFilename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "current project filename for saving / loading specific Gide configuration information in a .gide file (optional)", Directives: gti.Directives{}, Tag: "ext:\".gide\""}}, {"ActiveFilename", >i.Field{Name: "ActiveFilename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "filename of the currently-active textview", Directives: gti.Directives{}, Tag: "set:\"-\""}}, {"ActiveLang", >i.Field{Name: "ActiveLang", Type: "goki.dev/fi.Known", LocalType: "fi.Known", Doc: "language for current active filename", Directives: gti.Directives{}, Tag: ""}}, {"ActiveVCS", >i.Field{Name: "ActiveVCS", Type: "goki.dev/vci/v2.Repo", LocalType: "vci.Repo", Doc: "VCS repo for current active filename", Directives: gti.Directives{}, Tag: "set:\"-\""}}, {"ActiveVCSInfo", >i.Field{Name: "ActiveVCSInfo", Type: "string", LocalType: "string", Doc: "VCS info for current active filename (typically branch or revision) -- for status", Directives: gti.Directives{}, Tag: "set:\"-\""}}, {"Changed", >i.Field{Name: "Changed", Type: "bool", LocalType: "bool", Doc: "has the root changed? we receive update signals from root for changes", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}}, {"StatusMessage", >i.Field{Name: "StatusMessage", Type: "string", LocalType: "string", Doc: "the last status update message", Directives: gti.Directives{}, Tag: ""}}, {"LastSaveTStamp", >i.Field{Name: "LastSaveTStamp", Type: "time.Time", LocalType: "time.Time", Doc: "timestamp for when a file was last saved -- provides dirty state for various updates including rebuilding in debugger", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}}, {"Files", >i.Field{Name: "Files", Type: "*goki.dev/gi/v2/filetree.Tree", LocalType: "*filetree.Tree", Doc: "all the files in the project directory and subdirectories", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}}, {"ActiveTextEditorIdx", >i.Field{Name: "ActiveTextEditorIdx", Type: "int", LocalType: "int", Doc: "index of the currently-active textview -- new files will be viewed in other views if available", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}}, {"OpenNodes", >i.Field{Name: "OpenNodes", Type: "goki.dev/gide/v2/gide.OpenNodes", LocalType: "gide.OpenNodes", Doc: "list of open nodes, most recent first", Directives: gti.Directives{}, Tag: "json:\"-\""}}, {"CmdBufs", >i.Field{Name: "CmdBufs", Type: "map[string]*goki.dev/gi/v2/texteditor.Buf", LocalType: "map[string]*texteditor.Buf", Doc: "the command buffers for commands run in this project", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}}, {"CmdHistory", >i.Field{Name: "CmdHistory", Type: "goki.dev/gide/v2/gide.CmdNames", LocalType: "gide.CmdNames", Doc: "history of commands executed in this session", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\""}}, {"RunningCmds", >i.Field{Name: "RunningCmds", Type: "goki.dev/gide/v2/gide.CmdRuns", LocalType: "gide.CmdRuns", Doc: "currently running commands in this project", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}}, {"ArgVals", >i.Field{Name: "ArgVals", Type: "goki.dev/gide/v2/gide.ArgVarVals", LocalType: "gide.ArgVarVals", Doc: "current arg var vals", Directives: gti.Directives{}, Tag: "set:\"-\" json:\"-\" xml:\"-\""}}, {"Prefs", >i.Field{Name: "Prefs", Type: "goki.dev/gide/v2/gide.ProjPrefs", LocalType: "gide.ProjPrefs", Doc: "preferences for this project -- this is what is saved in a .gide project file", Directives: gti.Directives{}, Tag: "set:\"-\""}}, {"CurDbg", >i.Field{Name: "CurDbg", Type: "*goki.dev/gide/v2/gide.DebugView", LocalType: "*gide.DebugView", Doc: "current debug view", Directives: gti.Directives{}, Tag: "set:\"-\""}}, {"KeySeq1", >i.Field{Name: "KeySeq1", Type: "goki.dev/goosi/events/key.Chord", LocalType: "key.Chord", Doc: "first key in sequence if needs2 key pressed", Directives: gti.Directives{}, Tag: "set:\"-\""}}, {"UpdtMu", >i.Field{Name: "UpdtMu", Type: "sync.Mutex", LocalType: "sync.Mutex", Doc: "mutex for protecting overall updates to GideView", Directives: gti.Directives{}, Tag: "set:\"-\""}}, }), Embeds: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"Frame", >i.Field{Name: "Frame", Type: "goki.dev/gi/v2/gi.Frame", LocalType: "gi.Frame", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Methods: ordmap.Make([]ordmap.KeyVal[string, *gti.Method]{ {"ExecCmdNameActive", >i.Method{Name: "ExecCmdNameActive", Doc: "ExecCmdNameActive calls given command on current active textview", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"cmdNm", >i.Field{Name: "cmdNm", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"ExecCmd", >i.Method{Name: "ExecCmd", Doc: "ExecCmd pops up a menu to select a command appropriate for the current\nactive text view, and shows output in Tab with name of command", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"Build", >i.Method{Name: "Build", Doc: "Build runs the BuildCmds set for this project", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"Run", >i.Method{Name: "Run", Doc: "Run runs the RunCmds set for this project", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"Commit", >i.Method{Name: "Commit", Doc: "Commit commits the current changes using relevant VCS tool.\nChecks for VCS setting and for unsaved files.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"CursorToHistPrev", >i.Method{Name: "CursorToHistPrev", Doc: "CursorToHistPrev moves cursor to previous position on history list --\nreturns true if moved", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"CursorToHistNext", >i.Method{Name: "CursorToHistNext", Doc: "CursorToHistNext moves cursor to next position on history list --\nreturns true if moved", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"ReplaceInActive", >i.Method{Name: "ReplaceInActive", Doc: "ReplaceInActive does query-replace in active file only", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"CutRect", >i.Method{Name: "CutRect", Doc: "CutRect cuts rectangle in active text view", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"CopyRect", >i.Method{Name: "CopyRect", Doc: "CopyRect copies rectangle in active text view", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"PasteRect", >i.Method{Name: "PasteRect", Doc: "PasteRect cuts rectangle in active text view", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"RegisterCopy", >i.Method{Name: "RegisterCopy", Doc: "RegisterCopy saves current selection in active text view to register of given name\nreturns true if saved", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"name", >i.Field{Name: "name", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"RegisterPaste", >i.Method{Name: "RegisterPaste", Doc: "RegisterPaste pastes register of given name into active text view\nreturns true if pasted", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"name", >i.Field{Name: "name", Type: "goki.dev/gide/v2/gide.RegisterName", LocalType: "gide.RegisterName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"CommentOut", >i.Method{Name: "CommentOut", Doc: "CommentOut comments-out selected lines in active text view\nand uncomments if already commented\nIf multiple lines are selected and any line is uncommented all will be commented", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"Indent", >i.Method{Name: "Indent", Doc: "Indent indents selected lines in active view", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"ReCase", >i.Method{Name: "ReCase", Doc: "ReCase replaces currently selected text in current active view with given case", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"c", >i.Field{Name: "c", Type: "goki.dev/gi/v2/texteditor/textbuf.Cases", LocalType: "textbuf.Cases", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"string", >i.Field{Name: "string", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"JoinParaLines", >i.Method{Name: "JoinParaLines", Doc: "JoinParaLines merges sequences of lines with hard returns forming paragraphs,\nseparated by blank lines, into a single line per paragraph,\nfor given selected region (full text if no selection)", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"TabsToSpaces", >i.Method{Name: "TabsToSpaces", Doc: "TabsToSpaces converts tabs to spaces\nfor given selected region (full text if no selection)", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SpacesToTabs", >i.Method{Name: "SpacesToTabs", Doc: "SpacesToTabs converts spaces to tabs\nfor given selected region (full text if no selection)", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"DiffFiles", >i.Method{Name: "DiffFiles", Doc: "DiffFiles shows the differences between two given files\nin side-by-side DiffView and in the console as a context diff.\nIt opens the files as file nodes and uses existing contents if open already.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"fnmA", >i.Field{Name: "fnmA", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"DiffFileNode", >i.Method{Name: "DiffFileNode", Doc: "DiffFileNode shows the differences between given file node as the A file,\nand another given file as the B file,\nin side-by-side DiffView and in the console as a context diff.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"fna", >i.Field{Name: "fna", Type: "*goki.dev/gi/v2/filetree.Node", LocalType: "*filetree.Node", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"fnmB", >i.Field{Name: "fnmB", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"CountWords", >i.Method{Name: "CountWords", Doc: "CountWords counts number of words (and lines) in active file\nreturns a string report thereof.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"string", >i.Field{Name: "string", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"CountWordsRegion", >i.Method{Name: "CountWordsRegion", Doc: "CountWordsRegion counts number of words (and lines) in selected region in file\nif no selection, returns numbers for entire file.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"string", >i.Field{Name: "string", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"SaveActiveView", >i.Method{Name: "SaveActiveView", Doc: "SaveActiveView saves the contents of the currently-active textview", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SaveActiveViewAs", >i.Method{Name: "SaveActiveViewAs", Doc: "SaveActiveViewAs save with specified filename the contents of the\ncurrently-active textview", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"filename", >i.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"RevertActiveView", >i.Method{Name: "RevertActiveView", Doc: "RevertActiveView revert active view to saved version", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"CloseActiveView", >i.Method{Name: "CloseActiveView", Doc: "CloseActiveView closes the buffer associated with active view", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"NextViewFile", >i.Method{Name: "NextViewFile", Doc: "NextViewFile sets the next text view to view given file name -- include as\nmuch of name as possible to disambiguate -- will use the first matching --\nif already being viewed, that is activated -- returns textview and its\nindex, false if not found", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"fnm", >i.Field{Name: "fnm", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"TextEditor", >i.Field{Name: "TextEditor", Type: "*goki.dev/gide/v2/gide.TextEditor", LocalType: "*gide.TextEditor", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"int", >i.Field{Name: "int", Type: "int", LocalType: "int", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"ViewFile", >i.Method{Name: "ViewFile", Doc: "ViewFile views file in an existing TextEditor if it is already viewing that\nfile, otherwise opens ViewFileNode in active buffer", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"fnm", >i.Field{Name: "fnm", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"TextEditor", >i.Field{Name: "TextEditor", Type: "*goki.dev/gide/v2/gide.TextEditor", LocalType: "*gide.TextEditor", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"int", >i.Field{Name: "int", Type: "int", LocalType: "int", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"CloneActiveView", >i.Method{Name: "CloneActiveView", Doc: "CloneActiveView sets the next text view to view the same file currently being vieweds\nin the active view. returns text view and index", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"TextEditor", >i.Field{Name: "TextEditor", Type: "*goki.dev/gide/v2/gide.TextEditor", LocalType: "*gide.TextEditor", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"int", >i.Field{Name: "int", Type: "int", LocalType: "int", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"SaveAll", >i.Method{Name: "SaveAll", Doc: "SaveAll saves all of the open filenodes to their current file names\nand saves the project state if it has been saved before (i.e., the .gide file exists)", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"UpdateFiles", >i.Method{Name: "UpdateFiles", Doc: "UpdateFiles updates the list of files saved in project", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"OpenRecent", >i.Method{Name: "OpenRecent", Doc: "OpenRecent opens a recently-used file", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"filename", >i.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"OpenFile", >i.Method{Name: "OpenFile", Doc: "OpenFile opens file in an open project if it has the same path as the file\nor in a new window.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"fnm", >i.Field{Name: "fnm", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"OpenPath", >i.Method{Name: "OpenPath", Doc: "OpenPath creates a new project by opening given path, which can either be a\nspecific file or a folder containing multiple files of interest -- opens in\ncurrent GideView object if it is empty, or otherwise opens a new window.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"path", >i.Field{Name: "path", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"GideView", >i.Field{Name: "GideView", Type: "*goki.dev/gide/v2/gidev.GideView", LocalType: "*GideView", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"OpenProj", >i.Method{Name: "OpenProj", Doc: "OpenProj opens .gide project file and its settings from given filename, in a standard\ntoml-formatted file", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"filename", >i.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"GideView", >i.Field{Name: "GideView", Type: "*goki.dev/gide/v2/gidev.GideView", LocalType: "*GideView", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"NewProj", >i.Method{Name: "NewProj", Doc: "NewProj creates a new project at given path, making a new folder in that\npath -- all GideView projects are essentially defined by a path to a folder\ncontaining files. If the folder already exists, then use OpenPath.\nCan also specify main language and version control type", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"path", >i.Field{Name: "path", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"folder", >i.Field{Name: "folder", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"mainLang", >i.Field{Name: "mainLang", Type: "goki.dev/fi.Known", LocalType: "fi.Known", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"versCtrl", >i.Field{Name: "versCtrl", Type: "goki.dev/gi/v2/filetree.VersCtrlName", LocalType: "filetree.VersCtrlName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"GideView", >i.Field{Name: "GideView", Type: "*goki.dev/gide/v2/gidev.GideView", LocalType: "*GideView", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"NewFile", >i.Method{Name: "NewFile", Doc: "NewFile creates a new file in the project", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"filename", >i.Field{Name: "filename", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"addToVcs", >i.Field{Name: "addToVcs", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SaveProj", >i.Method{Name: "SaveProj", Doc: "SaveProj saves project file containing custom project settings, in a\nstandard toml-formatted file", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SaveProjAs", >i.Method{Name: "SaveProjAs", Doc: "SaveProjAs saves project custom settings to given filename, in a standard\ntoml-formatted file\nsaveAllFiles indicates if user should be prompted for saving all files\nreturns true if the user was prompted, false otherwise", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"filename", >i.Field{Name: "filename", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"bool", >i.Field{Name: "bool", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"EditProjPrefs", >i.Method{Name: "EditProjPrefs", Doc: "EditProjPrefs allows editing of project preferences (settings specific to this project)", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SplitsSetView", >i.Method{Name: "SplitsSetView", Doc: "SplitsSetView sets split view splitters to given named setting", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"split", >i.Field{Name: "split", Type: "goki.dev/gide/v2/gide.SplitName", LocalType: "gide.SplitName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SplitsSave", >i.Method{Name: "SplitsSave", Doc: "SplitsSave saves current splitter settings to named splitter settings under\nexisting name, and saves to prefs file", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"split", >i.Field{Name: "split", Type: "goki.dev/gide/v2/gide.SplitName", LocalType: "gide.SplitName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SplitsSaveAs", >i.Method{Name: "SplitsSaveAs", Doc: "SplitsSaveAs saves current splitter settings to new named splitter settings, and\nsaves to prefs file", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"name", >i.Field{Name: "name", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"SplitsEdit", >i.Method{Name: "SplitsEdit", Doc: "SplitsEdit opens the SplitsView editor to customize saved splitter settings", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"TopAppBar", >i.Method{Name: "TopAppBar", Doc: "", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"tb", >i.Field{Name: "tb", Type: "*goki.dev/gi/v2/gi.TopAppBar", LocalType: "*gi.TopAppBar", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"Find", >i.Method{Name: "Find", Doc: "Find does Find / Replace in files, using given options and filters -- opens up a\nmain tab with the results and further controls.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"find", >i.Field{Name: "find", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"repl", >i.Field{Name: "repl", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"ignoreCase", >i.Field{Name: "ignoreCase", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"regExp", >i.Field{Name: "regExp", Type: "bool", LocalType: "bool", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"loc", >i.Field{Name: "loc", Type: "goki.dev/gide/v2/gide.FindLoc", LocalType: "gide.FindLoc", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"langs", >i.Field{Name: "langs", Type: "[]goki.dev/fi.Known", LocalType: "[]fi.Known", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"Spell", >i.Method{Name: "Spell", Doc: "Spell checks spelling in active text view", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"Symbols", >i.Method{Name: "Symbols", Doc: "Symbols displays the Symbols of a file or package", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"Debug", >i.Method{Name: "Debug", Doc: "Debug starts the debugger on the RunExec executable.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"DebugTest", >i.Method{Name: "DebugTest", Doc: "DebugTest runs the debugger using testing mode in current active textview path", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"DebugAttach", >i.Method{Name: "DebugAttach", Doc: "DebugAttach runs the debugger by attaching to an already-running process.\npid is the process id to attach to.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"pid", >i.Field{Name: "pid", Type: "uint64", LocalType: "uint64", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"VCSUpdateAll", >i.Method{Name: "VCSUpdateAll", Doc: "VCSUpdateAll does an Update (e.g., Pull) on all VCS repositories within\nthe open tree nodes in FileTree.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"VCSLog", >i.Method{Name: "VCSLog", Doc: "VCSLog shows the VCS log of commits for this file, optionally with a\nsince date qualifier: If since is non-empty, it should be\na date-like expression that the VCS will understand, such as\n1/1/2020, yesterday, last year, etc. SVN only understands a\nnumber as a maximum number of items to return.\nIf allFiles is true, then the log will show revisions for all files, not just\nthis one.\nReturns the Log and also shows it in a VCSLogView which supports further actions.", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"since", >i.Field{Name: "since", Type: "string", LocalType: "string", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"Log", >i.Field{Name: "Log", Type: "goki.dev/vci/v2.Log", LocalType: "vci.Log", Doc: "", Directives: gti.Directives{}, Tag: ""}}, {"error", >i.Field{Name: "error", Type: "error", LocalType: "error", Doc: "", Directives: gti.Directives{}, Tag: ""}}, })}}, {"OpenConsoleTab", >i.Method{Name: "OpenConsoleTab", Doc: "OpenConsoleTab opens a main tab displaying console output (stdout, stderr)", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"ChooseRunExec", >i.Method{Name: "ChooseRunExec", Doc: "ChooseRunExec selects the executable to run for the project", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{ {"exePath", >i.Field{Name: "exePath", Type: "goki.dev/gi/v2/gi.FileName", LocalType: "gi.FileName", Doc: "", Directives: gti.Directives{}, Tag: ""}}, }), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, {"HelpWiki", >i.Method{Name: "HelpWiki", Doc: "HelpWiki opens wiki page for gide on github", Directives: gti.Directives{ >i.Directive{Tool: "gti", Directive: "add", Args: []string{}}, }, Args: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{}), Returns: ordmap.Make([]ordmap.KeyVal[string, *gti.Field]{})}}, }), Instance: &GideView{}, })
Functions ¶
func CheckForProjAtPath ¶
CheckForProjAtPath checks if there is a .gide project at the given path returns project path and true if found, otherwise false
func GideViewOpenNodes ¶
GideViewOpenNodes gets list of open nodes for submenu-func
func ProjPathParse ¶
ProjPathParse parses given project path into a root directory (which could be the path or just the directory portion of the path, depending in whether the path is a directory or not), and a bool if all is good (otherwise error message has been reported). projnm is always the last directory of the path.
func QuitReq ¶
func QuitReq() bool
QuitReq is called when user tries to quit the app -- we go through all open main windows and look for gide windows and call their CloseWindowReq functions!
func TextLinkHandler ¶
TextLinkHandler is the GideView handler for text links -- preferred one b/c directly connects to correct GideView project
Types ¶
type GideView ¶
type GideView struct { gi.Frame // root directory for the project -- all projects must be organized within a top-level root directory, with all the files therein constituting the scope of the project -- by default it is the path for ProjFilename ProjRoot gi.FileName // current project filename for saving / loading specific Gide configuration information in a .gide file (optional) ProjFilename gi.FileName `ext:".gide"` // filename of the currently-active textview ActiveFilename gi.FileName `set:"-"` // language for current active filename ActiveLang fi.Known // VCS repo for current active filename ActiveVCS vci.Repo `set:"-"` // VCS info for current active filename (typically branch or revision) -- for status ActiveVCSInfo string `set:"-"` // has the root changed? we receive update signals from root for changes Changed bool `set:"-" json:"-"` // the last status update message StatusMessage string // timestamp for when a file was last saved -- provides dirty state for various updates including rebuilding in debugger LastSaveTStamp time.Time `set:"-" json:"-"` // all the files in the project directory and subdirectories Files *filetree.Tree `set:"-" json:"-"` // index of the currently-active textview -- new files will be viewed in other views if available ActiveTextEditorIdx int `set:"-" json:"-"` // list of open nodes, most recent first OpenNodes gide.OpenNodes `json:"-"` // the command buffers for commands run in this project CmdBufs map[string]*texteditor.Buf `set:"-" json:"-"` // history of commands executed in this session CmdHistory gide.CmdNames `set:"-" json:"-"` // currently running commands in this project RunningCmds gide.CmdRuns `set:"-" json:"-" xml:"-"` // current arg var vals ArgVals gide.ArgVarVals `set:"-" json:"-" xml:"-"` // preferences for this project -- this is what is saved in a .gide project file Prefs gide.ProjPrefs `set:"-"` // current debug view CurDbg *gide.DebugView `set:"-"` // first key in sequence if needs2 key pressed KeySeq1 key.Chord `set:"-"` // mutex for protecting overall updates to GideView UpdtMu sync.Mutex `set:"-"` }
GideView is the core editor and tab viewer framework for the Gide system. The default view has a tree browser of files on the left, editor panels in the middle, and a tabbed viewer on the right.
func GideInScene ¶
func NewGideProjPath ¶
NewGideProjPath creates a new GideView window with a new GideView project for given path, returning the window and the path
func NewGideView ¶
NewGideView adds a new GideView with the given name to the given parent. If the name is unspecified, it defaults to the ID (kebab-case) name of the type, plus the ki.Ki.NumLifetimeChildren of the given parent.
func NewGideWindow ¶
NewGideWindow is common code for Open GideWindow from Proj or Path
func OpenGideProj ¶
OpenGideProj creates a new GideView window opened to given GideView project, returning the window and the path
func (*GideView) ActiveFileNode ¶
ActiveFileNode returns the file node for the active file -- nil if none
func (*GideView) ActiveTextEditor ¶
func (ge *GideView) ActiveTextEditor() *gide.TextEditor
ActiveTextEditor returns the currently-active TextEditor
func (*GideView) AppBarConfig ¶
func (*GideView) ApplyPrefs ¶
func (ge *GideView) ApplyPrefs()
ApplyPrefs applies current project preference settings into places where they are used -- only for those done prior to loading
func (*GideView) ApplyPrefsAction ¶
func (ge *GideView) ApplyPrefsAction()
ApplyPrefsAction applies current preferences to the project, and updates the project
func (*GideView) ArgVarVals ¶
func (ge *GideView) ArgVarVals() *gide.ArgVarVals
func (*GideView) AutoSaveCheck ¶
AutoSaveCheck checks for an autosave file and prompts user about opening it -- returns true if autosave file does exist for a file that currently unchanged (means just opened)
func (*GideView) CallSaveActiveViewAs ¶
func (*GideView) CallSplitsSetView ¶
func (*GideView) CallViewFile ¶
CallViewFile calls ViewFile with ActiveFilename set as arg
func (*GideView) ChooseRunExec ¶
ChooseRunExec selects the executable to run for the project
func (*GideView) ClearDebug ¶
func (ge *GideView) ClearDebug()
ClearDebug clears the current debugger setting -- no more debugger active.
func (*GideView) CloneActiveView ¶
func (ge *GideView) CloneActiveView() (*gide.TextEditor, int)
CloneActiveView sets the next text view to view the same file currently being vieweds in the active view. returns text view and index
func (*GideView) CloseActiveView ¶
func (ge *GideView) CloseActiveView()
CloseActiveView closes the buffer associated with active view
func (*GideView) CloseOpenNodes ¶
CloseOpenNodes closes any nodes with open views (including those in directories under nodes). called prior to rename.
func (*GideView) CloseWindow ¶
func (ge *GideView) CloseWindow()
CloseWindow actually closes the window
func (*GideView) CloseWindowReq ¶
CloseWindowReq is called when user tries to close window -- we automatically save the project if it already exists (no harm), and prompt to save open files -- if this returns true, then it is OK to close -- otherwise not
func (*GideView) CommandFromMenu ¶
CommandFromMenu pops up a menu of commands for given language, with given last command selected by default, and runs selected command.
func (*GideView) CommentOut ¶
CommentOut comments-out selected lines in active text view and uncomments if already commented If multiple lines are selected and any line is uncommented all will be commented
func (*GideView) Commit ¶
func (ge *GideView) Commit()
Commit commits the current changes using relevant VCS tool. Checks for VCS setting and for unsaved files.
func (*GideView) CommitNoChecks ¶
func (ge *GideView) CommitNoChecks()
CommitNoChecks does the commit without any further checks for VCS, and unsaved files
func (*GideView) ConfigActiveFilename ¶
func (ge *GideView) ConfigActiveFilename(fb *giv.FuncButton) *giv.FuncButton
ConfigActiveFilename configures the first arg of given FuncButton to use the ActiveFilename
func (*GideView) ConfigFindButton ¶
func (ge *GideView) ConfigFindButton(fb *giv.FuncButton) *giv.FuncButton
ConfigFindButton configures the Find FuncButton with current params
func (*GideView) ConfigSplits ¶
func (ge *GideView) ConfigSplits()
ConfigSplits configures the Splits.
func (*GideView) ConfigStatusBar ¶
func (ge *GideView) ConfigStatusBar()
ConfigStatusBar configures statusbar with label
func (*GideView) ConfigTextBuf ¶
func (ge *GideView) ConfigTextBuf(tb *texteditor.Buf)
ConfigTextBuf configures the text buf according to prefs
func (*GideView) ConfigToolbar ¶
func (*GideView) ConfigWidget ¶
func (ge *GideView) ConfigWidget()
func (*GideView) CopyRect ¶
func (ge *GideView) CopyRect()
CopyRect copies rectangle in active text view
func (*GideView) CountWords ¶
CountWords counts number of words (and lines) in active file returns a string report thereof.
func (*GideView) CountWordsRegion ¶
CountWordsRegion counts number of words (and lines) in selected region in file if no selection, returns numbers for entire file.
func (*GideView) CursorToHistNext ¶
CursorToHistNext moves cursor to next position on history list -- returns true if moved
func (*GideView) CursorToHistPrev ¶
CursorToHistPrev moves cursor to previous position on history list -- returns true if moved
func (*GideView) Debug ¶
func (ge *GideView) Debug()
Debug starts the debugger on the RunExec executable.
func (*GideView) DebugAttach ¶
DebugAttach runs the debugger by attaching to an already-running process. pid is the process id to attach to.
func (*GideView) DebugTest ¶
func (ge *GideView) DebugTest()
DebugTest runs the debugger using testing mode in current active textview path
func (*GideView) Defaults ¶
func (ge *GideView) Defaults()
Defaults sets new project defaults based on overall preferences
func (*GideView) DiffFileNode ¶
DiffFileNode shows the differences between given file node as the A file, and another given file as the B file, in side-by-side DiffView and in the console as a context diff.
func (*GideView) DiffFiles ¶
DiffFiles shows the differences between two given files in side-by-side DiffView and in the console as a context diff. It opens the files as file nodes and uses existing contents if open already.
func (*GideView) EditProjPrefs ¶
func (ge *GideView) EditProjPrefs()
EditProjPrefs allows editing of project preferences (settings specific to this project)
func (*GideView) EditRecents ¶
func (ge *GideView) EditRecents()
RecentsEdit opens a dialog editor for deleting from the recents project list
func (*GideView) ExecCmd ¶
func (ge *GideView) ExecCmd()
ExecCmd pops up a menu to select a command appropriate for the current active text view, and shows output in Tab with name of command
func (*GideView) ExecCmdFileNode ¶
ExecCmdFileNode pops up a menu to select a command appropriate for the given node, and shows output in Tab with name of command
func (*GideView) ExecCmdName ¶
ExecCmdName executes command of given name -- this is the final common pathway for all command invokation except on a node. if sel, select tab. if clearBuf, clear the buffer prior to command
func (*GideView) ExecCmdNameActive ¶
ExecCmdNameActive calls given command on current active textview
func (*GideView) ExecCmdNameFileName ¶
ExecCmdNameFileName executes command of given name on given file name
func (*GideView) ExecCmdNameFileNode ¶
func (ge *GideView) ExecCmdNameFileNode(fn *filetree.Node, cmdNm gide.CmdName, sel bool, clearBuf bool)
ExecCmdNameFileNode executes command of given name on given node
func (*GideView) ExecCmds ¶
ExecCmds executes a sequence of commands, sel = select tab, clearBuf = clear buffer
func (*GideView) ExecCmdsFileNode ¶
func (ge *GideView) ExecCmdsFileNode(fn *filetree.Node, cmdNms gide.CmdNames, sel bool, clearBuf bool)
ExecCmdsFileNode executes a sequence of commands on file node, sel = select tab, clearBuf = clear buffer
func (*GideView) FileNodeForFile ¶
FileNodeForFile returns file node for given file path add: if not found in existing tree and external files, then if add is true, it is added to the ExtFiles list.
func (*GideView) FileNodeOpened ¶
FileNodeOpened is called whenever file node is double-clicked in file tree
func (*GideView) FileNodeRunExe ¶
FileNodeRunExe runs the given executable file node
func (*GideView) FileNodeSelected ¶
FileNodeSelected is called whenever tree browser has file node selected
func (*GideView) Find ¶
func (ge *GideView) Find(find string, repl string, ignoreCase bool, regExp bool, loc gide.FindLoc, langs []fi.Known)
Find does Find / Replace in files, using given options and filters -- opens up a main tab with the results and further controls.
func (*GideView) FocusNextPanel ¶
func (ge *GideView) FocusNextPanel()
FocusNextPanel moves the keyboard focus to the next panel to the right
func (*GideView) FocusOnPanel ¶
FocusOnPanel moves keyboard focus to given panel -- returns false if nothing at that tab
func (*GideView) FocusOnTabs ¶
func (*GideView) FocusPrevPanel ¶
func (ge *GideView) FocusPrevPanel()
FocusPrevPanel moves the keyboard focus to the previous panel to the left
func (*GideView) GideViewKeys ¶
func (*GideView) GrabPrefs ¶
func (ge *GideView) GrabPrefs()
GrabPrefs grabs the current project preference settings from various places, e.g., prior to saving or editing.
func (*GideView) GuessMainLang ¶
GuessMainLang guesses the main language in the project -- returns true if successful
func (*GideView) HandleGideKeyEvent ¶
func (ge *GideView) HandleGideKeyEvent()
func (*GideView) HandleGideViewEvents ¶
func (ge *GideView) HandleGideViewEvents()
func (*GideView) HandleOSFileEvent ¶
func (ge *GideView) HandleOSFileEvent()
func (*GideView) HelpWiki ¶
func (ge *GideView) HelpWiki()
HelpWiki opens wiki page for gide on github
func (*GideView) IsConfiged ¶
IsConfiged returns true if the view is configured
func (*GideView) JoinParaLines ¶
func (ge *GideView) JoinParaLines()
JoinParaLines merges sequences of lines with hard returns forming paragraphs, separated by blank lines, into a single line per paragraph, for given selected region (full text if no selection)
func (*GideView) LangDefaults ¶
func (ge *GideView) LangDefaults()
LangDefaults applies default language settings based on MainLang
func (*GideView) LastSaveTime ¶
func (*GideView) LinkViewFile ¶
LinkViewFile opens the file in the 2nd textview, which is next to the tabs where links are clicked, if it is not collapsed -- else 1st
func (*GideView) LinkViewFileNode ¶
LinkViewFileNode opens the file node in the 2nd textview, which is next to the tabs where links are clicked, if it is not collapsed -- else 1st
func (*GideView) LookupFun ¶
LookupFun is the completion system Lookup function that makes a custom textview dialog that has option to edit resulting file.
func (*GideView) NChangedFiles ¶
NChangedFiles returns number of opened files with unsaved changes
func (*GideView) NewProj ¶
func (ge *GideView) NewProj(path gi.FileName, folder string, mainLang fi.Known, versCtrl filetree.VersCtrlName) *GideView
NewProj creates a new project at given path, making a new folder in that path -- all GideView projects are essentially defined by a path to a folder containing files. If the folder already exists, then use OpenPath. Can also specify main language and version control type
func (*GideView) NextTextEditor ¶
func (ge *GideView) NextTextEditor() (*gide.TextEditor, int)
NextTextEditor returns the next text view available for viewing a file and its index -- if the active text view is empty, then it is used, otherwise it is the next one (if visible)
func (*GideView) NextViewFile ¶
NextViewFile sets the next text view to view given file name -- include as much of name as possible to disambiguate -- will use the first matching -- if already being viewed, that is activated -- returns textview and its index, false if not found
func (*GideView) NextViewFileNode ¶
NextViewFileNode sets the next text view to view file in given node (opens buffer if not already opened) -- if already being viewed, that is activated, returns text view and index
func (*GideView) OpenConsoleTab ¶
func (ge *GideView) OpenConsoleTab()
OpenConsoleTab opens a main tab displaying console output (stdout, stderr)
func (*GideView) OpenFile ¶
OpenFile opens file in an open project if it has the same path as the file or in a new window.
func (*GideView) OpenFileAtRegion ¶
func (*GideView) OpenFileNode ¶
OpenFileNode opens file for file node -- returns new bool and error
func (*GideView) OpenFileURL ¶
func (ge *GideView) OpenFileURL(ur string, ftv *texteditor.Editor) bool
OpenFileURL opens given file:/// url
func (*GideView) OpenFindURL ¶
func (ge *GideView) OpenFindURL(ur string, ftv *texteditor.Editor) bool
OpenFindURL opens given find:/// url from Find -- delegates to FindView
func (*GideView) OpenNodeForTextEditor ¶
OpenNodeForTextEditor finds the FileNode that a given TextEditor is viewing, returning its index within OpenNodes list, or false if not found
func (*GideView) OpenPath ¶
OpenPath creates a new project by opening given path, which can either be a specific file or a folder containing multiple files of interest -- opens in current GideView object if it is empty, or otherwise opens a new window.
func (*GideView) OpenProj ¶
OpenProj opens .gide project file and its settings from given filename, in a standard toml-formatted file
func (*GideView) OpenRecent ¶
OpenRecent opens a recently-used file
func (*GideView) PanelIsOpen ¶
PanelIsOpen returns true if the given panel has not been collapsed and is avail and visible for displaying something
func (*GideView) ParseOpenFindURL ¶
func (ge *GideView) ParseOpenFindURL(ur string, ftv *texteditor.Editor) (tv *gide.TextEditor, reg textbuf.Region, findBufStLn, findCount int, ok bool)
ParseOpenFindURL parses and opens given find:/// url from Find, return text region encoded in url, and starting line of results in find buffer, and number of results returned -- for parsing all the find results
func (*GideView) PasteRect ¶
func (ge *GideView) PasteRect()
PasteRect cuts rectangle in active text view
func (*GideView) ReCase ¶
ReCase replaces currently selected text in current active view with given case
func (*GideView) RecycleCmdBuf ¶
RecycleCmdBuf creates the buffer for command output, or returns existing. If clear is true, then any existing buffer is cleared. Returns true if new buffer created.
func (*GideView) RecycleCmdTab ¶
func (ge *GideView) RecycleCmdTab(cmdNm string, sel bool, clearBuf bool) (*texteditor.Buf, *texteditor.Editor, bool)
RecycleCmdTab creates the tab to show command output, including making a buffer object to save output from the command. returns true if a new buffer was created, false if one already existed. if sel, select tab. if clearBuf, then any existing buffer is cleared. Also returns index of tab.
func (*GideView) RecycleTabTextEditor ¶
func (ge *GideView) RecycleTabTextEditor(label string, sel bool) *texteditor.Editor
RecycleTabTextEditor returns a tab with given name, first by looking for an existing one, and if not found, making a new one with a TextEditor in it. if sel, then select it. returns widget
func (*GideView) RegisterCopy ¶
RegisterCopy saves current selection in active text view to register of given name returns true if saved
func (*GideView) RegisterPaste ¶
func (ge *GideView) RegisterPaste(name gide.RegisterName) bool
RegisterPaste pastes register of given name into active text view returns true if pasted
func (*GideView) ReplaceInActive ¶
func (ge *GideView) ReplaceInActive()
ReplaceInActive does query-replace in active file only
func (*GideView) ResourceCommands ¶
ResourceCommands adds the commands
func (*GideView) ResourceFiles ¶
ResourceFiles adds the files
func (*GideView) ResourceSymbols ¶
ResourceSymbols adds the symbols
func (*GideView) RevertActiveView ¶
func (ge *GideView) RevertActiveView()
RevertActiveView revert active view to saved version
func (*GideView) RunPostCmdsActiveView ¶
RunPostCmdsActiveView runs any registered post commands on the active view -- returns true if commands were run and file was reverted after that -- uses MainLang to disambiguate if multiple languages associated with extension.
func (*GideView) RunPostCmdsFileNode ¶
RunPostCmdsFileNode runs any registered post commands on the given file node -- returns true if commands were run and file was reverted after that -- uses MainLang to disambiguate if multiple languages associated with extension.
func (*GideView) SaveActiveView ¶
func (ge *GideView) SaveActiveView()
SaveActiveView saves the contents of the currently-active textview
func (*GideView) SaveActiveViewAs ¶
SaveActiveViewAs save with specified filename the contents of the currently-active textview
func (*GideView) SaveAll ¶
func (ge *GideView) SaveAll()
SaveAll saves all of the open filenodes to their current file names and saves the project state if it has been saved before (i.e., the .gide file exists)
func (*GideView) SaveAllCheck ¶
SaveAllCheck -- check if any files have not been saved, and prompt to save them returns true if there were unsaved files, false otherwise. cancelOpt presents an option to cancel current command, in which case function is not called. if function is passed, then it is called in all cases except if the user selects cancel.
func (*GideView) SaveAllOpenNodes ¶
func (ge *GideView) SaveAllOpenNodes()
SaveAllOpenNodes saves all of the open filenodes to their current file names
func (*GideView) SaveProj ¶
func (ge *GideView) SaveProj()
SaveProj saves project file containing custom project settings, in a standard toml-formatted file
func (*GideView) SaveProjAs ¶
SaveProjAs saves project custom settings to given filename, in a standard toml-formatted file saveAllFiles indicates if user should be prompted for saving all files returns true if the user was prompted, false otherwise
func (*GideView) SaveProjIfExists ¶
SaveProjIfExists saves project file containing custom project settings, in a standard toml-formatted file, only if it already exists -- returns true if saved saveAllFiles indicates if user should be prompted for saving all files
func (*GideView) SelectOpenNode ¶
func (ge *GideView) SelectOpenNode()
SelectOpenNode pops up a menu to select an open node (aka buffer) to view in current active textview
func (*GideView) SelectTabByLabel ¶
SelectTabByLabel Selects given main tab, and returns all of its contents as well.
func (*GideView) SelectedFileNode ¶
SelectedFileNode returns currently selected file tree node as a *filetree.Node could be nil.
func (*GideView) SetActiveFileInfo ¶
func (ge *GideView) SetActiveFileInfo(buf *texteditor.Buf)
SetActiveFileInfo sets the active file info from textbuf
func (*GideView) SetActiveLang ¶
SetActiveLang sets the [GideView.ActiveLang]: language for current active filename
func (*GideView) SetActiveTextEditor ¶
func (ge *GideView) SetActiveTextEditor(av *gide.TextEditor) int
SetActiveTextEditor sets the given textview as the active one, and returns its index
func (*GideView) SetActiveTextEditorIdx ¶
func (ge *GideView) SetActiveTextEditorIdx(idx int) *gide.TextEditor
SetActiveTextEditorIdx sets the given view index as the currently-active TextEditor -- returns that textview. This is the main method for activating a text editor.
func (*GideView) SetArgVarVals ¶
func (ge *GideView) SetArgVarVals()
SetArgVarVals sets the ArgVar values for commands, from GideView values
func (*GideView) SetCustomContextMenu ¶
SetCustomContextMenu sets the [GideView.CustomContextMenu]
func (*GideView) SetOpenNodes ¶
SetOpenNodes sets the [GideView.OpenNodes]: list of open nodes, most recent first
func (*GideView) SetPriorityEvents ¶
SetPriorityEvents sets the [GideView.PriorityEvents]
func (*GideView) SetProjFilename ¶
SetProjFilename sets the [GideView.ProjFilename]: current project filename for saving / loading specific Gide configuration information in a .gide file (optional)
func (*GideView) SetProjRoot ¶
SetProjRoot sets the [GideView.ProjRoot]: root directory for the project -- all projects must be organized within a top-level root directory, with all the files therein constituting the scope of the project -- by default it is the path for ProjFilename
func (*GideView) SetStackTop ¶
SetStackTop sets the [GideView.StackTop]
func (*GideView) SetStatus ¶
SetStatus sets the current status update message for the StatusBar next time it renders
func (*GideView) SetStatusMessage ¶
SetStatusMessage sets the [GideView.StatusMessage]: the last status update message
func (*GideView) SetStripes ¶
SetStripes sets the [GideView.Stripes]
func (*GideView) SetTooltip ¶
SetTooltip sets the [GideView.Tooltip]
func (*GideView) SetWindowNameTitle ¶
func (ge *GideView) SetWindowNameTitle()
SetWindowNameTitle sets the window name and title based on current project name
func (*GideView) ShowFile ¶
ShowFile shows given file name at given line, returning TextEditor showing it or error if not found.
func (*GideView) SpacesToTabs ¶
func (ge *GideView) SpacesToTabs()
SpacesToTabs converts spaces to tabs for given selected region (full text if no selection)
func (*GideView) SplitsEdit ¶
func (ge *GideView) SplitsEdit()
SplitsEdit opens the SplitsView editor to customize saved splitter settings
func (*GideView) SplitsSave ¶
SplitsSave saves current splitter settings to named splitter settings under existing name, and saves to prefs file
func (*GideView) SplitsSaveAs ¶
SplitsSaveAs saves current splitter settings to new named splitter settings, and saves to prefs file
func (*GideView) SplitsSetView ¶
SplitsSetView sets split view splitters to given named setting
func (*GideView) StatusLabel ¶
StatusLabel returns the statusbar label widget
func (*GideView) SwapTextEditors ¶
SwapTextEditors switches the buffers for the two open textviews only operates if both panels are open
func (*GideView) Symbols ¶
func (ge *GideView) Symbols()
Symbols displays the Symbols of a file or package
func (*GideView) TabByLabel ¶
TabByLabel returns a tab with given name, nil if not found.
func (*GideView) TabByLabelTry ¶
TabByLabelTry returns a tab with given name, error if not found.
func (*GideView) TabDeleted ¶
TabDeleted is called when a main tab is deleted -- we cancel any running commmands
func (*GideView) TabsToSpaces ¶
func (ge *GideView) TabsToSpaces()
TabsToSpaces converts tabs to spaces for given selected region (full text if no selection)
func (*GideView) TextBufForFile ¶
func (ge *GideView) TextBufForFile(fpath string, add bool) *texteditor.Buf
TextBufForFile returns TextBuf for given file path. add: if not found in existing tree and external files, then if add is true, it is added to the ExtFiles list.
func (*GideView) TextEditorButtonByIndex ¶
TextEditorButtonByIndex returns the top textview menu button by index (0 or 1)
func (*GideView) TextEditorButtonMenu ¶
func (*GideView) TextEditorByIndex ¶
func (ge *GideView) TextEditorByIndex(idx int) *gide.TextEditor
TextEditorByIndex returns the TextEditor by index (0 or 1), nil if not found
func (*GideView) TextEditorForFile ¶
TextEditorForFile finds FileNode for file, and returns TextEditor and index that is viewing that FileNode, or false if none is
func (*GideView) TextEditorForFileNode ¶
TextEditorForFileNode finds a TextEditor that is viewing given FileNode, and its index, or false if none is
func (*GideView) TextEditorIndex ¶
func (ge *GideView) TextEditorIndex(av *gide.TextEditor) int
TextEditorIndex finds index of given textview (0 or 1)
func (*GideView) UpdateFiles ¶
func (ge *GideView) UpdateFiles()
UpdateFiles updates the list of files saved in project
func (*GideView) UpdateStatusLabel ¶
func (ge *GideView) UpdateStatusLabel()
UpdateStatusLabel updates the statusbar label, called for each render!
func (*GideView) UpdateTextButtons ¶
func (ge *GideView) UpdateTextButtons()
UpdateTextButtons updates textview menu buttons is called by SetStatus and is generally under cover of TopUpdateStart / End doesn't do anything unless a change is required -- safe to call frequently.
func (*GideView) VCSLog ¶
VCSLog shows the VCS log of commits for this file, optionally with a since date qualifier: If since is non-empty, it should be a date-like expression that the VCS will understand, such as 1/1/2020, yesterday, last year, etc. SVN only understands a number as a maximum number of items to return. If allFiles is true, then the log will show revisions for all files, not just this one. Returns the Log and also shows it in a VCSLogView which supports further actions.
func (*GideView) VCSUpdateAll ¶
func (ge *GideView) VCSUpdateAll()
VCSUpdateAll does an Update (e.g., Pull) on all VCS repositories within the open tree nodes in FileTree.
func (*GideView) VersCtrl ¶
func (ge *GideView) VersCtrl() filetree.VersCtrlName
VersCtrl returns the version control system in effect, using the file tree detected version or whatever is set in project preferences
func (*GideView) ViewFile ¶
ViewFile views file in an existing TextEditor if it is already viewing that file, otherwise opens ViewFileNode in active buffer
func (*GideView) ViewFileInIdx ¶
ViewFileInIdx views file in given text view index
func (*GideView) ViewFileNode ¶
ViewFileNode sets the given text view to view file in given node (opens buffer if not already opened). This is the main method for viewing a file.
func (*GideView) ViewOpenNodeName ¶
ViewOpenNodeName views given open node (by name) in active view