(declare-keys
  normal
  (':
   (red/clear-status)
   (red/clear-message)
   (red/set-top-mode 'command)
   )
  ('i (red/buffer/set-mode 'insert-before))
  ('a (red/buffer/set-mode 'insert-after))
  ('I
   (red/buffer/move 'line-start)
   (red/buffer/set-mode 'insert-before)
   )
  ('A
   (red/buffer/move 'line-end)
   (red/buffer/set-mode 'insert-after)
   )

  ('(g g) (red/buffer/move 'first-line))
  ('G (red/buffer/move 'last-line))
  ('h (red/buffer/move 'prev-char))
  ('l (red/buffer/move 'next-char))
  ('k (red/buffer/move 'prev-line))
  ('j (red/buffer/move 'next-line))
  ('K (red/buffer/move 'prev-page))
  ('J (red/buffer/move 'next-page))
  ('newline
   (red/buffer/move 'next-line)
   (red/buffer/move 'line-start))
  ('left (red/buffer/move 'prev-char))
  ('right (red/buffer/move 'next-char))
  ('up (red/buffer/move 'prev-line))
  ('down (red/buffer/move 'next-line))

  ('(F F F F F) nil)

  ('o
   (red/buffer/insert-line-after)
   (red/buffer/move 'next-line)
   (red/buffer/set-mode 'insert-before)
   )
  ('O
   (red/buffer/insert-line-before)
   (red/buffer/set-mode 'insert-before)
   )

  ('(d d)
   (red/buffer/kill-line)
   (red/buffer/move 'prev-line))

  ('(z z)
   (when (red/buffer/path)
     (red/buffer/write)
     )
   (red/quit)
   )
  ('(Z Z) (red/quit #T))
  )
