Documentation ¶
Index ¶
- type Action
- type Bookmark
- type Bookmarks
- type Editor
- func (editor *Editor) AllLineBa()
- func (editor *Editor) AllLineFo()
- func (editor *Editor) AutoComplete(prefix string) []string
- func (editor *Editor) Bookmark()
- func (editor *Editor) BookmarkMenu()
- func (editor *Editor) CloseFile() bool
- func (editor *Editor) CmdMenu()
- func (editor *Editor) Cut()
- func (editor *Editor) ExtraMode()
- func (editor *Editor) Flush()
- func (editor *Editor) GoToBookmark(name string) error
- func (editor *Editor) GoToLine()
- func (editor *Editor) HighlightCursors()
- func (editor *Editor) KeepFlushed()
- func (editor *Editor) LastFile()
- func (editor *Editor) Listen()
- func (editor *Editor) MakeExtraKeyMap() KeyMap
- func (editor *Editor) MakeKeyMap() KeyMap
- func (editor *Editor) MarkedSearch(searchTerm string) (int, int, error)
- func (editor *Editor) MarkedSearchAndReplace(searchTerm, replaceTerm string, replaceAll bool)
- func (editor *Editor) MultiFileSearch(searchTerm string, multiFile bool) (int, int, error)
- func (editor *Editor) MultiFileSearchAndReplace(searchTerm, replaceTerm string, multiFile, replaceAll bool)
- func (editor *Editor) NextFile()
- func (editor *Editor) OpenFile(name string)
- func (editor *Editor) OpenFiles(fileNames []string)
- func (editor *Editor) OpenNewFile()
- func (editor *Editor) Paste()
- func (editor *Editor) PasteFromMenu()
- func (editor *Editor) PrevFile()
- func (editor *Editor) Quit()
- func (editor *Editor) ReloadAll()
- func (editor *Editor) RequestFlush()
- func (editor *Editor) Save()
- func (editor *Editor) SaveAll()
- func (editor *Editor) SaveAs()
- func (editor *Editor) Search(multiFile bool)
- func (editor *Editor) SearchAndReplace(multiFile bool)
- func (editor *Editor) SearchLineBa()
- func (editor *Editor) SearchLineFo()
- func (editor *Editor) SelectFile()
- func (editor *Editor) SetCharMode()
- func (editor *Editor) Suspend()
- func (editor *Editor) SwitchFile(n int)
- func (editor *Editor) SwitchFileByName(name string) error
- func (editor *Editor) UpdateStatus()
- type KeyMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶ added in v0.4.2
type Action struct { Func func() Name string }
Action defines a keyboard action.
type Bookmarks ¶ added in v0.7.0
type Bookmarks struct { Max int // contains filtered or unexported fields }
func NewBookmarks ¶ added in v0.7.0
func NewBookmarks() *Bookmarks
type Editor ¶
type Editor struct {
// contains filtered or unexported fields
}
Editor is the main editor object. It orchestrates the terminal, the buffer, etc.
func (*Editor) AllLineBa ¶ added in v0.6.0
func (editor *Editor) AllLineBa()
AllLineBa searches the current line from cursor to the start, and makes multiple cursors (one for each match).
func (*Editor) AllLineFo ¶ added in v0.6.0
func (editor *Editor) AllLineFo()
AllLineFo searches the current line from cursor to the start, and makes multiple cursors (one for each match).
func (*Editor) AutoComplete ¶ added in v0.7.0
func (*Editor) BookmarkMenu ¶ added in v0.7.0
func (editor *Editor) BookmarkMenu()
func (*Editor) CmdMenu ¶ added in v0.4.2
func (editor *Editor) CmdMenu()
CmdMenu offers a menu of available commands.
func (*Editor) Cut ¶
func (editor *Editor) Cut()
Cut cuts the current line and sticks it in the copy buffer.
func (*Editor) ExtraMode ¶ added in v0.4.2
func (editor *Editor) ExtraMode()
ExtraMode allows for additional keypresses.
func (*Editor) GoToBookmark ¶ added in v0.7.0
func (*Editor) HighlightCursors ¶
func (editor *Editor) HighlightCursors()
HighlightCursors highlights all the multi-cursors.
func (*Editor) KeepFlushed ¶
func (editor *Editor) KeepFlushed()
KeepFlushed waits for flush requests, and then flushes to the screen.
func (*Editor) LastFile ¶
func (editor *Editor) LastFile()
LastFile toggles between the two most recent files.
func (*Editor) MakeExtraKeyMap ¶ added in v0.4.2
MakeExtraKeyMap initializes the "extra" keys map.
func (*Editor) MakeKeyMap ¶ added in v0.4.2
MakeKeyMap initializes the KeyMap.
func (*Editor) MarkedSearch ¶ added in v0.3.2
MarkedSearch searches between the cursors.
func (*Editor) MarkedSearchAndReplace ¶ added in v0.3.2
MarkedSearchAndReplace does search-and-replace between cursors.
func (*Editor) MultiFileSearch ¶
MultiFileSearch searches all the file buffers.
func (*Editor) MultiFileSearchAndReplace ¶
func (editor *Editor) MultiFileSearchAndReplace(searchTerm, replaceTerm string, multiFile, replaceAll bool)
MultiFileSearchAndReplace is just like SearchAndReplace but for all the file buffers.
func (*Editor) OpenNewFile ¶
func (editor *Editor) OpenNewFile()
OpenNewFile offers a file selection menu to choose a new file to open.
func (*Editor) Paste ¶
func (editor *Editor) Paste()
Paste pastes the current copy buffer into the main buffer.
func (*Editor) PasteFromMenu ¶
func (editor *Editor) PasteFromMenu()
PasteFromMenu allows the user to select from the paste history.
func (*Editor) PrevFile ¶
func (editor *Editor) PrevFile()
PrevFile cycles to the previous open file.
func (*Editor) ReloadAll ¶ added in v0.5.0
func (editor *Editor) ReloadAll()
ReloadAll re-reads all open buffers.
func (*Editor) RequestFlush ¶
func (editor *Editor) RequestFlush()
RequestFlush requests a flush event (async).
func (*Editor) SaveAll ¶ added in v0.5.0
func (editor *Editor) SaveAll()
SaveAll saves all the open buffers.
func (*Editor) SaveAs ¶ added in v0.5.0
func (editor *Editor) SaveAs()
SaveAs prompts for a file to save to.
func (*Editor) SearchAndReplace ¶
SearchAndReplace searches and replaces.
func (*Editor) SearchLineBa ¶ added in v0.4.2
func (editor *Editor) SearchLineBa()
SearchLineBa searches the current line from cursor to the start.
func (*Editor) SearchLineFo ¶ added in v0.4.2
func (editor *Editor) SearchLineFo()
SearchLineFo searches the current line from cursor to the end.
func (*Editor) SelectFile ¶
func (editor *Editor) SelectFile()
SelectFile offers a menu to select from open files.
func (*Editor) SetCharMode ¶ added in v0.4.1
func (editor *Editor) SetCharMode()
SetCharMode offers a menu for selecting the character display mode.
func (*Editor) Suspend ¶
func (editor *Editor) Suspend()
Suspend suspends the editor. Not available on windows.
func (*Editor) SwitchFile ¶
SwitchFile changes to a new file buffer.
func (*Editor) SwitchFileByName ¶ added in v0.7.0
SwitchFileByName changes to the first file with a matching name.
func (*Editor) UpdateStatus ¶
func (editor *Editor) UpdateStatus()
UpdateStatus updates the status line.
type KeyMap ¶ added in v0.4.2
KeyMap is a list of named actions.
func (KeyMap) DisplayNames ¶ added in v0.4.2
DisplayNames returns pretty-formatted keymap action names.