On Fri, Mar 23, 2018 at 2:03 PM, Robert Bower <frrobert2@gmail.com> wrote:
Before, I create my own map, I was wondering has anyone found a remapping for one handed typing?
When I broke my right hand and it was immobilized, I made a bunch of mappings to allow me to continue to be fairly productive.
First, I mapped F1 to F4 to hjkl respectively. This allowed me to somewhat emulate the normal Vim movement keys, and since I had no muscle memory built up, I needed to visually verify my finger position often. I found it convenient that the keys I mapped were laid out in relation to the keys I was mapping so I could check my finger position literally at a glance. A little dab of epoxy resin on F1 and F4 also helped me identify them by touch (simulating the dots on F and J on most keyboards).
I also mapped the Leader to be the ` (backtick) character, as the default leader of \ (backslash) was rather inconvenient. I think there was something buggy about this, but I never figured out what, and I don't use the map leader functionality very often.
I then mapped the : (colon) to be `` (double backticks), so that I could just mash that key twice in order to access command mode. This, of course, I used A LOT.
I also mapped CapsLock to be the Enter key, so that I could access that easily as well. I ended up turning that off sometimes though, because I found that certain all-capital letter sequences were super tedious to type one-handed without Caps Lock. YMMV. I did this with AutoHotKey on Windows, not with native Vim functionality. xmodmap on Linux should do something similar.
But, the absolute best thing I did was to get a dictionary file of weighted words (i.e., sorted by frequency of use in the English language) and set my dictionary file to use that. Then I used the ACP (autocompletepop) plugin so that I could tab-complete most English words. When I type two-handed, and my output is English words (not computer code) it's generally faster to type a word than it is to try to have ACP complete it for me, but when typing one handed I found it much, much faster to have ACP suggest words for me. I found a ~200k word file online without too much trouble, sadly I don't remember where anymore. I believe it was some university somewhere. It was freely available, but I don't want to publish my personal copy of it because it isn't my own work, and I didn't think to save the link or the author information.
The upshot of all those mappings is, your fingers generally hover near the top-left of the keyboard, largely mitigating the need to keep them near fghj. Tab-completing words ends up being quick enough to offset -in terms of typed words per minute - the distance you have to move your hand to type "p" or "?" or whatnot.
My actual .vimrc entries:
" LEFT-HANDED """"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" let double backticks act like the colon
nnoremap `` :
" change the Leader key to be ` for left-handed typing
let mapleader="`"
"map the movement keys to F1 to F4, and follow virtual lines
nnoremap <F1> h
nnoremap <F2> gj
nnoremap <F3> gk
nnoremap <F4> l
vnoremap <F1> h
vnoremap <F2> gj
vnoremap <F3> gk
vnoremap <F4> l
" turn on the ACP plugin on startup
let g:acp_enableAtStartup = 1
set dictionary=~/.vim/dict/weighted_words
" LEFT-HANDED """"""""""""""""""""""""""""""""""""""""""""""""""""""""""
Hope that helps,
Dan
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment