summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorRomain Porte <microjoe@microjoe.org>2020-05-06 11:34:08 +0200
committerRomain Porte <microjoe@microjoe.org>2020-05-06 11:39:28 +0200
commit9d6dd348203b51de7fd61bf9a8d2e0c7a4d3e43e (patch)
tree9371b836a91bd2be619aaf629f5f1ff29345a04a /plugin
downloadbepo.vim-9d6dd348203b51de7fd61bf9a8d2e0c7a4d3e43e.tar.gz
bepo.vim-9d6dd348203b51de7fd61bf9a8d2e0c7a4d3e43e.zip
initial commit
Diffstat (limited to 'plugin')
-rw-r--r--plugin/bepo.vim100
1 files changed, 100 insertions, 0 deletions
diff --git a/plugin/bepo.vim b/plugin/bepo.vim
new file mode 100644
index 0000000..17865be
--- /dev/null
+++ b/plugin/bepo.vim
@@ -0,0 +1,100 @@
+" bepo.vim - plugin vim pour disposition de clavier bépo
+"
+" vim: foldmethod=marker
+
+if exists('g:loaded_bepo') || &compatible
+ finish
+else
+ let g:loaded_bepo = 1
+endif
+
+" Échange É et W{{{1
+" ------------------
+
+" On remappe W sur É :
+noremap é w
+noremap É W
+" Corollaire: on remplace les text objects aw, aW, iw et iW
+" pour effacer/remplacer un mot quand on n’est pas au début (daé / laé).
+onoremap aé aw
+onoremap aÉ aW
+onoremap ié iw
+onoremap iÉ iW
+
+" Pour faciliter les manipulations de fenêtres, on utilise {W} comme un Ctrl+W :
+noremap w <C-w>
+noremap W <C-w><C-w>
+
+" Échange [HJKL] -> {CTSR}{{{1
+" ----------------------------
+
+" {cr} = « gauche / droite »
+noremap c h
+noremap r l
+" {ts} = « haut / bas »
+noremap t j
+noremap s k
+" {CR} = « haut / bas de l'écran »
+noremap C H
+noremap R L
+" {TS} = « joindre / aide »
+noremap T J
+noremap S K
+" Corollaire : repli suivant / précédent
+noremap zt zj
+noremap zs zk
+
+" Échange {HJKL} <- [CTSR]{{{1
+" ----------------------------
+
+" {J} = « Jusqu'à » (j = suivant, J = précédant)
+noremap j t
+noremap J T
+" {L} = « Change » (l = attend un mvt, L = jusqu'à la fin de ligne)
+noremap l c
+noremap L C
+" {H} = « Remplace » (h = un caractère slt, H = reste en « Remplace »)
+noremap h r
+noremap H R
+" {K} = « Substitue » (k = caractère, K = ligne)
+noremap k s
+noremap K S
+" Corollaire : correction orthographique
+noremap ]k ]s
+noremap [k [s
+
+" Désambiguïsation de {g}{{{1
+" ---------------------------
+
+" ligne écran précédente / suivante (à l'intérieur d'une phrase)
+noremap gs gk
+noremap gt gj
+" onglet précédant / suivant
+noremap gb gT
+noremap gé gt
+" optionnel : {gB} / {gÉ} pour aller au premier / dernier onglet
+noremap gB :exe "silent! tabfirst"<CR>
+noremap gÉ :exe "silent! tablast"<CR>
+" optionnel : {g"} pour aller au début de la ligne écran
+noremap g" g0
+
+" Chevrons <> en direct{{{1
+" -------------------------
+noremap « <
+noremap » >
+
+" Réaffecter la gestion des fenêtres{{{1
+" --------------------------------------
+
+" Directions
+noremap wt <C-w>j
+noremap ws <C-w>k
+noremap wc <C-w>h
+noremap wr <C-w>l
+
+" Raccourcis pratiques sur ^W
+noremap wd <C-w>c
+noremap wo <C-w>s
+noremap wp <C-w>o
+noremap w<SPACE> :split<CR>
+noremap w<CR> :vsplit<CR>