changeset 42:6b831735c092

Added french keymap support.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 22 Nov 2011 22:48:52 -0800
parents b5f45325f37a
children 25e8b2fffd50
files vim/keymap/french.vim vim/vimrc
diffstat 2 files changed, 82 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vim/keymap/french.vim	Tue Nov 22 22:48:52 2011 -0800
@@ -0,0 +1,78 @@
+" Vim keymap for French keyboards.
+"
+" This keymap is mainly for using a french keyboard in insert mode
+" while using a physical US keyboard.
+"
+" The keymap should be pretty exhaustive and natural. The only exception
+" is the *μ key (mapped to \| on a US keyboard), which is probably
+" placed above the ENTER key instead of next to it, as it is on real
+" french keyboards -- but that's a limitation of mapping 2 different
+" layouts together.
+"
+" Maintainer:   Ludovic Chabant <ludovic@chabant.com>
+" Last Changed: 2011 nov 22
+
+let b:keymap_name = "fr"
+
+loadkeymap
+Q   A
+q   a
+W   Z
+w   z
+A   Q
+a   q
+;   m
+:   M
+Z   W
+z   w
+`   ²   
+1   &
+2   é
+3   "
+4   '
+5   (
+6   -
+7   è
+8   _
+9   ç
+0   à
+-   )
+!   1
+@   2
+#   3
+$   4
+%   5
+^   6
+&   7
+*   8
+(   9
+)   0
+_   °
+m   ,
+M   ?
+,   ;
+<   .
+.   :
+>   /
+/   !
+?   §
+'   ù
+"   %
+\\   *
+|   μ
+[   <C-K>^
+{   <C-K>"
+]   $
+}   £
+<A-2>   ~
+<A-3>   #
+<A-4>   {
+<A-5>   [
+<A-6>   |
+<A-7>   `
+<A-8>   \
+<A-9>   ^
+<A-0>   @
+<A-->   ]
+<A-=>   }
+
--- a/vim/vimrc	Tue Nov 22 19:32:05 2011 -0800
+++ b/vim/vimrc	Tue Nov 22 22:48:52 2011 -0800
@@ -151,11 +151,14 @@
 let g:miniBufExplMapCTabSwitchBufs = 1
 
 " Custom mappings.
-let mapleader="\\"
+let mapleader=","
 " MiniBufExplorer mappings
 map <leader>e :MiniBufExplorer<cr>
 " Open NERDtree
 map <leader>n :NERDTreeToggle<cr>
+" Switch between FR and US keyboard layouts
+map <leader>fr :set keymap=french<cr>
+map <leader>us :set keymap=<cr>
 
 " Temporary stuff
 "let mapleader=","                                               " Use , as Leader