summaryrefslogtreecommitdiffstats
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
downloadbepo.vim-9d6dd348203b51de7fd61bf9a8d2e0c7a4d3e43e.tar.gz
bepo.vim-9d6dd348203b51de7fd61bf9a8d2e0c7a4d3e43e.zip
initial commit
-rw-r--r--LICENSE21
-rw-r--r--README.md10
-rwxr-xr-xcurl-install.sh8
-rw-r--r--plugin/bepo.vim100
-rwxr-xr-xroot-install.sh9
5 files changed, 148 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d39576c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 Romain Porte
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..2012d88
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+# bepo.vim
+
+Inspiré de [vim-bepo](https://github.com/michamos/vim-bepo) avec quelques
+modifications personnelles.
+
+# Install
+
+```
+curl https://git.microjoe.org/MicroJoe/bepo.vim/plain/curl-install.sh | sh
+```
diff --git a/curl-install.sh b/curl-install.sh
new file mode 100755
index 0000000..62b77ed
--- /dev/null
+++ b/curl-install.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+ORIGIN=https://git.microjoe.org/MicroJoe/bepo.vim
+DESTDIR=~/.vim/pack/microjoe/start/
+REPODIR="$DESTDIR/bepo.vim"
+
+mkdir -p "$DESTDIR"
+git clone "$ORIGIN" "$REPODIR"
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>
diff --git a/root-install.sh b/root-install.sh
new file mode 100755
index 0000000..c6811be
--- /dev/null
+++ b/root-install.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# Install the bepo.vim plugin for root, without actually cloning the repository
+# again but just by copying the plugin.
+
+DESTDIR=/root/.vim/pack/microjoe/start/bepo.vim/
+
+sudo mkdir -vp "$DESTDIR"
+sudo cp -vr plugin "$DESTDIR"