Giter VIP home page Giter VIP logo

a's Introduction

A

Go Report Card CircleCI

A is a text editor inspired by the Sam and Acme text editors for the Plan 9 operating system.

binary

paint paint

  • Latest Binaries
  • Written in Go (no dependencies)
  • Resembles Acme and Sam text editors.
    • Mouse chording
    • Text is executable
    • Standard UNIX keyboard shortcuts
    • Implements the Edit command language
    • Plumbing
  • Graphics
    • Frame implementation stores bytes and works with '\0'
    • UTF-8 rendering support
    • Structure highlighting
    • Image support (TBD)
  • Files
    • Optimized for editing huge binary files.

note

This repository is still in the alpha stage, and frequently changes. The program comes with no warranty expressed or implied.

install or build

Binary releases for linux, windows, and darwin are available for v0.6.7+. You can install from source on these systems by running:

go get -u -t github.com/as/a

If you want to install a prior version (v0.5.5, for example, which uses the original exp/shiny)

go get github.com/as/a
go get github.com/golang/vgo
cd $GOPATH/src/github.com/as/a
git checkout v0.5.5-release 
vgo build

You can also build the latest with vgo, but vgo is not necessary for that

git checkout master
vgo build

usage

a [file ...]

differences and issues

https://github.com/as/a/issues

hints

To reshape the windows and columns, click on the invisible 10x10px sizer that I haven't rendered yet with the left mouse button. Hold the button down and move the window to the location. Release the button.

edit

  • 80% of the sam command language is implemented.

Edit ,x,the standard editor is any editor,x,any editor,c,ed,

commands

  • Currently only in CWD
  • Put [go build] in the tag
  • Double click inside [
  • Middle click to execute

look

  • Right click on a string
  • If its a file, it will open it
  • If win32, it will also move the mouse
  • if you highlight a valid mode in the guru tag, right clicking in a go source file will run guru on that selection

mouse

1 Select text/sweep
1-2 Snarf (cut)
1-3 Paste
2 Execute select
3 Look select

keyboard

^U  Delete from cursor to start of line.
^W  Delete word before the cursor.
^H  Delete character before the cursor.
^A  Move cursor to start of the line.
^E  Move cursor to end of the line.
^+  Increase font size
^-  Decrease font size
^i	Run goimports (in a tag ending in .go)

extras

  • Looking (right click) in the main tag finds the result in all open windows paint

future

  • Fixing the bugs
  • Cleaning the code up
  • Live multi-client editing
  • Go specific ast/compiler stuff
  • Better CMD exec
  • File system interface to shiny events

see also

History of good text editors

  • The Acme User Interface for Programmers (Rob Pike)
  • A Tutorial for the Sam Command Language (Rob Pike)
  • Plan 9
  • Inferno
  • Acme SAC

a's People

Contributors

as avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a's Issues

a: Dump & Load

Dump: Save state of the editor to a file
Load: Load the state of the editor from a file

a: too many "New" functions

github.com\as\a\col.go:23,24:  func NewCol(src screen.Screen, wind screen.Window, ft *font.Font, sp, size image.Point, files ...string) *Col {
github.com\as\a\col.go:57,58:  func NewCol2(g *Grid, filenames ...string) (w Plane) {
github.com\as\a\col.go:77,78:  func New(co *Col, filename string) (w Plane) {
github.com\as\a\grid.go:15,16: func NewGrid(src screen.Screen, wind screen.Window, ft *font.Font, sp, size image.Point, files ...string) *Grid {

a: frame: elastic tabstops

Elastic tabstops look great on text, however, they will make problems for binary data. The options:

Implementation

  • Do nothing
  • Add Elastic, Keep Fixed
  • Add Elastic, Remove Fixed

Runtime

  • Scan files and file extensions, use elastic on source code
  • Button in tag to pick Tab or Elastic

a: tag: files are not identified in a deterministic manner

These cases should be handled without ambiguity

  • The tag name
  • full path (relative and absolute) path
  • window name with a non-existent file
  • trailing slash file
  • mixed separator file
  • uri/http/upspin
  • anywhere where the intended CWD is different than the starting CWD of the process

Constant overflows int

Not sure this is an issue, but I get the following:

> go get -u -t github.com/as/a
# github.com/as/edit
c:\devenv\projects\_go\src\github.com\as\edit\lex.go:33:21: constant 9223372036854775807 overflows int

a: Edit: remove "MustCompile" call and replace with proper error handling

main.go:142,143: act.SendFirst(edit.MustCompile(sc.Text()))
main.go:289,290: prog := edit.MustCompile(addr)
main.go:296,297: prog := edit.MustCompile(addr)
main.go:312,313: prog := edit.MustCompile(addr)
main.go:356,357: actTag.Handle(actTag.Body, edit.MustCompile(e.Addr))
main.go:470,471: prog := edit.MustCompile(s[5:])

a: win: scroll+sweep is O(2n)

The traditional method for scroll+sweep is to transpose the background and foreground colors during insertion of new text. This is because the new text is being selected, so there is no need to highlight it again (just insert it with the right color in the first place). Currently, the logic in frame/win doesn't account for that. Text is inserted with the regular text color, and then repainted (which essentially means redrawn). A trivial performance improvement can be ascertained by fixing this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.