Mercurial > dotfiles
annotate .elisp/settings/90.keybindings.el @ 123:b2a07050b430
Allow mercurial.el to default to default or default-push as needed.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 07 Jul 2009 13:55:05 -0500 |
parents | 0c1db2df2bf8 |
children | 34b698771af9 |
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 | |
7 (global-set-key "\C-m" 'newline-and-indent) | |
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) | |
101 | 14 (global-set-key [(meta control f)] 'textmate-find-in-project-type) |
77 | 15 (global-set-key [(meta m)] 'iconify-or-deiconify-frame) |
16 (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
|
17 |
101 | 18 ;; M-j for jump to function definition |
19 (global-set-key [(meta j)] 'ido-imenu) | |
20 | |
21 ;; commit emacs heresy? | |
22 (global-set-key [(meta r)] 'execute-extended-command) | |
23 | |
24 ;; Mac-like keybindings for undo/cut/copy/paste | |
25 (global-set-key [(meta c)] 'kill-ring-save) | |
26 (global-set-key [(meta x)] 'kill-region) | |
27 (global-set-key [(meta z)] 'undo) | |
28 (global-set-key [(meta v)] 'yank) | |
29 (global-set-key [M-return] 'fullscreen) | |
30 (global-set-key [(control v)] 'yank-pop) | |
31 | |
32 ;; Fixup hooks for modes that like taking my keys back | |
33 (add-hook 'text-mode-hook '(lambda () | |
34 (define-key text-mode-map "\M-s" | |
35 'save-buffer))) | |
36 (add-hook 'comint-mode-hook '(lambda () | |
37 (local-set-key "\M-r" | |
38 'execute-extended-command))) | |
39 | |
95
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
40 (defun server-save-buffer-and-finish () |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
41 (interactive) |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
42 (save-buffer) (server-edit)) |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
43 (add-hook 'server-switch-hook |
df45e402581c
Save in server buffer also marks as done.
Augie Fackler <durin42@gmail.com>
parents:
77
diff
changeset
|
44 '(lambda ()(local-set-key "\M-s" 'server-save-buffer-and-finish ))) |