slap下载 - 类似Sublime形式的基于终端的文本编辑器
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
copying/pasting with OS clipboard support
syntax highlighting for 100+ languages
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 $ slap # new file
Movement: mouse or arrow keys andPageUp/Down/Home/End
Shiftor click+drag to select,Ctrl/Altto move faster
List open tabs:Ctrl+L
Go to line:Ctrl+G
Go to matching bracket:Ctrl+]
Open:Ctrl+O(or click the filebrowser)
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/configif an existing file isn't found.
Pass configuration via command line:
$ slap --header.style.bg red file.c
Slap is fully customizeable and supports plugins written in JS. You can place
single JS files, or NodeJS packages, into
To write your own plugin, a good starting point isslap-clipboard-plugin.
Please note that plugin packages must have
"keywords": ["slap-plugin"] in
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 tojoyent/node#6459.
Join us in #slap on Freenode for troubleshooting, theme/plugin/core development, or palm strike discussion of any nature.
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
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, pleasesubmit an issue!
slap is based on Github's atom/text-buffer, and as such should be very performant, even with very large files.
--editor.highlight false or adding the following to
[editor] highlight = false
If that doesn't improve performance, please run with
--perf.profile true andsubmit an issue with the newly-created