Skip to content

SoluAlexis/slap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Make sure an up-to-date version of NodeJS is installed, then:

$ sudo npm install -g slap

Note: Some operating systems ship a version of NodeJS which might be too old. Please make sure to visit Node's official installation guide.

If npm install -g slap doesn't work, try using HTTP instead of HTTPS:

$ npm config set registry http://registry.npmjs.org/

Usage

$ slap file.c # open a file
$ slap file1.c file2.c # open two files
$ slap . # open current directory
$ slap # open a new file in current directory

Configuration

Copy some or all of the default configuration to ~/.slap/config to change keybindings, styles, etc. You can also pass options in via command line:

$ slap --logger.level debug file.c

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.

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!

About

Sublime-like terminal-based text editor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%