From db8d9d7dd9b8f5ade683527347cb71719c8a5d15 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 Jul 2015 12:36:37 +0200 Subject: Emacs: Remove unused virtual-buffers setting --- tag-emacs/emacs.d/init.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 2d036bb4..1a1acbb7 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -588,8 +588,7 @@ :bind (("C-x i" . helm-semantic-or-imenu)) :config (progn (setq helm-idle-delay .1 - helm-input-idle-delay 0 - ido-use-virtual-buffers t) + helm-input-idle-delay 0) (when (fboundp #'helm-adaptive-mode) (helm-adaptive-mode 1)))) -- cgit 1.4.1 From 95988279938369fa3bcb5f81ad7af40424c54b08 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 Jul 2015 12:36:54 +0200 Subject: Emacs: Install ido-completing-read+ for magit --- tag-emacs/emacs.d/Cask | 1 + 1 file changed, 1 insertion(+) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask index 02d9b3f5..958ac99c 100644 --- a/tag-emacs/emacs.d/Cask +++ b/tag-emacs/emacs.d/Cask @@ -62,6 +62,7 @@ (depends-on "help-fns+") (depends-on "hemisu-theme") (depends-on "highlight-stages") +(depends-on "ido-completing-read+") (depends-on "ido-vertical-mode") (depends-on "jinja2-mode") (depends-on "jquery-doc") -- cgit 1.4.1 From 7470476450164f188dbac5823506b28c519b6cd3 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 Jul 2015 12:37:11 +0200 Subject: Emacs: Install csv-mode --- tag-emacs/emacs.d/Cask | 1 + 1 file changed, 1 insertion(+) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask index 958ac99c..38c6f70e 100644 --- a/tag-emacs/emacs.d/Cask +++ b/tag-emacs/emacs.d/Cask @@ -20,6 +20,7 @@ (depends-on "company") (depends-on "company-go") (depends-on "company-tern") +(depends-on "csv-mode") (depends-on "dash") (depends-on "dash-functional") (depends-on "deferred") -- cgit 1.4.1 From 390c49918d250d87b61f4d9dd9d7d48c9b3871af Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 Jul 2015 12:41:19 +0200 Subject: Emacs: Configure fallback for ido-completing-read+ --- tag-emacs/emacs.d/init.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 1a1acbb7..ba682367 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -622,6 +622,12 @@ (ido-initiate-auto-merge (current-buffer))) (bind-key "C-c C-s" #'ido-manual-merge ido-file-dir-completion-map))) +(req-package ido-completing-read+ + :require ido + :config (progn + (setq ido-cr+-fallback-function #'helm-completing-read + ido-cr+-max-items 2000))) + (defun ap/ido-projectile-switch-buffer-dwim (force-ido) (interactive "p") (if (and (projectile-project-p) (eq force-ido 1)) -- cgit 1.4.1 From b043a43951bdf78ab5bd0fd866ead33ca73ad711 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 Jul 2015 14:28:13 +0200 Subject: Replace typo-mode with typopunct-mode Typopunct-mode works better with multiple-cursors. --- tag-emacs/emacs.d/Cask | 2 +- tag-emacs/emacs.d/init.el | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask index 38c6f70e..f4bb273d 100644 --- a/tag-emacs/emacs.d/Cask +++ b/tag-emacs/emacs.d/Cask @@ -125,7 +125,7 @@ (depends-on "tern") (depends-on "toml-mode") (depends-on "tup-mode") -(depends-on "typo") +(depends-on "typopunct") (depends-on "undo-tree") (depends-on "use-package") (depends-on "visual-regexp") diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index ba682367..da0786ed 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1171,10 +1171,10 @@ symbol, not word, as I need this for programming the most." :bind (("M-z" . zap-up-to-char) ("M-Z" . zap-to-char))) -(req-package typo +(req-package typopunct :init (progn - (typo-global-mode t) - (add-hook 'text-mode-hook 'typo-mode))) + (typopunct-change-language 'english t) + (add-hook 'text-mode-hook #'typopunct-mode))) (req-package ap-functions :commands (ap/remove-extra-cr) -- cgit 1.4.1 From f666adee888c628261dbf0c54dd1d7b4b27b3940 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 Jul 2015 14:30:50 +0200 Subject: Remove obsolete paredit-cedit patch --- tag-emacs/emacs.d/init.el | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index da0786ed..0f7c8862 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1249,11 +1249,6 @@ symbol, not word, as I need this for programming the most." (req-package paredit :diminish "()" :commands (paredit-mode) - :config (progn - (defun ap/cedit-space-delimiter-p (endp delimiter) - "Don't insert a space before delimiters in c-style modes" - (not cedit-mode)) - (add-to-list 'paredit-space-for-delimiter-predicates #'ap/cedit-space-delimiter-p)) :init (progn (add-hook 'lisp-mode-common-hook #'enable-paredit-mode) (put #'paredit-forward-delete 'delete-selection 'supersede) -- cgit 1.4.1 From 40719220d3258928c2fb6e742c9facb318d4d09d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 Jul 2015 14:39:52 +0200 Subject: Emacs: Add extra configuration for typopunct-mode --- tag-emacs/emacs.d/init.el | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 0f7c8862..a407ecc3 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -1172,6 +1172,74 @@ symbol, not word, as I need this for programming the most." ("M-Z" . zap-to-char))) (req-package typopunct + :config (progn + (defconst typopunct-minus (decode-char 'ucs #x2212)) + (defadvice typopunct-insert-typographical-dashes + (around minus-or-pm activate) + (cond + ((or (eq (char-before) typopunct-em-dash) + (looking-back "\\([[:blank:]]\\|^\\)\\^")) + (delete-char -1) + (insert typopunct-minus)) + ((looking-back "[^[:blank:]]\\^") + (insert typopunct-minus)) + (t ad-do-it))) + (define-key typopunct-map "+" 'typopunct-insert-mp) + + (defconst typopunct-ellipsis (decode-char 'ucs #x2026)) + (defconst typopunct-middot (decode-char 'ucs #xB7)) ; or 2219 + (defun typopunct-insert-ellipsis-or-middot (arg) + "Change three consecutive dots to a typographical ellipsis mark." + (interactive "p") + (cond + ((and (= 1 arg) + (eq (char-before) ?^)) + (delete-char -1) + (insert typopunct-middot)) + ((and (= 1 arg) + (eq this-command last-command) + (looking-back "\\.\\.")) + (replace-match "") + (insert typopunct-ellipsis)) + (t + (self-insert-command arg)))) + (define-key typopunct-map "." 'typopunct-insert-ellipsis-or-middot) + + (defconst typopunct-times (decode-char 'ucs #xD7)) + (defun typopunct-insert-times (arg) + (interactive "p") + (if (and (= 1 arg) (looking-back "\\([[:blank:]]\\|^\\)\\^")) + (progn (delete-char -1) + (insert typopunct-times)) + (self-insert-command arg))) + (define-key typopunct-map "x" 'typopunct-insert-times) + + (defadvice typopunct-insert-quotation-mark (around wrap-region activate) + (let* ((lang (or (get-text-property (point) 'typopunct-language) + typopunct-buffer-language)) + (omark (if single + (typopunct-opening-single-quotation-mark lang) + (typopunct-opening-quotation-mark lang))) + (qmark (if single + (typopunct-closing-single-quotation-mark lang) + (typopunct-closing-quotation-mark lang)))) + (cond + (mark-active + (let ((skeleton-end-newline nil) + (singleo (typopunct-opening-single-quotation-mark lang)) + (singleq (typopunct-closing-single-quotation-mark lang))) + (if (> (point) (mark)) + (exchange-point-and-mark)) + (save-excursion + (while (re-search-forward (regexp-quote (string omark)) (mark) t) + (replace-match (regexp-quote (string singleo)) nil nil))) + (save-excursion + (while (re-search-forward (regexp-quote (string qmark)) (mark) t) + (replace-match (regexp-quote (string singleq)) nil nil))) + (skeleton-insert (list nil omark '_ qmark) -1))) + ((looking-at (regexp-opt (list (string omark) (string qmark)))) + (forward-char 1)) + (t ad-do-it))))) :init (progn (typopunct-change-language 'english t) (add-hook 'text-mode-hook #'typopunct-mode))) -- cgit 1.4.1