A graphical text editor

Overview

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
Comments
  • a: windows gives me a black window.

    a: windows gives me a black window.

    C:\> go get github.com/as/a
    C:\> a
    guide
    CreateFile guide: Das System kann die angegebene Datei nicht finden.
    .
    +Errors
    CreateFile +Errors: Das System kann die angegebene Datei nicht finden.
    

    I get a black, empty window. That's all.

    regression 
    opened by dertuxmalwieder 6
  • a: not building on darwin

    a: not building on darwin

    Trying a build on Mac OSX 10.13.3; go version go1.10 darwin/amd64

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

    github.com/as/ms/win

    GitHub/go/src/github.com/as/ms/win/win.go:10:12: undefined: Open GitHub/go/src/github.com/as/ms/win/win.go:25:12: undefined: Open GitHub/go/src/github.com/as/ms/win/win.go:53:2: not enough arguments to return have ([]uintptr) want ([]uintptr, error)

    github.com/as/shiny/driver/gldriver

    cocoa.m:24:5: error: redefinition of enumerator 'NSEventTypeScrollWheel' /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:40:5: note: previous definition is here cocoa.m:25:5: error: redefinition of enumerator 'NSEventTypeKeyDown' /System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:32:5: note: previous definition is here cocoa.m:28:5: error: redefinition of enumerator 'NSWindowStyleMaskTitled' /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:36:5: note: previous definition is here cocoa.m:29:5: error: redefinition of enumerator 'NSWindowStyleMaskResizable' /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:39:5: note: previous definition is here cocoa.m:30:5: error: redefinition of enumerator 'NSWindowStyleMaskMiniaturizable' /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:38:5: note: previous definition is here cocoa.m:31:5: error: redefinition of enumerator 'NSWindowStyleMaskClosable' /System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:37:5: note: previous definition is here

    ain't that peculiar.

    bug 
    opened by xt0fer 3
  • Constant overflows int

    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
    
    bug 
    opened by asampal 3
  • Cannot build; errors with as/font

    Cannot build; errors with as/font

    +(128) pechkin ~ % \go get -u -t github.com/as/a 
    # github.com/as/ui/win
    go/src/github.com/as/ui/win/win.go:25:3: cannot use "github.com/as/font".NewFace(11) (type "github.com/as/font"
    .Face) as type "github.com/as/frame/vendor/github.com/as/font".Face in field value:
            "github.com/as/font".Face does not implement "github.com/as/frame/vendor/github.com/as/font".Face (wron
    g type for Glyph method)
                    have Glyph("golang.org/x/image/math/fixed".Point26_6, rune) (image.Rectangle, image.Image, imag
    e.Point, "golang.org/x/image/math/fixed".Int26_6, bool)
                    want Glyph("github.com/as/frame/vendor/golang.org/x/image/math/fixed".Point26_6, rune) (image.R
    ectangle, image.Image, image.Point, "github.com/as/frame/vendor/golang.org/x/image/math/fixed".Int26_6, bool)
    go/src/github.com/as/ui/win/win.go:203:33: cannot use w.Config.Frame.Face (type "github.com/as/frame/vendor/git
    hub.com/as/font".Face) as type "golang.org/x/image/font".Face in argument to "github.com/as/font".Open:
            "github.com/as/frame/vendor/github.com/as/font".Face does not implement "golang.org/x/image/font".Face 
    (wrong type for Glyph method)
                    have Glyph("github.com/as/frame/vendor/golang.org/x/image/math/fixed".Point26_6, rune) (image.R
    ectangle, image.Image, image.Point, "github.com/as/frame/vendor/golang.org/x/image/math/fixed".Int26_6, bool)
                    want Glyph("golang.org/x/image/math/fixed".Point26_6, rune) (image.Rectangle, image.Image, imag
    e.Point, "golang.org/x/image/math/fixed".Int26_6, bool)
    go/src/github.com/as/ui/win/win.go:209:22: cannot use ft (type "github.com/as/font".Face) as type "github.com/a
    s/frame/vendor/github.com/as/font".Face in assignment:
            "github.com/as/font".Face does not implement "github.com/as/frame/vendor/github.com/as/font".Face (wron
    g type for Glyph method)
                    have Glyph("golang.org/x/image/math/fixed".Point26_6, rune) (image.Rectangle, image.Image, imag
    e.Point, "golang.org/x/image/math/fixed".Int26_6, bool)
                    want Glyph("github.com/as/frame/vendor/golang.org/x/image/math/fixed".Point26_6, rune) (image.R
    ectangle, image.Image, image.Point, "github.com/as/frame/vendor/golang.org/x/image/math/fixed".Int26_6, bool)
    
    opened by gvolk0 2
  • Logo design

    Logo design

    Hi Hello I am looking for open source projects to contribute with graphical design, I have been contributing to several opensource projects for free, I would like to know if you are interested that I make a logo for this your project ?. It´s all free, I just need to know what do you want for the logo.

    Greetings

    Nuno Jesus

    opened by nunojesus 2
  • a: vgo: v0.6.7 code cannot compile

    a: vgo: v0.6.7 code cannot compile

    ➜  a git:(master) ✗ vgo build
    # github.com/as/a
    ./look.go:35:17: undefined: fs.Resolver
    ./look.go:165:38: undefined: fs.Path
    

    Because the dependent version of as/srv has not been updated. Please tag a new version of as/srv and update go.mod.

    opened by choleraehyq 1
  • a: too many

    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 {
    
    code quality 
    opened by as 1
  • a: win: scroll+sweep is O(2n)

    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.

    performance 
    opened by as 1
  • a: text: single line without newline doesn't get selected on double click

    a: text: single line without newline doesn't get selected on double click

    When you double click to the right of a line, it selects the entire line. This doesn't work when you have a single line in the file without a trailing newline.

    bug 
    opened by as 0
  • a: scroll: out-of-bounds selection hold results in no scroll feedback unless cursor moves

    a: scroll: out-of-bounds selection hold results in no scroll feedback unless cursor moves

    The text should scroll if you make a selection and move the cursor out of vertical bounds of the window, even if the mouse isn't moved. Currently, it only scrolls if the mouse is moved (ever so slightly works).

    This bug was introduced during the shiny hard fork.

    bug regression 
    opened by as 0
  • a: resizing/moving difficult without different colored col/win handle square

    a: resizing/moving difficult without different colored col/win handle square

    In acme it is easy to visually grok where to click if you want to resize a win/col or move a win to another col. 1537498228

    By comparison, there is no quick visual way of determining where to click to resize columns or windows or for moving windows to another column, see image below from a. 1537498254

    I don't really have any opinion as to how to indicate these two areas, just that they are easy to distinguish from each other and from the scroll bar when the window above has a scroll handle that isn't the size of the window itself, see image below.

    1537499567

    Also, thanks for the excellent work on this project :+1:

    enhancement 
    opened by lanzafame 0
Releases(v0.7.3)
  • v0.7.3(Jun 26, 2018)

    a-windows-amd64.zip a-linux-amd64.zip a-darwin-amd64.zip

    Changes

    • font: add $fontsize processing for low DPI systems
    • refactor window placement algorithm
    • img: experimental image rendering
    • dump: add dump and load support (acme compatible)
    • edit: fix edit refresh bug
    • font: add Font command to cycle between the go font styles
    • look: fixes festering look bugs
    • utf8: prevent crash when starting a with -u flag; workaround for #141 and fixes #107
    Source code(tar.gz)
    Source code(zip)
  • v0.4.8(Sep 19, 2017)

    Synopsis

    This is a binary release of A text editor. A native, graphical, multi-platform, multi-window text editor written in Go and heavily influenced by Acme and Sam from the Plan 9 operating system. Much appreciation and thanks goes to Rob Pike, the creator of those two editors. I could not stand any other editors after using them, and had to make something similar that ran on all four operating systems I use after being introduced. (I also edit and examine a lot of binary files). The cognitive dissonance of using vi for five years and realizing the lie of keyboard shortcuts is profound. The process of creating a text editor from scratch is enlightening.

    This is not a straight port, in spite of the similarities it may have to the originals, and this version is not stable enough to use in production. This editor emphasizes mouse cording like the real thing rather than keyboard shortcuts. You double click on a text to expand it, middle click to execute it as a shell command, and right click to look (open/search). A scroll wheel press can act as mouse 2.

    Some notes on the binary release:

    • The release includes Windows and Linux binaries for AMD64
    • The Darwin cross compile failed, due to OpenGL and Darwin.
    • There is no undo/redo yet, but the machinery is there to do it right
    • The Edit command language is 90% functional, and has been sped up significantly, by a factor of 1000x
    • Don't edit files you aren't willing to lose, this is not 1.0 software
    • The true UNIX keyboard shortcuts work
    • The font size can be changed with ctrl+=- (like a browser)

    Living Bugs

    • The mouse state machine has a race that can cause the mouse to lock up in selection mode
    • The tag management/path management isn't hardened
    • Scroll in the main tag and a crash occurs
    • See the issue tracker for more

    Differences From Acme/Sam

    This list does not account for things that are not implemented yet

    • Looking at text in the main tag dispatches search requests for that text in all open windows
    • The sizers are currently invisible
    • Binary files are safe to edit, NUL bytes will never be elided.

    See Also

    The documentation for Acme can be found here. It is a useful reference to using this editor too.

    http://acme.cat-v.org/

    Source code(tar.gz)
    Source code(zip)
    a(5.86 MB)
    a.exe(4.64 MB)
Owner
You have to try it as hard as you can throw it
null
A Programmer's Text Editor

The de Editor de is a programmer's editor. (Where that programmer happens to be driusan.) It's kind of like a bastard child of vim and Plan 9's acme e

Dave MacFarlane 404 Dec 8, 2022
A very religious text editor

--== Godit - a very religious text editor ==-- Screenshots: * https://nosmileface.dev/images/godit-linux1.png * https://nosmileface.dev/images/god

null 546 Dec 27, 2022
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals.

Zachary Yedidia 20.8k Dec 30, 2022
Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files.

tabby Source code editor written in Go using go-gtk bindings. It aims to handle navigation effectively among large number of files. screenshot: depend

Mikhail Trushnikov 50 Nov 16, 2022
An Enhanced Go Experience For The Atom Editor

go-plus An Improved Go Experience For The Atom Editor Github: https://github.com/joefitzgerald/go-plus Atom: https://atom.io/packages/go-plus Overview

Joe Fitzgerald 1.5k Dec 26, 2022
Go version of Plan9 Acme Editor

Overview Go port of Rob Pike's Acme editor. Derived from ProjectSerenity but now increasingly divergent. ProjectSerenity was itself a transliteration

Robert Kroeger 342 Dec 24, 2022
Binary editor written in Go

bed Binary editor written in Go Screenshot Why? Why not? Programming is so fun! I learned so much while creating this editor; handling of file pointer

itchyny 1.1k Jan 5, 2023
WYSIWYG theme editor for Fyne

fyne-theme-generator WYSIWYG theme editor for Fyne Installation go get github.com/lusingander/fyne-theme-generator Usage You can change each parameter

Kyosuke Fujimoto 87 Jan 5, 2023
MdEdit is a Vi-like markdown editor built using Gio

MdEdit MdEdit is a Vi-like markdown editor built using Gio. It is extremely early stage software. The Vi editor lacks most functionality and might be

Steve Russo 3 Jun 29, 2022
Mini is a small text editor, inspred by antirez's kilo editor.

mini Mini is a small text editor, inspred by antirez's kilo editor. It aims to Keep it simple, stupid.

Ken Hibino 77 Dec 23, 2022
NERV Editor - A simple but peculiar text editor

nerved a simple but peculiar text editor introduction nerved is a text editor bu

kiasaki 6 Oct 24, 2022
A Programmer's Text Editor

The de Editor de is a programmer's editor. (Where that programmer happens to be driusan.) It's kind of like a bastard child of vim and Plan 9's acme e

Dave MacFarlane 404 Dec 8, 2022
A very religious text editor

--== Godit - a very religious text editor ==-- Screenshots: * https://nosmileface.dev/images/godit-linux1.png * https://nosmileface.dev/images/god

null 546 Dec 27, 2022
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals.

Zachary Yedidia 20.8k Dec 30, 2022
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals

Zachary Yedidia 20.9k Jan 7, 2023
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals.

Zachary Yedidia 20.9k Jan 5, 2023
a simple and lightweight terminal text editor written in Go

Simple Text editor written in Golang build go build main.go

buzz 3 Oct 4, 2021
Are you programming and suddenly your stomach is rumbling? No problem, order your Ifood without leaving your favorite text editor ❤️

vim-ifood Você ta programando e de repente bateu aquela fome? Sem problemas, peça seu Ifood sem sair do seu editor de texto favorito ❤️ Are you progra

Felipe Volpone 4 Jun 2, 2022
Tool to easily rename or move a bunch of files with a text editor of your choice

batch-rename With batch-rename you can utilize your favorite text editor to rename or move a bunch of files at once. It doesn't come with any features

David Vogel 2 Nov 2, 2022
Built Virtual Operating System and integrated application like calculator, gallery app , weather app, and text editor.

Virtual Operating System Built Virtual Operating System and integrated application like calculator, gallery app , weather app, and text editor. Langua

null 0 Nov 2, 2021