annotate .elisp/settings/90.keybindings.el @ 171:2f865a7f84e6

textmate: do not trust cached project root of $HOME
author Augie Fackler <durin42@gmail.com>
date Wed, 16 Dec 2009 22:18:43 -0600
parents e30655eb7050
children efe94205bf07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
77
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 ;; Key Bindings
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
2 ; M-backspace kills the current buffer
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
3 (global-set-key [(meta backspace)] 'kill-this-buffer)
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
4 ; Save early and often, with only one keystroke
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
5 (global-set-key [(meta s)] 'save-buffer)
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
6 ; Typing tab is for lesser editors, make hitting return do that
128
d59b0340a85a Man, this is what I wanted all along.
Augie Fackler <durin42@gmail.com>
parents: 126
diff changeset
7 (global-set-key "\C-m" 'indent-new-comment-line)
77
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
8 ; M-l makes more sense to me for jumping to a line
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
9 (global-set-key "\M-l" 'goto-line)
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
10 ; Sometimes C-h is what Backspace sends in a terminal, and I never use C-h
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
11 (global-set-key "\C-h" 'backward-delete-char-untabify)
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
12 ; M-t is what I want for the textmate file finding
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
13 (global-set-key [(meta t)] 'textmate-goto-file)
126
34b698771af9 emacs keybinding fixes
Augie Fackler <durin42@gmail.com>
parents: 101
diff changeset
14 ; M-p for bouncing to the matching paren
34b698771af9 emacs keybinding fixes
Augie Fackler <durin42@gmail.com>
parents: 101
diff changeset
15 (global-set-key [(meta p)] 'bounce-to-other-paren)
101
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
16 (global-set-key [(meta control f)] 'textmate-find-in-project-type)
126
34b698771af9 emacs keybinding fixes
Augie Fackler <durin42@gmail.com>
parents: 101
diff changeset
17 (global-set-key [(meta shift f)] 'textmate-find-in-project)
77
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
18 (global-set-key [(meta m)] 'iconify-or-deiconify-frame)
45d7441d0cf2 Modularize .emacs
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
19 (global-set-key [(control backspace)] 'kill-word)
95
df45e402581c Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents: 77
diff changeset
20
101
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
21 ;; M-j for jump to function definition
141
e30655eb7050 textmate.el: synced with upstream
Augie Fackler <durin42@gmail.com>
parents: 128
diff changeset
22 (global-set-key [(meta j)] 'textmate-goto-symbol)
101
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
23
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
24 ;; commit emacs heresy?
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
25 (global-set-key [(meta r)] 'execute-extended-command)
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
26
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
27 ;; Mac-like keybindings for undo/cut/copy/paste
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
28 (global-set-key [(meta c)] 'kill-ring-save)
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
29 (global-set-key [(meta x)] 'kill-region)
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
30 (global-set-key [(meta z)] 'undo)
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
31 (global-set-key [(meta v)] 'yank)
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
32 (global-set-key [M-return] 'fullscreen)
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
33 (global-set-key [(control v)] 'yank-pop)
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
34
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
35 ;; Fixup hooks for modes that like taking my keys back
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
36 (add-hook 'text-mode-hook '(lambda ()
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
37 (define-key text-mode-map "\M-s"
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
38 'save-buffer)))
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
39 (add-hook 'comint-mode-hook '(lambda ()
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
40 (local-set-key "\M-r"
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
41 'execute-extended-command)))
0c1db2df2bf8 Experimental keybindings.
Augie Fackler <durin42@gmail.com>
parents: 95
diff changeset
42
95
df45e402581c Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents: 77
diff changeset
43 (defun server-save-buffer-and-finish ()
df45e402581c Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents: 77
diff changeset
44 (interactive)
df45e402581c Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents: 77
diff changeset
45 (save-buffer) (server-edit))
df45e402581c Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents: 77
diff changeset
46 (add-hook 'server-switch-hook
df45e402581c Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents: 77
diff changeset
47 '(lambda ()(local-set-key "\M-s" 'server-save-buffer-and-finish )))