]> git.draconx.ca Git - vimconf.git/blob - plugin/keymap.vim
f53735fb270dd9e9561627e60706438c496fdda8
[vimconf.git] / plugin / keymap.vim
1 " Copyright © 2012 Nick Bowler
2 "
3 " Set langmap based on the KEYMAP environment variable.  This allows key
4 " bindings to work properly regardless of the keyboard layout.
5 "
6 " License WTFPL2: Do What The Fuck You Want To Public License, version 2.
7 " This is free software: you are free to do what the fuck you want to.
8 " There is NO WARRANTY, to the extent permitted by law.
9
10 if $KEYMAP == "colemak"
11         set langmap=sd,fe,tf,dg,ui,nj,ek,il,kn,yo,\\;p,pr,rs,gt,lu,jy,SD,FE,TF,DG,UI,NJ,EK,IL,KN,YO,:P,PR,RS,GT,LU,JY,o\\;,O:
12 endif
13
14 " Disable Gentoo's default cursor position handling, because it is broken wrt.
15 " langmap.
16 let g:leave_my_cursor_position_alone=1
17
18 " Jump to last cursor position when editing a file.
19 autocmd BufReadPost *
20         \ if line("'\"") > 0 && line("'\"") <= line("$") |
21         \       execute "goto" line2byte(line("'\"")) |
22         \ endif