Skip to content

Commit

Permalink
fixed bbatsov#166 - switched to guru-mode to enforce good Emacs navig…
Browse files Browse the repository at this point in the history
…ation habits
  • Loading branch information
bbatsov committed Jun 14, 2012
1 parent 610f50b commit 59f26f6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
11 changes: 0 additions & 11 deletions prelude/prelude-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,6 @@ 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 [up] 'previous-line)
(global-set-key [down] 'next-line)
(global-set-key [left] 'backward-char)
(global-set-key [right] 'forward-char)
(global-set-key [M-right] 'right-word)
(global-set-key [M-left] 'left-word)
(message "Arrow keys navigation in buffers in now allowed."))

(require 'repeat)

(defun make-repeatable-command (cmd)
Expand Down
4 changes: 4 additions & 0 deletions prelude/prelude-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@
(add-to-list 'yas/snippet-dirs prelude-snippets-dir)
(yas/global-mode 1)

;; became an Emacs guru in the keystroke department
(require 'guru-mode)
(guru-mode +1)

;; projectile is a project management mode
(require 'projectile)
(projectile-global-mode t)
Expand Down
10 changes: 0 additions & 10 deletions prelude/prelude-global-keybindings.el
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@
;; toggle menu-bar visibility
(global-set-key (kbd "<f12>") 'menu-bar-mode)

;; real Emacs hackers don't use the arrow keys
(global-unset-key [up])
(global-unset-key [down])
(global-unset-key [left])
(global-unset-key [right])

;; use M-f and M-b instead
(global-unset-key [M-left])
(global-unset-key [M-right])

(global-set-key (kbd "C-x g") 'magit-status)

(global-set-key (kbd "C-=") 'er/expand-region)
Expand Down
2 changes: 1 addition & 1 deletion prelude/prelude-packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
(setq url-http-attempt-keepalives nil)

(defvar prelude-packages
'(ack-and-a-half expand-region gist helm helm-projectile magit magithub melpa
'(ack-and-a-half expand-region gist guru-mode helm helm-projectile magit magithub melpa
rainbow-mode volatile-highlights yasnippet zenburn-theme)
"A list of packages to ensure are installed at launch.")

Expand Down

0 comments on commit 59f26f6

Please sign in to comment.