summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2018-02-13 16:47:25 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2018-02-13 16:47:25 +0100
commit9fcc898f89bfc04a58b7e0a6fce71c0567872b43 (patch)
tree670ce55291f4a6d1e4494d61cf840ee53045f1cf
parente885aeee35699910b4f08ece45c7c97110ffe41c (diff)
downloaddotfiles-9fcc898f89bfc04a58b7e0a6fce71c0567872b43.tar.xz
Cleanup comments in .emacs
visual-line vs word-wrap: AFAICT, visual-line is word-wrap plus some customizable options: - fringe indicators; - specialized editing commands. So there is no reason to bother with word-wrap. Appending through dir-locals: I wanted to have lists in dir-locals *appended* to the variables, rather than overwritten, eg: ;; in .emacs: (setq my/foo '(1 2 3)) ;; in .dir-locals.el: ((c-mode . ((my/foo . (4 5 6))))) ;; M-: my/foo in a C buffer: (1 2 3 4 5 6) I don't think there is built-in support for this. I guess the simplest way to emulate it would be to 1. put (4 5 6) in some other variable my/bar; 2. write a hook that appends my/bar to my/foo.
-rw-r--r--.emacs17
1 files changed, 10 insertions, 7 deletions
diff --git a/.emacs b/.emacs
index 0201236..45f15db 100644
--- a/.emacs
+++ b/.emacs
@@ -19,13 +19,18 @@
;; 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"))
+;;
+;; Likewise, C-M-h is re-bound by some major modes (CC, Python, Perl),
+;; so this is the simplest way I know of to make sure C-M-h sticks as
+;; "backward-kill-word".
+;;
+;; Same story with M-h (mark-paragraph) which gets re-bound by eg
+;; markdown-mode and nxml-mode.
+;;
;; NB: help and mark-defun are still accessible using H instead of h,
;; except in a terminal.
+(define-key input-decode-map (kbd "C-h") (kbd "DEL"))
+(define-key input-decode-map (kbd "C-M-h") (kbd "M-DEL"))
(global-set-key (kbd "C-x C-b") 'ibuffer)
@@ -223,5 +228,3 @@
;; TODO: fringe fun: hideshowvis, git gutter…
;; TODO: decruftify mode-line
-;; TODO: visual-line vs word-wrap
-;; TODO: check for an idiomatic way to append thru dir-locals