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

slap-d

v0.1.61-d01

Published

FORK: Sublime-like terminal-based text editor

Downloads

8

Readme

Screenshot

slap :wave: Build Status Donate

slap is a Sublime-like terminal-based text editor that strives to make editing from the terminal easier. It has:

  • first-class mouse support (even over an SSH connection)
  • a Sublime-like file sidebar
  • double-click to select word, highlight other occurrences
  • configurable Sublime-like keybindings* (Ctrl+S save, Ctrl+Z undo, etc.)
  • copying/pasting with OS clipboard support
  • infinite undo/redo
  • syntax highlighting for 100+ languages
  • bracket matching
  • autoindentation
  • heavily customizeable via plugins
  • ... many other features that will make you leave nano, vim, and emacs behind

Installation

$ curl -sL https://raw.githubusercontent.com/slap-editor/slap/master/install.sh | sh

If you already have NodeJS installed:

$ sudo npm install -g slap@latest

Usage

$ slap fish.c
$ slap fish1.c fish2.c
$ slap redfish/ # open dir
$ slap # new file

Default keybindings

  • Quit: Ctrl+Q
  • Movement: mouse or arrow keys and PageUp/Down/Home/End
    • Shift or click+drag to select, Ctrl/Alt to move faster
  • Save: Ctrl+S
  • Undo: Ctrl+Z, redo: Ctrl+Y
  • List open tabs: Ctrl+L
  • Next/previous tab: Ctrl+Alt+PageUp/Down
  • Close tab: Ctrl+W
  • Find: Ctrl+F
  • Go to line: Ctrl+G
  • Go to matching bracket: Ctrl+]
  • Open: Ctrl+O (or click the filebrowser)
  • New file: Ctrl+N

Configuration

slap supports INI or JSON config files. You can put configuration wherever rc can find it. A mostly empty configuration file with some useful comments is created in ~/.slap/config if an existing file isn't found.

Pass configuration via command line:

$ slap --header.style.bg red file.c

Plugins

Slap is fully customizeable and supports plugins written in JS. You can place single JS files, or NodeJS packages, into ~/.slap/plugins/.

To write your own plugin, a good starting point is slap-clipboard-plugin. Please note that plugin packages must have "keywords": ["slap-plugin"] in package.json.

OS support

OSX

iTerm2 supports the mouse and most keybindings out of the box. For optimal Terminal.app usage, see slap-Terminal.app-profile.

Linux

If you are using X.Org, ensure xclip is installed for OS clipboard support.

Windows

Most terminal emulators in Windows do not support mouse events, PuTTY being a notable exception. In Cygwin, slap crashes on startup due to joyent/node#6459.

Issues

Join us in #slap on Freenode for troubleshooting, theme/plugin/core development, or palm strike discussion of any nature.

Some keys don't work!

NOTE: if you are using Terminal.app, see slap-Terminal.app-profile.

Unfortunately most terminal emulators do not support certain keystrokes and as such there is no way to handle them. These include C-backspace, S-home/end, and S-pageup/down. Most of these actions have alternate keybindings, inspired by emacs and other editors, but if you find one that doesn't work, please submit an issue!

Slow on single cores, Raspberry Pi

slap is based on Github's atom/text-buffer, and as such should be very performant, even with very large files.

Try --editor.highlight false or adding the following to ~/.slap/config:

[editor]
highlight = false

If that doesn't improve performance, please run with --perf.profile true and submit an issue with the newly-created v8.log file.