anchor.diff:                                       completion (subseq input cursor))
               (cursor repl) (+ cursor (- (length completion) (- cursor previous-delimiter)))))))
   
  +(define-command evaluation-history-previous (&optional (repl (current-mode 'repl)))
  +  "Fill REPL input with the value of the previous REPL history element."
  +  (setf (input repl)
  +        (second (elt (evaluation-history repl)
  +                     (if (current-evaluation-history-element repl)
  +                         (incf (current-evaluation-history-element repl))
  +                         (setf (current-evaluation-history-element repl) 0))))))
  +
  +(define-command evaluation-history-previous (&optional (repl (current-mode 'repl)))
  +  "Fill REPL input with the value of the previous REPL history element."
  +  (let* ((current (1+ (or (current-evaluation-history-element repl) -1)))
  +         (elt (when (> (length (evaluation-history repl)) current)
  +                (elt (evaluation-history repl) current))))
  +    (if elt
  +        (setf (input repl) (second elt)
  +              (current-evaluation-history-element repl) current)
  +        (echo-warning "No more elements in evaluation history"))))
  +
  +(define-command evaluation-history-next (&optional (repl (current-mode 'repl)))
  +  "Fill REPL input with the value of the next REPL history element."
  +  (if (and (current-evaluation-history-element repl)
  +           (not (zerop (current-evaluation-history-element repl))))
  +      (setf (input repl) (elt (evaluation-history repl) (decf (current-evaluation-history-element repl))))
  +      (echo-warning "No more elements in evaluation history")))
  +
   (define-internal-page-command-global lisp-repl ()
       (repl-buffer "*Lisp REPL*" 'repl-mode)
     "Show Lisp REPL."
  
positive.code:        "M-b" 'nyxt/input-edit-mode:cursor-backwards-word
         "C-d" 'nyxt/input-edit-mode:delete-forwards
         "M-backspace" 'nyxt/input-edit-mode:delete-backwards-word
         "M-d" 'nyxt/input-edit-mode:delete-forwards-word)
        scheme:vi-normal
        (list
         ;; TODO: deleting chars/words
         "l" 'nyxt/input-edit-mode:cursor-forwards
         "h" 'nyxt/input-edit-mode:cursor-backwards
         "w" 'nyxt/input-edit-mode:cursor-forwards-word
  
negative.code:        "return" 'return-input
         "(" 'paren
         ")" 'closing-paren
         "tab" 'tab-complete-symbol
         "up" 'evaluation-history-previous
         "down" 'evaluation-history-next)
        scheme:emacs
        (list
         "C-f" 'nyxt/input-edit-mode:cursor-forwards
  