X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d_2%2Fconfig.org;h=2a722e0e7053f52e3e313d0965a835786e798d22;hb=0cf7b843eb98462b77d1476576f5c3f4187f9a3f;hp=6c8ff38beba600dabcab0ae49e78488ab389b319;hpb=5a7fa57deaab3ea3e98c9a9c6889db6d6b9bedf9;p=dotfiles.git diff --git a/emacs.d_2/config.org b/emacs.d_2/config.org index 6c8ff38..2a722e0 100644 --- a/emacs.d_2/config.org +++ b/emacs.d_2/config.org @@ -10,6 +10,15 @@ Most config are just copied from [[https://github.com/howardabrams/dot-files][ho ** Setting loading Path +Set system PATH and emacs exec path + +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + + (setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin")) + (setq exec-path (append exec-path '("/usr/local/bin"))) + +#+END_SRC + Set the emacs load path #+BEGIN_SRC emacs-lisp :tangle yes :results silent @@ -542,6 +551,7 @@ I use the prefix =M-s= for searching in buffers (define-key isearch-mode-map (kbd "M-s") 'isearch-forward-regexp) #+END_SRC + * Misc Settings @@ -631,7 +641,9 @@ Refer [[https://github.com/abo-abo/hydra/blob/master/hydra-examples.el][hydra-ex (split-window-below) (windmove-down)) "horz") - ("o" delete-other-windows "one" :exit t) + ;; ("o" delete-other-windows "one" :exit t) + ;; Todo define o to triggle delete others windows and restore windows layout + ("o" triggle-windows-max-size "maximize" :exit t) ("a" ace-window "ace") ("s" ace-swap-window "swap") ("d" ace-delete-window "ace-one" :exit t) @@ -646,6 +658,12 @@ Refer [[https://github.com/abo-abo/hydra/blob/master/hydra-examples.el][hydra-ex (global-unset-key (kbd "M-o")) (global-set-key (kbd "M-o") 'sd/hydra-window/body) + (defun triggle-windows-max-size () + (interactive) + (if (> (length (window-list)) 1) + (delete-other-windows) + (winner-undo))) + #+END_SRC ** Line Number @@ -785,6 +803,44 @@ Type =o= to go to the link (:map projectile-mode-map ("s-p" . projectile-persp-switch-project))) + ;; projectile-find-file + ;; projectile-switch-buffer + ;; projectile-find-file-other-window +#+END_SRC + +** Which key + +[[https://github.com/justbur/emacs-which-key][which-key]] show the key bindings + +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + + (use-package which-key + :ensure t + :config + (which-key-mode)) + +#+END_SRC + +** Emms + +We can use [[https://www.gnu.org/software/emms/quickstart.html][Emms]] for multimedia in Emacs + +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + + (use-package emms + :ensure t + :init + (setq emms-source-file-default-directory "~/Music/") + (define-emms-simple-player mplayer '(file url) + (regexp-opt '(".ogg" ".mp3" ".mgp" ".wav" ".wmv" ".wma" ".ape" + ".mov" ".avi" ".ogm" ".asf" ".mkv" ".divx" ".mpeg" + "http://" "mms://" ".rm" ".rmvb" ".mp4" ".flac" ".vob" + ".m4a" ".flv" ".ogv" ".pls")) + "mplayer" "-slave" "-quiet" "-really-quiet" "-fullscreen") + :config + (emms-standard) + (emms-default-players)) + #+END_SRC * Programming