onivim/oni

[RFC] Implementation of Spacemacs/Spacevim Concepts

Open

#2,322 opened on Jun 15, 2018

View on GitHub
 (23 comments) (8 reactions) (0 assignees)TypeScript (11,389 stars) (336 forks)batch import
Feature-requestgood first issue

Description

One of the main problem people often have when setting up their vim environment is that different plugins come with different keybindings which are more or less hard to remember and it can be time consuming to configure sane keybindings. When working with different programming languages the best would be to have the same bindings for the same features. Setting this up can be a real pain (or even impossible).

SpaceMacs/SpaceVim tries to solve this by introducing a layer system and key chaining. Together with a keyguide they get mnemonic keybindings which can be looked up while being used. This makes getting into using them very easy. I think the high number of contributors is a good sign that the system works.

It would be very cool if Oni could introduce the same kind of Layers to manage packages of Plugins and keybindings. What do you guys think about this?

For those who don't know how SpaceVim work, here a little introduction:

Disclaimer: I created this short intro just by myself quickly. It may contain errors and is very incomplete. It just describes the keybinding part of SpaceVim

Almost all features can be accessed by pressing SPC (Space) and then mnemonic keys in a row. For example if I want to open the configuration file of SpaceVim I press the following keys one after another:

  • SPC opens the core Layer
  • f -> stands for File. All File operations can be accessed from here
  • v -> stands for vim. This is still the core layer providing options for vim files
  • d -> probably stands for the Spacevim .d directory. This opens the default SpaceVim configuration file.

This can be remembered very easy. But if I for example forget the last button, I can just press SPCfv and after a second the leader guide will pop up and show me all possible options: image

This means instead of pressing d, which opens my custom spacevim config, I can press v to show the current SpaceVim version.

The next example includes different layers:

I want to insert a lorem ipsum sentense:

  • SPC -> open core layer
  • i -> open Insertion layer (this is not a real layer, since multiple Layers are accessible from here, but ignore that for now)
  • l -> open Lorem Ipsum options which is provided by the edit layer
  • s -> insert a sentence of lorem Ipsum text

If I deactivate the edit layer, I can't insert lorem ipsem text this way anymore. But I could write my own better_loremipsum_plugin and add this to my own better_edit_layer which I can then activate to add better functionality if I wanted... Obviously I would have to set the same keybindings in the layer. But if done right, anyone in the world could just use my new layer and it should work out of the box

Contributor guide

[RFC] Implementation of Spacemacs/Spacevim Concepts · onivim/oni#2322 | Good First Issue