2016-01-06 05:21:55 +00:00
|
|
|
#+TITLE: Bépo layer
|
2015-11-08 18:04:44 +00:00
|
|
|
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../../css/readtheorg.css" />
|
2015-09-24 22:42:42 +00:00
|
|
|
|
|
|
|
#+CAPTION: logo
|
|
|
|
|
|
|
|
[[file:img/bepo.png]]
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
* Table of Contents :TOC_4_org:noexport:
|
|
|
|
- [[Description][Description]]
|
|
|
|
- [[Install][Install]]
|
2015-10-19 22:41:53 +00:00
|
|
|
- [[Variables][Variables]]
|
|
|
|
- [[Customization][Customization]]
|
|
|
|
- [[Mapping][Mapping]]
|
|
|
|
- [[Configurations][Configurations]]
|
|
|
|
- [[Keybindings][Keybindings]]
|
2015-10-30 11:20:58 +00:00
|
|
|
- [[Contributors][Contributors]]
|
|
|
|
- [[Sources][Sources]]
|
|
|
|
|
|
|
|
* Description
|
2015-11-12 18:12:48 +00:00
|
|
|
This layer changes the key bindings in spacemacs to be compatible with the [[http://bepo.fr/][bepo]]
|
2015-09-24 22:42:42 +00:00
|
|
|
keyboard layout. =bepo= is a keyboard layout optimized for the French language.
|
|
|
|
This package first switch traditional ~hjkl~ movement keys with ~ctsr~, and then
|
2015-11-12 18:12:48 +00:00
|
|
|
try to correct the bugs introduced by these changes in other modes/packages.
|
2015-09-24 22:42:42 +00:00
|
|
|
|
|
|
|
[[file:img/keymap.png]]
|
|
|
|
|
2015-10-19 22:41:53 +00:00
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
add =bepo= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
file.
|
2015-10-19 22:41:53 +00:00
|
|
|
|
2016-01-04 07:00:18 +00:00
|
|
|
It is possible to customize the layer via some variables.
|
2015-10-19 22:41:53 +00:00
|
|
|
|
|
|
|
** Variables
|
|
|
|
This layer can be customized with two variables:
|
|
|
|
- bepo-set-enabled-configurations
|
|
|
|
- bepo-set-disabled-configurations
|
|
|
|
|
|
|
|
The first one is used to set the list of configurations to activate, and the
|
|
|
|
second one to prevent loading certain configurations. If the
|
|
|
|
=bepo-set-enabled-configurations= is nil, all configurations are loaded.
|
|
|
|
Otherwise, only the listed configurations are loaded. Any configuration listed
|
|
|
|
in =bepo-set-disabled-configurations= will never be loaded, whether it is in the
|
|
|
|
enabled list or not.
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '(
|
|
|
|
(bepo :variables bepo-set-disabled-configurations '(org magit))))
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** Customization
|
2016-01-09 20:43:06 +00:00
|
|
|
It is possible to override or add bindings by defining in your own layer (or in
|
|
|
|
the =user-init=) some functions named =bepo/pre-config-<NAME>= and
|
2015-10-19 22:41:53 +00:00
|
|
|
=bepo/post-config-<NAME>=. They are respectively called just before and after
|
|
|
|
the actual configuration of keybindings. =<NAME>= is the name of the
|
|
|
|
configuration you want to customize, they are listed under [[Configurations]].
|
|
|
|
|
2016-01-09 20:43:06 +00:00
|
|
|
Note: If you define some of these functions in your own layer, be sure that the
|
|
|
|
=bepo= layer is placed after it in the =dotspacemacs-configuration-layers= list.
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
* Mapping
|
2016-01-09 20:43:06 +00:00
|
|
|
The mapping correction is the one proposed for vim on the official bepo [[http://bepo.fr/wiki/Vim#Principe][wiki]].
|
2015-10-19 22:41:53 +00:00
|
|
|
This layer tries to do the following changes when the following letters are used
|
|
|
|
for *doing a movement*:
|
2015-09-24 22:42:42 +00:00
|
|
|
|
|
|
|
- Map the movements keys under the right hand's fingers:
|
|
|
|
- ~c → h~
|
|
|
|
- ~t → j~
|
|
|
|
- ~s → k~
|
|
|
|
- ~r → l~
|
|
|
|
|
2015-11-12 18:12:48 +00:00
|
|
|
- Map lost functionalities back to some keys:
|
2015-09-24 22:42:42 +00:00
|
|
|
- ~h → r~
|
|
|
|
- ~j → t~
|
|
|
|
- ~k → s~
|
|
|
|
- ~l → c~
|
|
|
|
|
2015-10-19 22:41:53 +00:00
|
|
|
The equivalent remapping is also valid for uppercase letters, or ~CTRL+KEY~ when
|
|
|
|
they are used to represent a movement, or to keep the mnemonic between the
|
2015-09-24 22:42:42 +00:00
|
|
|
lower/upper-case consistent.
|
|
|
|
|
|
|
|
Some bepo keys are not used in traditional mapping, mainly because they are not
|
2016-01-09 20:43:06 +00:00
|
|
|
on the =en-us= keyboard layout. They are used as aliases for other shortcuts:
|
2015-09-24 22:42:42 +00:00
|
|
|
|
2015-11-12 18:12:48 +00:00
|
|
|
- Map unused ~é~ key as an alias of ~w~, more useful in vim mode:
|
2015-09-24 22:42:42 +00:00
|
|
|
- ~é → w~
|
|
|
|
- ~É → W~
|
|
|
|
|
|
|
|
- Map indentation on direct-access keys:
|
|
|
|
- ~» → >~
|
|
|
|
- ~« → <~
|
|
|
|
|
|
|
|
Some default configurations are also not optimal for vim, so the following
|
|
|
|
defaults are changed:
|
|
|
|
|
|
|
|
- Change =evil-escape= escape combination to something faster to type, while
|
2015-10-19 22:41:53 +00:00
|
|
|
being nearly nonexistent in French or English words:
|
2015-09-24 22:42:42 +00:00
|
|
|
- ~fd → gq~
|
|
|
|
|
|
|
|
- In =avy=, the key used to select words/lines are remapped to the 8 characters
|
|
|
|
under the fingers:
|
|
|
|
- ~a u i e t s r n~
|
|
|
|
|
|
|
|
- Add ~«~ and ~»~ as operators for =evil-surround=, surrounding text with the
|
|
|
|
specified symbols.
|
|
|
|
|
2015-10-19 22:41:53 +00:00
|
|
|
In some cases the key remapping will not follow these conventions, mainly
|
|
|
|
because there are better alternatives, or because some moves don't make sense.
|
2015-09-24 22:42:42 +00:00
|
|
|
|
|
|
|
#+begin_verse
|
2015-10-19 22:41:53 +00:00
|
|
|
Example: In the =magit= status buffer, the ~c~ is used for =commit= by default,
|
|
|
|
but if we want to follow the conventions, it should be remapped to "move left".
|
2016-01-09 20:43:06 +00:00
|
|
|
As it is not useful to move left on =magit= because operations are done line by
|
|
|
|
line the ~c~ is not remapped.
|
2015-09-24 22:42:42 +00:00
|
|
|
#+end_verse
|
|
|
|
|
|
|
|
Note: One difference exists with the wiki version: the ~w~ is *not* remapped to
|
|
|
|
~C-w~ to avoid having to change its meaning in other modes. Spacemacs provides
|
|
|
|
already a ~SPC w~ key binding for working with windows.
|
|
|
|
|
2015-10-19 22:41:53 +00:00
|
|
|
* Configurations
|
|
|
|
The available configurations are:
|
|
|
|
|
|
|
|
- ace-window
|
2015-09-24 22:42:42 +00:00
|
|
|
- avy
|
2015-10-19 22:41:53 +00:00
|
|
|
- buffer-move
|
2016-01-09 20:43:06 +00:00
|
|
|
- comint-mode
|
2015-09-24 22:42:42 +00:00
|
|
|
- company
|
2016-01-09 20:43:06 +00:00
|
|
|
- elfeed
|
2015-09-24 22:42:42 +00:00
|
|
|
- evil
|
|
|
|
- evil-escape
|
|
|
|
- evil-surround
|
2015-10-19 22:41:53 +00:00
|
|
|
- evil-evilified-state
|
2015-09-24 22:42:42 +00:00
|
|
|
- evil-window
|
2015-10-19 22:41:53 +00:00
|
|
|
- eyebrowse
|
|
|
|
- flycheck-error-list
|
2015-09-24 22:42:42 +00:00
|
|
|
- helm
|
2015-10-19 22:41:53 +00:00
|
|
|
- helm-buffers
|
|
|
|
- helm-files
|
|
|
|
- helm-locate
|
2016-01-09 20:43:06 +00:00
|
|
|
- ivy
|
2015-09-24 22:42:42 +00:00
|
|
|
- magit
|
|
|
|
- neotree
|
|
|
|
- org
|
|
|
|
- ranger
|
|
|
|
- spacemacs
|
|
|
|
|
2015-10-19 22:41:53 +00:00
|
|
|
* Keybindings
|
|
|
|
This layer is using functions that /automatically/ remap keybindings in a lot of
|
|
|
|
modes, so it's difficult to list all the keybindings changes.
|
2015-09-24 22:42:42 +00:00
|
|
|
|
2015-10-19 22:41:53 +00:00
|
|
|
- You chose to use a different keyboard layout.
|
|
|
|
- You chose to use the dark side by using evil (because they have :cookie: obviously).
|
|
|
|
- You chose to use a layer trying to solve the induced mess.
|
|
|
|
- The price you have to pay is the absence of a keybindings list.
|
2015-09-24 22:42:42 +00:00
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
* Contributors
|
2015-09-24 22:42:42 +00:00
|
|
|
- Fabien Dubosson
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
* Sources
|
2015-09-24 22:42:42 +00:00
|
|
|
The bepo logo and the keymap image come from the [[http://bepo.fr/][bepo]] official website. They are
|
|
|
|
licensed under the [[http://creativecommons.org/licenses/by-sa/3.0/deed.en][CC-BY-SA]].
|