diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2018-02-02 09:32:57 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2018-02-02 09:32:57 +0100 |
| commit | 14aa0d6dee438b03f7161b29e7dbbae28bebdb8b (patch) | |
| tree | e08ccf59c2f928708fbd36fc13edbf330a0ea0bc /.emacs | |
| parent | c6320f872750910fcd636bf0de362e6935ff7ac9 (diff) | |
| download | dotfiles-14aa0d6dee438b03f7161b29e7dbbae28bebdb8b.tar.xz | |
I can't live without backward-kill-word
I mean I can't live with it on C-<backspace> or M-<backspace>.
Diffstat (limited to '.emacs')
| -rw-r--r-- | .emacs | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -17,7 +17,13 @@ ;; Key bindings +;; C-h is a special snowflake in many situations; this is the most +;; reliable way I found to consistently get C-h to do what DEL does. (define-key input-decode-map (kbd "C-h") (kbd "DEL")) +;; Likewise, C-M-h (resp. M-h) gets re-bound by cc-mode +;; (resp. markdown-mode, nxml-mode). So this is the simplest way I +;; know of to make sure C-M-h sticks as "backward-kill-word" +(define-key input-decode-map (kbd "C-M-h") (kbd "M-DEL")) (global-set-key (kbd "C-x C-b") 'ibuffer) @@ -25,6 +31,7 @@ (global-set-key (kbd "C-c c") 'compile) (global-set-key (kbd "C-c f") 'auto-fill-mode) +(global-set-key (kbd "C-c h") 'mark-defun) (global-set-key (kbd "C-c m") 'man) (global-set-key (kbd "C-c p") 'electric-pair-mode) (global-set-key (kbd "C-c t") 'toggle-truncate-lines) @@ -98,7 +105,9 @@ (defun my/c-modes-hook () (c-set-style "bsd") - (c-set-offset 'arglist-close 0)) + (c-set-offset 'arglist-close 0) + ;; TODO: find why c-mode is not happy with mark-defun + (local-set-key (kbd "C-c h") 'c-mark-function)) (add-hook 'c-mode-common-hook 'my/c-modes-hook) |
