GithubHelp home page GithubHelp logo

sebeaumont / yi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yi-editor/yi

0.0 1.0 0.0 33.56 MB

The Haskell-Scriptable Editor

License: GNU General Public License v2.0

Haskell 99.62% Logos 0.32% Nix 0.05% Makefile 0.01%

yi's Introduction

Yi

Travis Hackage Hackage-Deps

Yi is a collection of packages that serve as building blocks for making your very own text editor.

Installation

Just running stack install yi or cabal install -j yi would be akin to unwrapping a box of lego and finding an assembled spaceship there. Note that this way, it will not be possible to use a custom configuration.

In order to have a personalized configuration, it is necessary to use Yi as libraries to create your own text editor.

A good starting point is choosing an example configuration of your liking in the example-configs directory, building it, running it, and tinkering with it.

Static vs dynamic

Yi used to have a dynamic configuration (ร  la Xmonad). So each time after the configuration was changed, Yi needed recompilation before starting.

Now, it's recommended to use a static configuration which makes it possible to distribute binaries without the entire Haskell ecosystem.

Dynamic configuration is still available using a separate package.

See this article for more detailed explanations about static and dynamic configuration.

Static example configurations

The static example configurations don't need to be placed in any specific directory (but you can still use ~/.config/yi).

  1. Copy the example configuration (only the contents of the folder) to your yi folder.
  2. Install the configuration (with stack install or cabal install). Make sure the folder where stack (or cabal) installs executables is on your PATH.
  3. Run Yi with the command found in the package.yaml file under the executables line (i.e. yi-vty-emacs for the emacs config). You can also change the executable name here.

Dynamic example configurations

You can install this just like the static configuration. Make sure to copy the example configuration in the ~/.config/yi folder. After step 3, you should be able to just use the yi command to launch Yi. If you change your configuration file Yi automatically detects your changes and rebuilds itself.

See this documentation page for more detailed installation instructions. Hacking instructions if you're using the nix package manager are also there.

Configuration

Yi, as a library, can be categorized into four parts :

  • Frontends are responsible for rendering the editor state and passing user events to the core ;

  • Actions describe how to interact with the editor, and it's the part that makes most of Yi. It is structured around a stack of three monadic DSLs:

    • BufferM for all buffer-local operations, like insertion, deletion of text, and annotation of buffer contents. It can be understood as a monad that encapsulates the state of one buffer.
    • EditorM for editor-level operations, e.g., opening and closing windows and buffers. Operations involving more than one buffer are handled at this level too.
    • YiM for IO-level operations. There, one can operate on files, processes, etc. This is the only level where IO can be performed.
  • Keymaps represent how to trigger actions, they serve as the basis to use or to create the ones you need;

  • Glue code, how the three other parts are shaped together.

External configuration examples

Some people share their Yi configurations here on github.

Documentation

Please visit the Yi website.

Reporting bugs and feature requests

Please report issues (including documentation ones) on GitHub.

Mailing List

Our mailing list is yi-devel, hosted at Google Groups. Please ask us questions on this list! All development discussion occurs on this list.

IM channels

IRC: #yi@Freenode Please note that it is rather slow (very slow compared to #haskell), so be prepared to stay for longer than 5 minutes.

Matrix: #yi:matrix.org

How to support developers

Reading material

There are some papers which might interest you.

yi's People

Contributors

ethercrow avatar donsbot avatar np avatar fuuzetsu avatar jeffwheeler avatar noughtmare avatar jhance avatar acertain avatar benarmston avatar mgajda avatar hi-angel avatar reinerp avatar goj avatar nominolo avatar aiya000 avatar coreyoconnor avatar greenrd avatar maltem avatar quickdudley avatar mmn80 avatar juliapath avatar talanis85 avatar mpwp avatar cipherwraith avatar vivid-synth avatar niilohlin avatar waynr avatar exlevan avatar waern avatar jpaugh avatar

Watchers

James Cloos avatar

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.