slap-editor/slap

JavaScript

alternativa a Sublime Text

Sublime-like terminal-based text editor

editorterminaltext-editorsublime
Crescimento de estrelas
Estrelas
6.2k
Forks
220
Crescimento semanal
+1
Issues
97
2k4k6k
jan. de 2023mar. de 2024jun. de 2025set. de 2026
Artefatosnpm
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.

Repositórios relacionados
microsoft/vscode

Visual Studio Code

TypeScriptnpmappMIT Licenseeditorelectron
code.visualstudio.com
191.5k42k
OpenCut-app/OpenCut

The open-source CapCut alternative

TypeScriptnpmMIT Licenseeditoross
opencut.app
89k8.8k
toeverything/AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

TypeScriptnpmappOthereditorcrdt
affine.pro
72.3k5.2k
marktext/marktext

📝A simple and elegant markdown editor, available for Linux, macOS and Windows.

TypeScriptnpmappMIT Licensemacostypewriter-mode
marktext.me
61.2k4.5k
atom/atom

:atom: The hackable text editor

JavaScriptnpmappMIT Licenseatomeditor
atom.io
60.7k17.2k
slab/quill

Quill is a modern WYSIWYG editor built for compatibility and extensibility

TypeScriptnpmBSD 3-Clause "New" or "Revised" Licenseeditorrich-text-editor
quilljs.com
47.3k3.7k
microsoft/monaco-editor

A browser based code editor

JavaScriptnpmMIT Licensemonaco-editorvscode
microsoft.github.io/monaco-editor/
46.7k4.1k
mifi/lossless-cut

The swiss army knife of lossless video/audio editing

TypeScriptnpmGNU General Public License v2.0videoeditor
losslesscut.app
43.6k2.2k
drawdb-io/drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.

JavaScriptnpmGNU Affero General Public License v3.0database-schemaeditor
drawdb.app
39.4k3.2k
ueberdosis/tiptap

The headless rich text editor framework for web artisans.

TypeScriptnpmMIT Licensejsvue
tiptap.dev
38.3k3.1k
VSCodium/vscodium

binary releases of VS Code without MS branding/telemetry/licensing

ShellMIT Licensevscodeopen-source-licensing
vscodium.com
33.2k1.9k
codex-team/editor.js

A block-style editor with clean JSON output

TypeScriptnpmApache License 2.0editorwysiwyg
editorjs.io
31.9k2.2k