Giter Site home page Giter Site logo

yacco's Introduction

What is this?!

This is a reimplementation of acme with features deemed unclean by the wider plan 9 community. It is written in Go.

Differences from acme

There's a number of extra features and changes from acme, since I've never bothered cataloguing them I can't list them now. This is a list of some of the more important ones

  • Plumbing is builtin and can be configured from yacco's config file. Right clicking outside of a selection will "plumb" the entire line instead of the single word under the seletion. The first rule to match the text around the position of the click will be executed. This change was done to make dealing with python easier.

  • Default keybindings are defined in config/keys.go, additional keybindings can be defined using the "Keybindings" section of the configuration file. Up/down change line, left/right move by one character, ctrl-left/ctrl-right move by one word. Ctrl-backspace deletes one word.

  • Cutting is called Cut instead of Snarf. Pasting will attempt to adjust the indenation of the text being pasted.

  • Ctrl+left click is equivalent to middle clicking. Ctrl+middle is equivalent to the weird middle+left click chord in acme.

  • The version of win shipped with yacco will strip ANSI escape codes from the output before sending it to yacco. It even supports a few of them.

  • There's a number of differences in the Edit languages due to either underspecification in the man page, mistakes or deliberate changes and additions. The 's' command will always replace all occourences in the selection, the 'g' comamnd will only evaluate its argument when the regexp matches the entire selection. The 'X' and 'Y' commands have barely been tested.

  • Minimal syntax highlighting is implemented. The only supported languages are Go, C, C++, Java, Javascript and Python. The rules are in config/config.go, the LanguageRules variable. All that's implemented is highlighting strings and comments in different colors, there's no provisions for coloring numbers or keywords differently.

  • Color themes are defined in config/color_schemes.go. The theme can be changed by using the Theme build in command or by changing adding a -t option to the startup script.

  • Ctrl-f/Ctrl-g implement the search-as-you-type-interactive-search that every other editor has.

  • LookFile or Ctrl-q implements the fuzzy-file-search feature that every other editor has. Type return to open the first search result, or right click on any of the results.

  • Dump will save to ~/.config/yacco/ by default, the dump file will be updated every time you save any open file.

Acme compatibility

  • Mouse chording was implemented but I found it inferior to ctrl+c/v/x and never used it. It probably has bugs.

  • The 9p protocol is the (more or less) same as acme but yacco serves it at $NAMESPACE/yacco.$YACCOPID if NAMESPACE is defined, or at /tmp/ns.$USER.$DISPLAY/yacco.$YACCOPID if NAMESPACE is not defined. If you want yacco to pretend to be acme you can do that with the -acme command line option. I've tested this with win and Mail from plan9port and it seems to work, but testing was far from thorough.

Installing

Run ./install.sh installdir. This will create two files and one directory:

  • $installdir/yaccodir: a directory containing all of yacco's executables
  • $installdir/yacco: yacco's startup script (change this if you want a different default theme)
  • ~/.config/yacco/rc: yacco's configuration file.

Compiling on macOS/Windows

  • The verison of shiny in vendor/golang.org/x/exp/shiny/ is modified and does not compile on windows/macOS anymore. There should only be two added methods SetTitle and WarpMouse, neither is indespensible and they can both be stubbed out with little loss of functionality.

  • Assumptions of unix-like behavior (and even linux-like in particular) were made throughout the program, using it on non-linux systems (especially windows) may cause difficulties.

yacco's People

Contributors

aarzilli avatar d-tsuji avatar omar-polo avatar xxzozaxx 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yacco's Issues

missin key 'Alt' in Font

Hi,

I want to try out yacco on linux machine (Debian GNU/Linux) and compilin run fine. but at run time I have this error message

Could not load configuration file: missing key 'Alt' in Fonts
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x5f377c]

goroutine 1 [running]:
github.com/aarzilli/yacco/textframe.(*Frame).Init(0xdd7e60, 0x5, 0x9b6845, 0x4)
        /home/master/Programs/0TextEditors/yacco/textframe/frame.go:128 +0x18c
main.(*Window).Init(0xdd7e00, 0xa6f180, 0xc0001b6000, 0x0, 0x0, 0x0, 0xc0000b1d38)
        /home/master/Programs/0TextEditors/yacco/win.go:151 +0x576
main.realmain(0xa6f180, 0xc0001b6000)
        /home/master/Programs/0TextEditors/yacco/yacco.go:105 +0xef
golang.org/x/exp/shiny/driver/x11driver.main(0x9dc248, 0x0, 0x0)
        /home/master/.go/pkg/mod/github.com/aarzilli/[email protected]/shiny/driver/x11driver/x11driver.go:58 +0x259
golang.org/x/exp/shiny/driver/x11driver.Main(0x9dc248)
        /home/master/.go/pkg/mod/github.com/aarzilli/[email protected]/shiny/driver/x11driver/x11driver.go:31 +0x2f
golang.org/x/exp/shiny/driver.main(...)
        /home/master/.go/pkg/mod/github.com/aarzilli/[email protected]/shiny/driver/driver_x11.go:15
golang.org/x/exp/shiny/driver.Main(...)
        /home/master/.go/pkg/mod/github.com/aarzilli/[email protected]/shiny/driver/driver.go:24
main.main()
        /home/master/Programs/0TextEditors/yacco/yacco.go:197 +0x13a

NOTE: I have empty rc config file

Repository License

Hi,

I'm impressed with this amazing repository. And we would like to use your wonderful repository, but could you please tell me the license?

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.