Skip to content

Instantly share code, notes, and snippets.

@SorenPeterson
Forked from jldailey/asetniop.coffee
Last active August 29, 2015 14:21
Show Gist options
  • Save SorenPeterson/ffbe01e4bb74cd9d4598 to your computer and use it in GitHub Desktop.
Save SorenPeterson/ffbe01e4bb74cd9d4598 to your computer and use it in GitHub Desktop.
# Generates the text of asetniop.vim
singles =
a: "a"
s: "s"
e: "d"
t: "f"
n: "j"
i: "k"
o: "l"
p: ";"
pairs =
b: "fj"
c: "fs"
d: "sd"
f: "af"
g: "fl"
h: "jk"
j: "sj"
k: "k;"
l: "kl"
m: "j;"
q: "aj"
r: "df"
u: "jl"
v: "fk"
y: "dj"
z: "sk"
symbols =
".": "sl"
">": "SL"
",": "dk"
"<": "DK"
"?": "a;"
"/": "A:"
"!": "ak"
# "!": "AK" # unused
"(": "al"
# "(": "AL" # unused
")": "s;"
# ")": "S:" # unused
"-": "dl"
"_": "DL"
"'": "d;"
'"': "D:"
";": "l;"
":": "L:"
"<BS>": "f;"
"<DEL>": "F:"
rev = (s) -> s.split('').reverse().join('')
up = (s) -> s.toUpperCase()
console.log "set timeout timeoutlen=100"
for k,v of singles when k isnt v
console.log "\" #{k}"
console.log "nnoremap #{v} #{k}"
console.log "nnoremap #{up v} #{up k}"
console.log "inoremap #{v} #{k}"
console.log "inoremap #{up v} #{up k}"
for k,v of pairs
console.log "\" #{k}"
console.log "nnoremap #{v} #{k}"
console.log "nnoremap #{rev v} #{k}"
console.log "nnoremap #{up v} #{up k}"
console.log "nnoremap #{up rev v} #{up k}"
console.log "inoremap #{v} #{k}"
console.log "inoremap #{rev v} #{k}"
console.log "inoremap #{up v} #{up k}"
console.log "inoremap #{up rev v} #{up k}"
console.log "\" Symbols"
for k,v of symbols
console.log "nnoremap #{v} #{k}"
console.log "nnoremap #{rev v} #{k}"
console.log "inoremap #{v} #{k}"
console.log "inoremap #{rev v} #{k}"
set timeout timeoutlen=100
" e
nnoremap d e
nnoremap D E
inoremap d e
inoremap D E
" t
nnoremap f t
nnoremap F T
inoremap f t
inoremap F T
" n
nnoremap j n
nnoremap J N
inoremap j n
inoremap J N
" i
nnoremap k i
nnoremap K I
inoremap k i
inoremap K I
" o
nnoremap l o
nnoremap L O
inoremap l o
inoremap L O
" p
nnoremap ; p
nnoremap ; P
inoremap ; p
inoremap ; P
" b
nnoremap fj b
nnoremap jf b
nnoremap FJ B
nnoremap JF B
inoremap fj b
inoremap jf b
inoremap FJ B
inoremap JF B
" c
nnoremap fs c
nnoremap sf c
nnoremap FS C
nnoremap SF C
inoremap fs c
inoremap sf c
inoremap FS C
inoremap SF C
" d
nnoremap sd d
nnoremap ds d
nnoremap SD D
nnoremap DS D
inoremap sd d
inoremap ds d
inoremap SD D
inoremap DS D
" f
nnoremap af f
nnoremap fa f
nnoremap AF F
nnoremap FA F
inoremap af f
inoremap fa f
inoremap AF F
inoremap FA F
" g
nnoremap fl g
nnoremap lf g
nnoremap FL G
nnoremap LF G
inoremap fl g
inoremap lf g
inoremap FL G
inoremap LF G
" h
nnoremap jk h
nnoremap kj h
nnoremap JK H
nnoremap KJ H
inoremap jk h
inoremap kj h
inoremap JK H
inoremap KJ H
" j
nnoremap sj j
nnoremap js j
nnoremap SJ J
nnoremap JS J
inoremap sj j
inoremap js j
inoremap SJ J
inoremap JS J
" k
nnoremap k; k
nnoremap ;k k
nnoremap K; K
nnoremap ;K K
inoremap k; k
inoremap ;k k
inoremap K; K
inoremap ;K K
" l
nnoremap kl l
nnoremap lk l
nnoremap KL L
nnoremap LK L
inoremap kl l
inoremap lk l
inoremap KL L
inoremap LK L
" m
nnoremap j; m
nnoremap ;j m
nnoremap J; M
nnoremap ;J M
inoremap j; m
inoremap ;j m
inoremap J; M
inoremap ;J M
" q
nnoremap aj q
nnoremap ja q
nnoremap AJ Q
nnoremap JA Q
inoremap aj q
inoremap ja q
inoremap AJ Q
inoremap JA Q
" r
nnoremap df r
nnoremap fd r
nnoremap DF R
nnoremap FD R
inoremap df r
inoremap fd r
inoremap DF R
inoremap FD R
" u
nnoremap jl u
nnoremap lj u
nnoremap JL U
nnoremap LJ U
inoremap jl u
inoremap lj u
inoremap JL U
inoremap LJ U
" v
nnoremap fk v
nnoremap kf v
nnoremap FK V
nnoremap KF V
inoremap fk v
inoremap kf v
inoremap FK V
inoremap KF V
" y
nnoremap dj y
nnoremap jd y
nnoremap DJ Y
nnoremap JD Y
inoremap dj y
inoremap jd y
inoremap DJ Y
inoremap JD Y
" z
nnoremap sk z
nnoremap ks z
nnoremap SK Z
nnoremap KS Z
inoremap sk z
inoremap ks z
inoremap SK Z
inoremap KS Z
" Symbols
nnoremap sl .
nnoremap ls .
inoremap sl .
inoremap ls .
nnoremap SL >
nnoremap LS >
inoremap SL >
inoremap LS >
nnoremap dk ,
nnoremap kd ,
inoremap dk ,
inoremap kd ,
nnoremap DK <
nnoremap KD <
inoremap DK <
inoremap KD <
nnoremap a; ?
nnoremap ;a ?
inoremap a; ?
inoremap ;a ?
nnoremap A: /
nnoremap :A /
inoremap A: /
inoremap :A /
nnoremap ak !
nnoremap ka !
inoremap ak !
inoremap ka !
nnoremap al (
nnoremap la (
inoremap al (
inoremap la (
nnoremap s; )
nnoremap ;s )
inoremap s; )
inoremap ;s )
nnoremap dl -
nnoremap ld -
inoremap dl -
inoremap ld -
nnoremap DL _
nnoremap LD _
inoremap DL _
inoremap LD _
nnoremap d; '
nnoremap ;d '
inoremap d; '
inoremap ;d '
nnoremap D: "
nnoremap :D "
inoremap D: "
inoremap :D "
nnoremap l; ;
nnoremap ;l ;
inoremap l; ;
inoremap ;l ;
nnoremap L: :
nnoremap :L :
inoremap L: :
inoremap :L :
nnoremap f; <BS>
nnoremap ;f <BS>
inoremap f; <BS>
inoremap ;f <BS>
nnoremap F: <DEL>
nnoremap :F <DEL>
inoremap F: <DEL>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment