I want to introduce my WIP package ‘proton’ (name subject to change). Proton tries to bring a pleasent spacemacs + vim experience over to atom while at the same time improving the way you use the editor.
For those unknown to spacemacs style editing, spacemacs is a emacs configuration made for vim users. It has incredible vim support and adds very intiuitive keybindings on top. Here’s how it works;
Each keybinding is assigned to a certain category that is triggered with
g for example is
w is window and so on. Executing
space g s while in command mode executes, well, __[g]__it __[s]__tatus. Or
space w v splits the __[w]__indow __[v]__ertically.
Proton also makes sure that each part of the editor has vim-friendly keybindings out of the box. The overlay, autosuggest, tree-view and file browsers for example have all been re-mapped to allow navigation with
ctrl+j / ctrl+k.
Our goal is that you never have to leave the home-row for anything!
On top of that, each configuration happens in so called layers. A layer is a piece of isolated functionality that can be added to extend the editor further. Layers do the following:
- Install a handful of packages needed to operate
- Set keybindings for these packages to integrate with the editor
- Provide sane defaults for a pleasent experience
Git for example is a layer. It installs the git packages, adds the
g category and git keybindings and finally sets up the packages for you with good defaults (that you can override).
Instead of cramming your way through packages over packages to get something you need, just enable the layer for that and rely on community tested packages: Imagine you want to work on python. Instead of trial-and-error installing 5 python packages, just enable the python layer and boom! proton installs all the good bits that you need for a pleasent python experience.
proton also replaces your entire configuration system. Instead of maintaining x atom files, you now have 1 central one:
~/.proton. This file could look like this:
What I’m doing here is,
- I tell proton to install the layers:
- Next up, I saw I want the package
minimapwhich is not part of a layer, but I want it anyway
- For configuration, I say “change the font to Hack, hide the tab bar and use relative numbers”
- Lastly I specify that when I hit “escape” in the tree view, I want to hide it
Upon load, proton will wipe each little bit of configuration that is not managed through your .proton file. 1 version of your proton file will always result in an exact state of the editor configuration.
On top of that, proton will also deinstall each package that is not part of a layer or not specified by the user. Because if it is not needed, why even bother with keeping it?
Very dotfile friendly!
Proton is still in a very early state and nowhere near as stable as I wish it would be. To install, you currently have to compile it yourself. Check out the instructions here https://github.com/dvcrn/proton#install
If you have a cool layer idea, check out this document in how you can contribute https://github.com/dvcrn/proton/blob/master/HOW-TO-LAYER.md