changeset 101:0c1db2df2bf8

Experimental keybindings.
author Augie Fackler <durin42@gmail.com>
date Thu, 30 Apr 2009 13:51:06 -0500
parents 26450200777a
children 16472f9a3543
files .elisp/settings/40.modes.el .elisp/settings/90.keybindings.el
diffstat 2 files changed, 23 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/.elisp/settings/40.modes.el
+++ b/.elisp/settings/40.modes.el
@@ -50,10 +50,3 @@ point."
 (add-hook 'python-mode-hook 'af-python-mode-hook)
 
 (add-hook 'compilation-mode-hook '(lambda () (local-set-key "g" 'recompile)))
-
-
-; text-mode tries to use M-s for something other than my save shortcut.
-; That's evil. Stop it from doing that.
-(add-hook 'text-mode-hook '(lambda ()
-                             (define-key text-mode-map "\M-s"
-                               'save-buffer)))
--- a/.elisp/settings/90.keybindings.el
+++ b/.elisp/settings/90.keybindings.el
@@ -11,10 +11,32 @@
 (global-set-key "\C-h" 'backward-delete-char-untabify)
 ; M-t is what I want for the textmate file finding
 (global-set-key [(meta t)] 'textmate-goto-file)
-(global-set-key [(meta z)] 'textmate-find-in-project-type)
+(global-set-key [(meta control f)] 'textmate-find-in-project-type)
 (global-set-key [(meta m)] 'iconify-or-deiconify-frame)
 (global-set-key [(control backspace)] 'kill-word)
 
+;; M-j for jump to function definition
+(global-set-key [(meta j)] 'ido-imenu)
+
+;; commit emacs heresy?
+(global-set-key [(meta r)] 'execute-extended-command)
+
+;; Mac-like keybindings for undo/cut/copy/paste
+(global-set-key [(meta c)] 'kill-ring-save)
+(global-set-key [(meta x)] 'kill-region)
+(global-set-key [(meta z)] 'undo)
+(global-set-key [(meta v)] 'yank)
+(global-set-key [M-return] 'fullscreen)
+(global-set-key [(control v)] 'yank-pop)
+
+;; Fixup hooks for modes that like taking my keys back
+(add-hook 'text-mode-hook '(lambda ()
+                             (define-key text-mode-map "\M-s"
+                               'save-buffer)))
+(add-hook 'comint-mode-hook '(lambda ()
+                               (local-set-key "\M-r"
+                                              'execute-extended-command)))
+
 (defun server-save-buffer-and-finish ()
   (interactive)
   (save-buffer) (server-edit))