npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@boutell/tome

v0.13.1

Published

A text editor, focused on JavaScript

Downloads

20

Readme

tome

tome, aka Tom's Editor. Maybe should be THE (Tom's Hubristic Editor).

Screenshot of tome in action

This is:

  • A brand new terminal-based text editor
  • Written in Node.js with practically no libraries (certainly no Electron)
  • Intended to stay small and scrappy
  • A mostly modeless editing experience, to the extent limited meta key support will allow
  • Following ordinary UI conventions as much as that fits with the above
  • Focused on editing JS, HTML, Vue single-file components and markdown (JS for now)
  • Released under GPLv3 so contributions come back (this does not mean the code you write with it is subject to the GPL)

Status

  • Alpha quality. I'm using tome to write tome, so I'll probably know pretty quick if it's a hot mess, but you should definitely use git and watch out for surprises.

Install

You must have Node.js 18 or better. The laziest way to get modern Node.js is via nvm.

npm install -g @boutell/tome

I publish a new alpha release whenever it seems stable-ish and I can get more work done with it myself.

Or, for the absolute bleeding edge, use git:

git clone https://github.com/boutell/tome
cd tome
npm link

Usage

tome some-file-you-want-to-edit

if the file does not exist it will be created at save time.

Where will it run?

Mac and Linux: definitely. Windows Subsystem for Linux: definitely. Windows: maybe.

There are minor issues around file paths that probably interfere with using this under plain Windows. The terminal escapes used on output should be fine now in updated Windows 10 or Windows 11, but it's anybody's guess what the keycodes are. Contributions to fix plain-Windows issues are welcome.

Commands

  • Type stuff
  • Move around with arrow keys
  • Tab key indents two spaces
  • Control-up and Control-down for Page Up and Page Down, or Control-O and Control-P on Mac
  • Keyboard select by pressing ESC, then moving around with arrow keys and the page up/down keys (can press ESC again if you change your mind)
  • Shift current selection left and right with the [ and ] keys while in selection mode
  • Cut, copy, paste with control-X, control-C, control-V
  • "Find" with control-F, variations and "Replace" are offered
  • "Find Again" / "Replace Again" with control-G
  • "Undo" with control-Z
  • "Redo" with control-Y
  • Save and keep working with Control-S
  • Exit, with optional save, via Control-Q
  • "Bounce" from an opening { to a closing } and vice versa with Control-B (also for ( ) and [ ])
  • Toggle between available programming languages with Control-L (useful if initial guess is wrong)

Working with multiple files

Start as many tome commands as you want in separate terminals. The clipboard is automatically shared. Just copy in one and paste in another. I'm talking about the built-in tome cut, copy and paste here (ESC to select, then control-x, control-c, control-v). These are shared as long as you are working in the same account.

Plan

See also github issues, this list is in the progress of migrating there.

  • Bootstrap this very quickly into something I can stand to use to edit JavaScript, just enough to work on it and see the problems. DONE
  • Fix the flicker. DONE
  • Undo. DONE
  • Redo. DONE
  • Refactor such that this doesn't all have to be one file and multiple instances of the editor become technically possible. DONE
  • "Sub-editors" for editing fields like "Find" with access to all of the same conveniences. DONE
  • Bare-bones Find feature. DONE
  • Find Again DONE
  • What's going on with emoji? DONE
  • Prevent nonprintable characters tome doesn't understand from winding up as text in the document. DONE
  • Prompt for "Find: " DONE
  • "Find" loops around DONE
  • Mac-friendly keyboard selection DONE
  • "Find" supports regexps, case insensitive DONE
  • Situational instructions at bottom of screen DONE
  • Alternate page-up, page-down keys for Mac DONE
  • "Virtual DOM" haha. No, but seriously, we should update a virtual terminal and calculate what changes are really needed in draw. Make this finally feel good over ssh. DONE
  • Find and Replace DONE
  • Fix the delay before entering select mode with ESC works DONE
  • Continuous parsing so indent is performant DONE
  • Parens-aware indent DONE
  • String-aware indent DONE
  • Make the js stuff file extension specific DONE
  • Syntax highlighting, round 1 DONE
  • Reindentation with [ and ] during selection DONE
  • Control-Q should not offer to save if there are no changes DONE
  • Comment toggling DONE
  • Show two lines of help DONE
  • Help Screen (as a scrollable read-only editor)
  • File locking for the actual file
  • Add some HTML stuff
  • Add some markdown stuff, might be as basic as auto word wrap support, maybe color coding to catch runaway blocks
  • Make the js stuff work in a script tag too
  • Plugin support flexible enough that anyone can install a feature from any source without shipping it in core, e.g. not everyone wants AI copilot in their life but some people do
  • More efficient rendering in more situations, for slow links (take advantage of built in terminal scrolling)
  • Add .editorconfig support (including support for storing tabs, controlling # of spaces, etc)
  • Support for language servers
  • And/Or: true JS parsing, so keyword highlighting etc. can be implemented
  • Simple file browser

Contributions

Your contributions are welcome. The project is licensed under GPLv3 (see the COPYING file). This is a welcoming, all-volunteer project, abuse will not be tolerated. It's a good idea to discuss before embarking on a major feature just to make sure we have the same overall architecture in mind.