From 146f11967943d1647d31e44fd8032c5d82394572 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 28 Sep 2018 14:07:44 -0700 Subject: [emacs] Some updates for markdown, counsel, etc. --- configs/rcs/emacs.d/init.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/configs/rcs/emacs.d/init.el b/configs/rcs/emacs.d/init.el index 6c59030..b6aaed9 100644 --- a/configs/rcs/emacs.d/init.el +++ b/configs/rcs/emacs.d/init.el @@ -232,8 +232,8 @@ :after (flyspell) :commands (markdown-mode gfm-mode) :mode (("README\\.md\\'" . gfm-mode) - ("\\.md\\'" . markdown-mode) - ("\\.markdown\\'" . markdown-mode))) + ("\\.md\\'" . gfm-mode) + ("\\.markdown\\'" . gfm-mode))) ;;; source control @@ -256,9 +256,10 @@ ("C-s" . counsel-grep-or-swiper) ("C-x C-f" . counsel-find-file) ("C-x C-r" . counsel-recentf) - ("C-c f" . counsel-git) ("C-c s" . counsel-git-grep) - ("C-c /" . counsel-ag)) + ("C-c C-x" . counsel-command-history) + ("C-c /" . counsel-ag) + ("C-c y" . counsel-yank-pop)) :custom (counsel-find-file-at-point t) :config @@ -268,7 +269,8 @@ (counsel-projectile-mode))) (use-package projectile - :bind-keymap ("C-c p" . projectile-command-map) + :bind + ("C-c p" . projectile-command-map) :init (add-hook 'after-init-hook #'projectile-mode) :config @@ -284,7 +286,10 @@ ;;; prog mode (use-package flycheck + :custom + (flycheck-idle-change-delay 2) :config + (setq-default flycheck-disabled-checkers '(html-tidy emacs-lisp emacs-lisp-checkdoc)) (global-flycheck-mode)) (use-package lisp-mode @@ -315,12 +320,10 @@ (use-package sh-script :after (flycheck) :mode ("bashrc" . sh-mode) + :hook (after-save . executable-make-buffer-file-executable-if-script-p) :config - (defun set-sh-mode-indent () - (setq sh-basic-offset 2 - sh-indentation 2)) - (add-hook 'sh-mode-hook 'set-sh-mode-indent) - (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)) + (setq-default sh-indentation 2 + sh-basic-offset 2)) ;;; configurations -- cgit 1.4.1