Mercurial > dotfiles
annotate .elisp/settings/90.keybindings.el @ 175:4741c022c7ae
python-mode: apply patch from the python-mode list to fix triplequotes.
This patch is originally by Andreas Roehler <andreas.roehler at online.de>.
It was not applied because it works only in GNU Emacs based on list archives.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Wed, 16 Dec 2009 22:59:38 -0600 |
parents | efe94205bf07 |
children | 70dcdb2acade |
rev | line source |
---|---|
77 | 1 ;; Key Bindings |
2 ; M-backspace kills the current buffer | |
3 (global-set-key [(meta backspace)] 'kill-this-buffer) | |
4 ; Save early and often, with only one keystroke | |
5 (global-set-key [(meta s)] 'save-buffer) | |
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 | 8 ; M-l makes more sense to me for jumping to a line |
9 (global-set-key "\M-l" 'goto-line) | |
10 ; Sometimes C-h is what Backspace sends in a terminal, and I never use C-h | |
11 (global-set-key "\C-h" 'backward-delete-char-untabify) | |
12 ; M-t is what I want for the textmate file finding | |
13 (global-set-key [(meta t)] 'textmate-goto-file) | |
126 | 14 ; M-p for bouncing to the matching paren |
15 (global-set-key [(meta p)] 'bounce-to-other-paren) | |
101 | 16 (global-set-key [(meta control f)] 'textmate-find-in-project-type) |
126 | 17 (global-set-key [(meta shift f)] 'textmate-find-in-project) |
77 | 18 (global-set-key [(meta m)] 'iconify-or-deiconify-frame) |
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 |
168
efe94205bf07
emacs: bind f3 to next-error
Augie Fackler <durin42@gmail.com>
parents:
141
diff
changeset
|
21 (global-set-key [f3] 'next-error) |
efe94205bf07
emacs: bind f3 to next-error
Augie Fackler <durin42@gmail.com>
parents:
141
diff
changeset
|
22 |
101 | 23 ;; M-j for jump to function definition |
141
e30655eb7050
textmate.el: synced with upstream
Augie Fackler <durin42@gmail.com>
parents:
128
diff
changeset
|
24 (global-set-key [(meta j)] 'textmate-goto-symbol) |
101 | 25 |
26 ;; commit emacs heresy? | |
27 (global-set-key [(meta r)] 'execute-extended-command) | |
28 | |
29 ;; Mac-like keybindings for undo/cut/copy/paste | |
30 (global-set-key [(meta c)] 'kill-ring-save) | |
31 (global-set-key [(meta x)] 'kill-region) | |
32 (global-set-key [(meta z)] 'undo) | |
33 (global-set-key [(meta v)] 'yank) | |
34 (global-set-key [M-return] 'fullscreen) | |
35 (global-set-key [(control v)] 'yank-pop) | |
36 | |
37 ;; Fixup hooks for modes that like taking my keys back | |
38 (add-hook 'text-mode-hook '(lambda () | |
39 (define-key text-mode-map "\M-s" | |
40 'save-buffer))) | |
41 (add-hook 'comint-mode-hook '(lambda () | |
42 (local-set-key "\M-r" | |
43 'execute-extended-command))) | |
44 | |
95
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
45 (defun server-save-buffer-and-finish () |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
46 (interactive) |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
47 (save-buffer) (server-edit)) |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
48 (add-hook 'server-switch-hook |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
49 '(lambda ()(local-set-key "\M-s" 'server-save-buffer-and-finish ))) |