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
- heavily customizeable via plugins
- … many other features that will make you leave nano, vim, and emacs behind
$ 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
$ slap fish.c $ slap fish1.c fish2.c $ slap redfish/ # open dir in browser $ slap # new file in current dir
~/.slap/config to override the defaults in slap/slap.ini:
[header.style] bg = "red"
Alternatively, pass options in via command line:
$ slap --header.style.bg red file.c
iTerm2 supports the mouse and most keybindings out of the box. For optimal Terminal.app usage, see slap-Terminal.app-profile.
If you are using X.Org, ensure xclip is installed for OS clipboard support.
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.