Coder Social home page Coder Social logo

ttt's Introduction

ttt

A visual Vim-like editor for trees of text blobs, like outlines or nested TODOs.

demo3

Usage

ttt has a Vim-like modal interface, but adds a new top-level mode for manipulating the actual tree called tree mode. Editing the text of a single mode is done in edit mode and insert mode that work like Vim's normal and insert mode, except scoped to a single node of text. Not all Vim motions or commands are supported yet, but the basics are there.

Rather than using registers, cut/copy/paste operate using a "snip stack", one for entire tree nodes and a separate one for text.

When ttt loses focus it will automatically sync the current tree if it has a location.

Tree mode commands

Key Command
j Move to next child (visually "down" tree)
k Move to previous child (visually "up" tree)
ctrl+j Swap current child with next child (visually "down" tree)
ctrl+k Swap current child with previous child (visually "up" tree)
l Move to the first child of the current node
h Move to the parent of the current node
i Start inserting in current node at the end
I Start inserting in current node at the beginning
e Start editing current node
c Insert node as last child of the current node
C Insert node as first child of the current node
o Insert node in parent after current node
O Insert node in parent before current node
x Cut a node onto the snip stack
y Copy a node onto the snip stack
p Paste the top node of the snip stack
P Pop a node off the snip snack and insert it
alt+p Paste the top node of the snip stack as a child
alt+P Pop a node off the snip snack and insert it as a child
f toggle current node being folded (collapsed)
r set the current node as the current displayed root
- toggle strikeout display for current node
: enter command mode
esc return to tree mode
tab return to edit mode (from insert mode)

Command mode commands

  • e <url>: start editing a tree stored at <url>
  • s (<url>): sync the current tree with the stored version, optionally setting the location URL
  • q: quit
  • export.md <path>: export the current tree as a Markdown file, written to <path>.

Storage

Right now ttt supports storing and loading trees locally as text files in the RON format.

Storage locations in commands can be specified with URLs or using local paths starting with . or ~. Right now the file:// protocol is also supported for absolute paths. An initial location can be specified as a command line argument.

Building

You should just be able to run cargo build. Your platform must be able to support Skia on OpenGL. Metadata is provided to run cargo bundle as well to create an application bundle.

ttt's People

Contributors

andrew-pa avatar

Stargazers

 avatar Peter Whidden avatar

Watchers

 avatar  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.