Giter Site home page Giter Site logo

tson's Issues

Consider more conventional tree navigation behaviors

I find it helpful when navigating any tree structure to be able to collapse and expand all nodes, but also go <-- (left) and --> (right) to move into & out of the structure's depth.

Right now, LEFT and RIGHT arrow keys only go UP and DOWN, but would you consider having LEFT and RIGHT jump directly to the adjacent parent/child node in that direction?

Also, the key bindings are really unintuitive for non-vim users. Could we consider using SPACEBAR and SHIFT-* (etc.) for certain actions like expanding/collapsing current node, jumping up or down a page or element, etc? I don't have anything too concrete in mind, but it's a little tricky to use right out of the box. I have to keep referencing the table in the readme, but I feel like I should just be able to figure it out with my arrow keys and spacebar and ctrl/shift keys.

Additionally, the "Collapse all nodes" (H) doesn't seem to be very helpful, as it just replaces everything with a . ... which I can then edit... anyway, I just think there's some room for significant improvement here in the UI.

Refactor for use as a library

I know this sounds a bit crazy, but it would be great if this could be used as a library. Basically, separate out the parts of this tool that deal with the command line, and put the code that actually does the TUI stuff and tree nav in its own package.

For example (without having given it too much though), this would be very nice:

myJSON := []byte{...}
updatedJSON, err := tson.Edit(myJSON)
// a TUI screen would cover the terminal at this point,
// and relinquish itself when done editing, while
// returning the resulting JSON bytes

I could see myself embedding something like this into Caddy 2, which is configured entirely by JSON. But only if it can be used as a library like this.

Imagine starting up your web server in some interactive/dashboard mode, and being able to watch it in real-time in your terminal (kind of like what htop does, but just for your server), while being able to edit its configuration right there as well! Super useful for development too!

Anyway, I'm excited about this project, I hope you'll keep developing it.

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.