About: VimLock mode to enter numbers   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

The following script allows you to switch Vim to a special "VimLock" mode (like pressing the Num Lock key). In this mode, pressing keys on the home row (a, s, d, ...) will generate digits (1, 2, 3, ...) rather than letters. Press Escape to exit from VimLock mode. Put the following in your vimrc: Now you can press Ctrl-i to enter insert mode and map the keys "a s d f g h j k l ;" to the digits "1 2 3 4 5 6 7 8 9 0". Pressing Esc will end this mode and restore the letter keys. Since Ctrl-i is Tab, you can just press the Tab key to enter VimLock mode.

AttributesValues
rdfs:label
  • VimLock mode to enter numbers
rdfs:comment
  • The following script allows you to switch Vim to a special "VimLock" mode (like pressing the Num Lock key). In this mode, pressing keys on the home row (a, s, d, ...) will generate digits (1, 2, 3, ...) rather than letters. Press Escape to exit from VimLock mode. Put the following in your vimrc: Now you can press Ctrl-i to enter insert mode and map the keys "a s d f g h j k l ;" to the digits "1 2 3 4 5 6 7 8 9 0". Pressing Esc will end this mode and restore the letter keys. Since Ctrl-i is Tab, you can just press the Tab key to enter VimLock mode.
Version
  • 7(xsd:integer)
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1563(xsd:integer)
Author
  • Benshi
Subpage
  • /200805
Complexity
  • basic
Created
  • 2008(xsd:integer)
ID
  • 1564(xsd:integer)
NEXT
  • 1565(xsd:integer)
abstract
  • The following script allows you to switch Vim to a special "VimLock" mode (like pressing the Num Lock key). In this mode, pressing keys on the home row (a, s, d, ...) will generate digits (1, 2, 3, ...) rather than letters. Press Escape to exit from VimLock mode. Put the following in your vimrc: nnoremap :call VimLock(1)i function! VimLock(enable) if a:enable inoremap a 1 inoremap s 2 inoremap d 3 inoremap f 4 inoremap g 5 inoremap h 6 inoremap j 7 inoremap k 8 inoremap l 9 inoremap ; 0 inoremap :call VimLock(0) else iunmap a iunmap s iunmap d iunmap f iunmap g iunmap h iunmap j iunmap k iunmap l iunmap ; iunmap endif endfunction Now you can press Ctrl-i to enter insert mode and map the keys "a s d f g h j k l ;" to the digits "1 2 3 4 5 6 7 8 9 0". Pressing Esc will end this mode and restore the letter keys. Since Ctrl-i is Tab, you can just press the Tab key to enter VimLock mode. The mappings assume a QWERTY US keyboard where the ; key is on the right of L. If necessary, change ; to suit your keyboard.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software