Giter VIP home page Giter VIP logo

9ed's Introduction

Plan 9 Editors: Sam & Acme

This is a fork of the Sam and Acme editors, derived from the Plan 9 from User Space (aka plan9port) project (itself a port of many Plan 9 utilities to Unix).

This version tacks on a few extra keybindings and some functionality to allow a more keyboard-driven editing experience. Given both editors' emphasis on mouse use, this is perhaps somewhat heretical...

Changes

  • The X11 and MacOS implementations of devdraw now support further combination keybindings such as Ctrl + Shift + Key.

  • The default keybindings for both Acme and Sam now include:

Key combination Function Comment(s)
Ctrl + c Snarf (copy) Use Ctrl + Shift + c for sending ^C (0x03).
Ctrl + x Cut Use Ctrl + Shift + x for sending ^X (0x18).
Ctrl + v Paste Use Ctrl + Shift + v for sending ^V (0x16).
Shift + Left Extend selection left by one character
Shift + Right Extend selection right by one character
Ctrl + Shift + Left Extend selection left to start of line
Ctrl + Shift + Right Extend selection right to end of line
Up Move cursor up one line Moves the cursor to the same character position on the previous line, or the end of the previous line if it is shorter. Tabs are treated as a single character! This works best with fixed-width (monospace) fonts. Use PageUp for scrolling.
Down Move cursor down one line Moves the cursor to the same character position on the next line, or the end of the next line if it is shorter. Tabs are treated as a single character! This works best with fixed-width (monospace) fonts. Use PageDown for scrolling.
Shift + Up Extend selection up one line Extends the selection to the same character position on the previous line, or the end of the previous line if it is shorter. Tabs are treated as a single character! This works best with fixed-width (monospace) fonts.
Shift + Down Extend selection down one line Extends the selection to the same character position on the next line, or the end of the next line if it is shorter. Tabs are treated as a single character! This works best with fixed-width (monospace) fonts.
Delete Delete character to the right of the cursor Also deletes a selection. Use Shift + Delete for sending ^? (0x7F).
  • Additionally, the following shortcuts have been added for Acme only:
Key combination Function Comment(s)
Ctrl + z Undo Use Ctrl + Shift + z for sending ^Z (0x1A).
Ctrl + y Redo Use Ctrl + Shift + y for sending ^Y (0x19).
Ctrl + s Put (save) Use Ctrl + Shift + s for sending ^S (0x13).
Ctrl + Return Execute selected text as a command Same as mouse button 2 click.
Ctrl + Shift + Return Locate or acquire the file/string/etc currently selected Same as mouse button 3 click.
  • Finally alongside the new keybindings there are some Sam specific changes: window focus follows the mouse (rather than by clicking), and the mouse scroll-wheel can be used to scroll.

Installation

The main requirement is 9fans/plan9port. Usually this is installed to /usr/local/plan9:

git clone https://github.com/9fans/plan9port.git /usr/local/plan9
cd /usr/local/plan9
./INSTALL
export PLAN9=/usr/local/plan9
export PATH=$PATH:$PLAN9/bin

With the plan9port utilities accessible, the editors can be built using mk:

git clone https://github.com/lewis-weinberger/9ed.git
cd 9ed
mk install

This will create four executables: sam, samterm, acme and devdraw, installed by default at $PLAN9/bin/. To install the executables at a custom location, set the BIN environment variable (e.g. mk install BIN=/usr/local/bin). If installed at a custom location, make sure to set the PATH environment variable (as above) such that these new versions are found before the plan9port versions.

CAUTION: this is a personal fork with changes made based on my preferences, and only tested by me. Some of the changes may introduce new bugs and cause the editors to crash unexpectedly. Use at your own peril!

Usage

See acme(1) or sam(1), as well as the original papers by Rob Pike describing the editors:

There are helper scripts a and s which can be used to configure some of the runtime settings.

9ed's People

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.