justext

package module
v0.0.0-...-42cb5ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 9 Imported by: 0

README

JusText

JusText text editor Agile project for CS361

Building

In the main folder run:

$ go build -o justext cmd/justext/main.go

This creates the justext executable.

Usage

|--------------------------------------
| File Edit
|--------------------------------------
|
|
| < File editing area >
|
|--------------------------------------
| < Status messages >
|-------------------------------------- \

Menu bar

Press the esc key to switch context to the menu bar. Use the tab key to alternate between tabs. Press enter or an arrow, and arrow to the option you wish to select, and press enter.

To exit the menu bar, press esc again.

Files

Open a file with justext <filename> or start a new file with justext.

Editing

Edit the file in the File editing area just like any other editing application.

Saving

Save your file using the file menu.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayBuffer

func DisplayBuffer(buf []byte, cursor int, highlight *Range) []byte

DisplayBuffer : ...

func DisplayEditor

func DisplayEditor()

DisplayEditor : Update editor and bring into focus

func EditorInputCapture

func EditorInputCapture(event *tcell.EventKey) *tcell.EventKey

EditorInputCapture : ...

func EditorView

func EditorView() *tview.TextView

EditorView : ...

func MenuBarView() *tview.Grid

MenuBarView : ...

func Run

func Run()

Run : ...

func StatusBarView

func StatusBarView() *tview.TextView

StatusBarView : ...

func UpdateEditor

func UpdateEditor()

UpdateEditor : Redraw the editor view.

func UpdateStatusBar

func UpdateStatusBar(text string)

UpdateStatusBar : ...

func WordCount

func WordCount() int

WordCount : ... Original function source: https://www.dotnetperls.com/word-count-go

Types

type EditorState

type EditorState struct {
	Buffer    []byte
	App       *tview.Application
	TextView  *tview.TextView
	StatusBar *tview.TextView
	Cursor    int
	MenuGrid  *tview.Grid
	MainGrid  *tview.Grid
	Filename  string
	Highlight *Range
}

EditorState : ...

var State EditorState

State : ...

type Range

type Range struct {
	First int
	Last  int
}

Range : ...

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL