Giter Site home page Giter Site logo

textbringer's Introduction

Textbringer

Gem Version ubuntu windows macos

Textbringer is a member of a demon race that takes on the form of an Emacs-like text editor.

Screenshot

Screenshot

Demo

Installation

$ gem install textbringer

You need ncursesw to use multibyte characters. Install ncursesw before installing curses.gem, on which textbringer depends.

$ sudo apt-get install libncursesw5-dev
$ gem install curses

Usage

$ textbringer

You can quit the editor by Ctrl-x Ctrl-c.

Many commands and key bindings are similar to Emacs.

Type F1 b or Alt+x describe_bindings RET to see key bindings.

Configuration

Meta key

You need the following configuration of terminal emulators to use meta key.

xterm

Add the following line to ~/.Xresources.

XTerm*metaSendsEscape: true

mlterm

Add the following lines to ~/.mlterm/main.

mod_meta_key = alt
mod_meta_mode = esc

East asian ambiguous width

Add the following line to ~/.textbringer.rb to treat ambiguous characters as fullwidth.

CONFIG[:east_asian_ambiguous_width] = 2

You also need a LD_PRELOAD hack or a modified locale charmap because ncursesw uses wcwidth(3).

xterm, mlterm and screen have their own configuration options.

xterm

Add the following lines to ~/.Xresources.

xterm*utf8: 1
xterm*locale: true
xterm*cjkWidth: true

mlterm

Add the following line to ~/.mlterm/main.

col_size_of_width_a = 2

screen

Add the following line to ~/.screenrc.

cjkwidth on

Development

After checking out the repo, run bundle install to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/shugo/textbringer.

License

The gem is available as open source under the terms of the MIT License.

textbringer's People

Contributors

shugo avatar kurod1492 avatar unak avatar

Watchers

 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.