X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Fconfig.org;h=c35e2fe78679abfb84b0c4f289d61869141af469;hb=e4cdf10258135595a323f282cce4b27407f9aaa1;hp=3a49d0684de10518377a5d91fc9b0841b3400510;hpb=813c0383223046106bb6b25604617e6d1847e26a;p=dotfiles.git diff --git a/emacs.d/config.org b/emacs.d/config.org index 3a49d06..c35e2fe 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -340,9 +340,7 @@ Enable rainbow mode in emacs lisp mode * Mode-line ** clean mode line - clean mode line, Refer to [[https://www.masteringemacs.org/article/hiding-replacing-modeline-strings][Marstering Emacs]] - #+BEGIN_SRC emacs-lisp :tangle yes :results silent (defvar mode-line-cleaner-alist `((auto-complete-mode . " α") @@ -397,9 +395,7 @@ clean mode line, Refer to [[https://www.masteringemacs.org/article/hiding-replac #+END_SRC ** Powerline mode - Install powerline mode [[https://github.com/milkypostman/powerline][powerline]] - #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package powerline :ensure t @@ -525,7 +521,7 @@ set height in mode line #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package ido :ensure t - :init (setq ido-enable-flex-matching t + :init (setq ido-enable-flex-matching nil ido-ignore-extensions t ido-use-virtual-buffers t ido-everywhere t) @@ -542,9 +538,9 @@ set height in mode line #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package flx-ido :ensure t - :init (setq ido-enable-flex-matching t + :init (setq ido-enable-flex-matching nil ido-use-faces nil) - :config (flx-ido-mode 1)) + :config (flx-ido-mode nil)) #+END_SRC ** IDO-vertically @@ -1101,6 +1097,8 @@ Toggle an eshell in split window below, refer [[http://www.howardism.org/Technic #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package exec-path-from-shell :ensure t + :init + (setq exec-path-from-shell-check-startup-files nil) :config (exec-path-from-shell-initialize)) #+END_SRC @@ -1547,6 +1545,34 @@ here on Mac, just use "open" commands to pen =.pdf=, =.html= and image files ("\\.html?\\'" "open") ("\\.dmg\\'" "open") ("\\.cue?\\'" "audacious"))) + + + (defun sd/dired-start-process (cmd &optional file-list) + (interactive + (let ((files (dired-get-marked-files + t current-prefix-arg))) + (list + (unless (eq system-type 'windows-nt) + (dired-read-shell-command "& on %s: " + current-prefix-arg files)) + files))) + + (if (eq system-type 'windows-nt) + (dolist (file file-list) + (w32-shell-execute "open" (expand-file-name file))) + (let (list-switch) + (start-process + cmd nil shell-file-name + shell-command-switch + (format + "nohup 1>/dev/null 2>/dev/null %s \"%s\"" + cmd + ;; (if (and (> (length file-list) 1) + ;; (setq list-switch + ;; (cadr (assoc cmd ora-dired-filelist-cmd)))) + ;; (format "%s %s" cmd list-switch) + ;; cmd) + (mapconcat #'expand-file-name file-list "\" \"")))))) #+END_SRC ** dired-hacks @@ -1712,6 +1738,7 @@ to call =compilation= interactively. (use-package flycheck :ensure t) #+END_SRC + *** irony #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package irony @@ -1739,6 +1766,34 @@ then install irony searver, and =LIBCLANG_LIBRARY= and =LIBCLANG_INCLUDE_DIR= ac /Users/peli3/.emacs.d/elpa/irony-20160713.1245/server && cmake --build . --use-stderr --config Release --target install #+END_SRC +irony-mode-hook, copied from [[https://github.com/Sarcasm/irony-mode][irony-mode]] github +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + ;; replace the `completion-at-point' and `complete-symbol' bindings in + ;; irony-mode's buffers by irony-mode's function + (defun my-irony-mode-hook () + (define-key irony-mode-map [remap completion-at-point] + 'irony-completion-at-point-async) + (define-key irony-mode-map [remap complete-symbol] + 'irony-completion-at-point-async)) + (add-hook 'irony-mode-hook 'my-irony-mode-hook) + (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options) +#+END_SRC + +irony-company +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (use-package company-irony + :ensure t) + + (eval-after-load 'company + '(add-to-list 'company-backends 'company-irony)) + + (use-package flycheck-irony + :ensure t) + + (eval-after-load 'flycheck + '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup)) +#+END_SRC + *** yasnippet #+BEGIN_SRC emacs-lisp :tangle yes :results silent (use-package yasnippet