The reasoning behind writing these set of functions is that I love Emacs, however, the UI doesn't feel as snappy as other Mac apps. On the other hand I cannot move to another editor since many of those hyped editors is that they don't provide the keybindings I love.
Then, I found Sublime Text 2. A completely customizable editor allowing you to easily modify all default behaviors so that they suit your editing style.
So I wrote sublemacspro bringing Emacs keybindings and sugar to Sublime Text 2. Even though Emacs lives from the plugins, I believe it is way easier to write new plugins in Python and integrate them in an Emacs-ish way to Sublime Text 2 than writing them in Lisp.
To install SublemacsPro you have to install Package
Control as an automatic
package manager for Sublime Text 2. Now you can easily install Sublemacs Pro and
your installation will never be outdated. When you installed Package Control,
hit S-Shift P
to open up the command palette and type install
. Now
select "Package Control: Install Package". This will load all packages from the
remote repository and you can select sublemacspro
from the drop-down list.
Currently, we are working on Sublime Text 3 support. Most of the features should work and some bugs with regard to Python 3 are already fixed. So feel free to try the Package Control Beta for ST3 and install sublemacspro. If there are any issues feel free to report them.
The following features are supported and merged from other approaches and the base code of the new beta of Sublime Text 2.
- Kill line, region ... with kill ring. All the sugar you love with a nice UI
with
M-w
,C-w
,C-y
- Yank with free choice from kill ring using fancy overlay: Just press
C-Y
to access the kill ring and search for your last copy and pastie - Rectangular cut and insert using
C-x r t
andC-x r d
- Named registers to store data using
C-x r s [register]
andC-x r i [register]
- Open a new line by
C+o
- Automatic mode detection like it's done in Emacs using prefixes
-*- c++ -*-
ctrl+a
andctrl+e
find the hard EOL / BOLalt+a
will go to soft BOLctrl+s
andctrl+r
work like expected from Emacs with repeatedly pressingctrl+s
for navigating to the next occurrencectrl+g
will try to exit any kind of overlays, exit snippet mode etcalt+/
is used for tab completion sincetab
is bound to reindentalt+z
zap-to-char, delete from current point until next occurrence of characterctrl+x, ctrl+b
will present a list of open buffersctrl+x, (
andctrl+x, )
will toggle macro recording and execution is done byctrl+x, e
ctrl+alt+[
andctrl+alt+]
for paragraph navigationctrl+x r SPC r
for point-to-registerctrl+x r j r
for jump to point in registerctrl+x r s r
for text-to-registerctrl+x r i r
for insert text from register- And many more, most likely a key binding that you expect from Emacs will work as well in sublemacs
The key bindings are strictly oriented on their original Emacs counterpart, however, sometimes the action might be a little different due to other semantics.
We will try to extend this more and more to provide more features from Emacs to Sublime Text 2 and make this my fast and beautiful Emacs replacement.
2012 Martin Grund (@grundprinzip), Brian M. Clapper (@bmc)
- @dustym - focus groups
- @phildopus - for goto-open-file
- @aflc - toggle comment improvements
- @jinschoi - ST3 bugfix
- @mcdonc - inspiration for more Emacs key bindings