Permalink
Browse files

add bépo keyboard layout

* changes to src/juggler.vim and src/lusty/juggler.rb like
dvorjak/colemak
* make to build plugin/lusty-juggler.vim
  • Loading branch information...
1 parent 501c3d0 commit 2dbda29d261f470f88b72892f3576663edfee013 @tshirtman tshirtman committed May 12, 2012
Showing with 84 additions and 6 deletions.
  1. +42 −3 plugin/lusty-juggler.vim
  2. +16 −3 src/juggler.vim
  3. +26 −0 src/lusty/juggler.rb
@@ -13,7 +13,8 @@
" Contributors: Juan Frias, Bartosz Leper, Marco Barberis, Vincent Driessen,
" Martin Wache, Johannes Holzfuß, Adam Rutkowski, Carlo Teubner,
" lilydjwg, Leonid Shevtsov, Giuseppe Rota, Göran Gustafsson,
-" Chris Lasher, Guy Haskin Fernald, Thibault Duplessis
+" Chris Lasher, Guy Haskin Fernald, Thibault Duplessis, Gabriel
+" Pettier
"
" Release Date: February 29, 2012
" Version: 1.5.1
@@ -59,11 +60,13 @@
" To cancel the juggler, press any of "q", "<ESC>", "<C-c",
" "<BS>", "<Del>", or "<C-h>".
"
-" LustyJuggler also supports the Dvorak and Colemak keyboard layouts. To
-" enable this feature, place the one of the following in your .vimrc:
+" LustyJuggler also supports the Dvorak, Colemak and Bépo
+" keyboard layouts. To enable this feature, place the one of the
+" following in your .vimrc:
"
" let g:LustyJugglerKeyboardLayout = "dvorak"
" let g:LustyJugglerKeyboardLayout = "colemak"
+" let g:LustyJugglerKeyboardLayout = "bépo"
"
" With the layout set to "dvorak", the buffer mapping is as
" follows:
@@ -81,6 +84,14 @@
" a r s t d h n e i o
" 1 2 3 4 5 6 7 8 9 0
"
+" With the layout set to "bépo", the buffer mapping is as
+" follows:
+"
+" 1st|2nd|3rd|4th|5th|6th|7th|8th|9th|10th
+" ----------------------------------------
+" a u i e , t s r n m
+" 1 2 3 4 5 6 7 8 9 0
+"
" LustyJuggler can act very much like <A-Tab> window switching.
" To enable this mode, add the following line to your .vimrc:
"
@@ -823,6 +834,32 @@ class LustyJugglerColemak < LustyJuggler
@CANCEL_MAPPINGS.push("c")
end
end
+
+class LustyJugglerBepo < LustyJuggler
+ public
+ def initialize
+ super
+ alpha_buffer_keys = [
+ "a",
+ "u",
+ "i",
+ "e",
+ ",",
+ "t",
+ "s",
+ "r",
+ "n",
+ "m",
+ ]
+ @name_bar = NameBar.new(alpha_buffer_keys)
+ @ALPHA_BUFFER_KEYS = Hash.new
+ alpha_buffer_keys.each_with_index {|x, i| @ALPHA_BUFFER_KEYS[x] = i + 1}
+ @BUFFER_KEYS = @ALPHA_BUFFER_KEYS.merge(@NUMERIC_BUFFER_KEYS)
+ @KEYPRESS_MAPPINGS = @BUFFER_KEYS.merge(@KEYPRESS_KEYS)
+ @CANCEL_MAPPINGS.delete("i")
+ @CANCEL_MAPPINGS.push("c")
+ end
+end
end
# An item (delimiter/separator or buffer name) on the NameBar.
@@ -1235,6 +1272,8 @@ if VIM::exists?('g:LustyJugglerKeyboardLayout') and VIM::evaluate_bool('g:LustyJ
$lusty_juggler = LustyJ::LustyJugglerDvorak.new
elsif VIM::exists?('g:LustyJugglerKeyboardLayout') and VIM::evaluate_bool('g:LustyJugglerKeyboardLayout == "colemak"')
$lusty_juggler = LustyJ::LustyJugglerColemak.new
+elsif VIM::exists?('g:LustyJugglerKeyboardLayout') and VIM::evaluate_bool('g:LustyJugglerKeyboardLayout == "bépo"')
+ $lusty_juggler = LustyJ::LustyJugglerBepo.new
else
$lusty_juggler = LustyJ::LustyJuggler.new
end
View
@@ -13,7 +13,8 @@
" Contributors: Juan Frias, Bartosz Leper, Marco Barberis, Vincent Driessen,
" Martin Wache, Johannes Holzfuß, Adam Rutkowski, Carlo Teubner,
" lilydjwg, Leonid Shevtsov, Giuseppe Rota, Göran Gustafsson,
-" Chris Lasher, Guy Haskin Fernald, Thibault Duplessis
+" Chris Lasher, Guy Haskin Fernald, Thibault Duplessis, Gabriel
+" Pettier
"
" Release Date: February 29, 2012
" Version: 1.5.1
@@ -59,11 +60,13 @@
" To cancel the juggler, press any of "q", "<ESC>", "<C-c",
" "<BS>", "<Del>", or "<C-h>".
"
-" LustyJuggler also supports the Dvorak and Colemak keyboard layouts. To
-" enable this feature, place the one of the following in your .vimrc:
+" LustyJuggler also supports the Dvorak, Colemak and Bépo
+" keyboard layouts. To enable this feature, place the one of the
+" following in your .vimrc:
"
" let g:LustyJugglerKeyboardLayout = "dvorak"
" let g:LustyJugglerKeyboardLayout = "colemak"
+" let g:LustyJugglerKeyboardLayout = "bépo"
"
" With the layout set to "dvorak", the buffer mapping is as
" follows:
@@ -81,6 +84,14 @@
" a r s t d h n e i o
" 1 2 3 4 5 6 7 8 9 0
"
+" With the layout set to "bépo", the buffer mapping is as
+" follows:
+"
+" 1st|2nd|3rd|4th|5th|6th|7th|8th|9th|10th
+" ----------------------------------------
+" a u i e , t s r n m
+" 1 2 3 4 5 6 7 8 9 0
+"
" LustyJuggler can act very much like <A-Tab> window switching.
" To enable this mode, add the following line to your .vimrc:
"
@@ -294,6 +305,8 @@ if VIM::exists?('g:LustyJugglerKeyboardLayout') and VIM::evaluate_bool('g:LustyJ
$lusty_juggler = LustyJ::LustyJugglerDvorak.new
elsif VIM::exists?('g:LustyJugglerKeyboardLayout') and VIM::evaluate_bool('g:LustyJugglerKeyboardLayout == "colemak"')
$lusty_juggler = LustyJ::LustyJugglerColemak.new
+elsif VIM::exists?('g:LustyJugglerKeyboardLayout') and VIM::evaluate_bool('g:LustyJugglerKeyboardLayout == "bépo"')
+ $lusty_juggler = LustyJ::LustyJugglerBepo.new
else
$lusty_juggler = LustyJ::LustyJuggler.new
end
View
@@ -283,4 +283,30 @@ def initialize
@CANCEL_MAPPINGS.push("c")
end
end
+
+class LustyJugglerBepo < LustyJuggler
+ public
+ def initialize
+ super
+ alpha_buffer_keys = [
+ "a",
+ "u",
+ "i",
+ "e",
+ ",",
+ "t",
+ "s",
+ "r",
+ "n",
+ "m",
+ ]
+ @name_bar = NameBar.new(alpha_buffer_keys)
+ @ALPHA_BUFFER_KEYS = Hash.new
+ alpha_buffer_keys.each_with_index {|x, i| @ALPHA_BUFFER_KEYS[x] = i + 1}
+ @BUFFER_KEYS = @ALPHA_BUFFER_KEYS.merge(@NUMERIC_BUFFER_KEYS)
+ @KEYPRESS_MAPPINGS = @BUFFER_KEYS.merge(@KEYPRESS_KEYS)
+ @CANCEL_MAPPINGS.delete("i")
+ @CANCEL_MAPPINGS.push("c")
+ end
+end
end

0 comments on commit 2dbda29

Please sign in to comment.