Sublime-like terminal-based text editor
Go to file
2014-12-31 14:12:55 -06:00
lib Improves boolean argument parsing 2014-12-29 04:18:56 -06:00
test Updates to newer version of blessed 2014-05-12 04:23:43 -05:00
.gitignore Initial commit 2014-04-20 20:39:14 -07:00
index.js Populate repository 2014-04-21 13:20:48 -05:00
install.sh Creates install.sh 2014-12-31 14:12:55 -06:00
LICENSE Initial commit 2014-04-20 20:39:14 -07:00
package.json Version 0.0.51 2014-12-29 04:36:29 -06:00
README.md Creates install.sh 2014-12-31 14:12:55 -06:00
screenshot.png Updates screenshot 2014-06-23 03:57:18 -05:00
slap.ini Highlighting is now disableable 2014-12-29 04:07:47 -06:00

Screenshot

slap

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

  • first-class mouse support
  • GUI editor-like keybindings*
  • copying/pasting with OS clipboard support
  • undo/redo
  • syntax highlighting for many languages
  • a Sublime-like file sidebar
  • select word to highlight other occurrences; double-click to select word
  • easy-to-use finding with regex support
  • bracket matching
  • ... 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

Usage

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

Configuration

You can pass options in via command line:

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

Or equivalently, you can use ~/.slap/config:

[header.style]
bg = "red"

All configuration options and their defaults are documented here.

OS support

OSX

iTerm2 works best. Terminal.app does not support some default keybindings but mouse support works well with the MouseTerm SIMBL plugin.

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!

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!

Too slow!

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.