diff --git a/README.md b/README.md index dc873a7..0be0cfc 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,11 @@ far as navigation is concerned at least). That's why I've disabled all movement commands with arrows - to prevent you from being tempted to use them. +If you'd still like to use the arrow keys just invoke `M-x +prelude-restore-arrow-keys` to enable them for the duration of your +current Emacs session or add `(prelude-restore-arrow-keys)` to your +personal Emacs customization to enable them permanently. + ### Windows compatibility While everything in Prelude should work fine in Windows I test it only diff --git a/modules/prelude-core.el b/modules/prelude-core.el index 05dda38..8e498e3 100644 --- a/modules/prelude-core.el +++ b/modules/prelude-core.el @@ -358,5 +358,14 @@ there's a region, all lines that region covers will be duplicated." (unless (or (eql buffer (current-buffer)) (not (buffer-file-name buffer))) (kill-buffer buffer)))) +(defun prelude-restore-arrow-keys () + "Restores arrow keys navigation in buffers." + (interactive) + (global-set-key (kbd "") 'previous-line) + (global-set-key (kbd "") 'next-line) + (global-set-key (kbd "") 'backward-char) + (global-set-key (kbd "") 'forward-char) + (message "Arrow keys navigation in buffers in now allowed.")) + (provide 'prelude-core) ;;; prelude-core.el ends here