emacs - remove unused code
[dotfiles.git] / emacs.d / config.org
index a1e3d09..63cf180 100644 (file)
@@ -111,31 +111,29 @@ Make a temp directory for all cache/history files
 * Package Management Tools
 
 ** Use-package
-
 Using [[https://github.com/jwiegley/use-package][use-package]] to manage emacs packages
-
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
   (unless (package-installed-p 'use-package)
     (package-refresh-contents)
     (package-install 'use-package))
 
   (require 'use-package)
-
 #+END_SRC
 
 ** El-get
-
 [[https://github.com/dimitri/el-get][El-get]] is package management tool, whicl allows to install external elisp package from any git repository not in mepla. 
 Check out [[http://tapoueh.org/emacs/el-get.html][el-get]].
-
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
   (use-package el-get
     :ensure t
     :init
     (add-to-list 'load-path "~/.emacs.d/el-get"))
+#+END_SRC
 
+** paradox
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (use-package paradox
+    :ensure t)
 #+END_SRC
 
 * Color and Fonts Settings
@@ -1262,16 +1260,6 @@ Type =o= to go to the link
 
 #+END_SRC
 
-** Emux
-
-[[https://github.com/re5et/emux][emux]] is 
-
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
-
-  (el-get-bundle re5et/emux)
-
-#+END_SRC
-
 ** Smart Parens
 
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
@@ -1384,8 +1372,6 @@ When see function by =C-h f=, and visit the source code, I would like the buffer
 ** TODO Man mode
 Color for Man-mode
 
-** TODO swiper to occur
-
 ** TODO UTF8
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   ;; (set-language-environment "UTF-8")
@@ -1414,7 +1400,8 @@ Color for Man-mode
     (define-key org-tree-slide-mode-map [escape] 'org-tree-slide-move-previous-tree))
 #+END_SRC
 
-* dired
+* Dired
+** Dired config
 =C-o= is defined as a global key for window operation, here unset it in dired mode
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (use-package dired
@@ -1429,7 +1416,7 @@ Color for Man-mode
                                  (dired-omit-mode))))
 #+END_SRC
 
-Dired+
+** Dired+
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (use-package dired+
     :ensure t
@@ -1441,13 +1428,22 @@ Dired+
     (define-key dired-mode-map (kbd "g") 'dired-goto-file))
 #+END_SRC
 
-dired-hacks
+** dired-hacks
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (use-package dired-hacks-utils
     :ensure t)
+
+
+  (defconst my-dired-media-files-extensions '("mp3" "mp4" "MP3" "MP4" "avi" "mpg" "flv" "ogg" "wmv" "mkv" "mov" "wma")
+  "Media file extensions that should launch in VLC.")
+
+    (add-to-list 'dired-guess-shell-alist-user
+                 (list (concat "\\."
+                               (regexp-opt my-dired-media-files-extensions)
+                               "\\'") "mplayer"))
 #+END_SRC
 
-* ibuffer
+* Ibuffer
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (global-set-key (kbd "s-b") 'ibuffer)
 
@@ -2144,12 +2140,14 @@ Most use =C-o C-o= to switch buffers; =C-o x, v= to split window; =C-o o= to del
 
     ;; ibuffer, dired, eshell, bookmarks
     ;; ("d" ace-delete-window "ace-one" :exit t)
-    ("C-o" ido-switch-buffer "buf" :exit t)
-    ("d" dired-jump "dired" :exit t)
-    ("b" ibuffer "ibuffer" :exit t)
-    ("e" eshell "eshell" :exit t)
-    ("m" bookmark-jump-other-window "open bmk" :exit t)
-    ("M" bookmark-set "set bmk" :exit t)
+    ("C-o" ido-switch-buffer nil :exit t)
+    ("d" dired-jump nil :exit t)
+    ("b" ibuffer nil n:exit t)
+    ("e" eshell nil :exit t)
+    ("m" bookmark-jump-other-window nil :exit t)
+    ("M" bookmark-set nil :exit t)
+    ("g" magit-status nil :exit t)
+    ("p" paradox-list-packages nil :exit t)
 
     ;; quit
     ("q" nil "cancel")
@@ -2159,7 +2157,6 @@ Most use =C-o C-o= to switch buffers; =C-o x, v= to split window; =C-o o= to del
     ;; ("C-k" nil :exit t)
     ("C-l" nil nil :exit t)
     ("C-;" nil nil :exit t)
-    ("p" nil nil :exit t)
     ("n" nil nil :exit t)
     ("[" nil nil :exit t)
     ("]" nil nil :exit t)
@@ -2524,8 +2521,9 @@ stolen from [[https://github.com/mariolong/emacs.d/blob/f6a061594ef1b5d1f4750e9d
     (back-to-indentation)
     (set-mark (line-end-position)))
 
-  (defhydra sd/expand-selected (:color pink :columns nil
-                                       :post (deactivate-mark))
+  (defhydra sd/expand-selected (:color red :columns nil
+                                       ;; :post (deactivate-mark)
+                                       )
     "Selected"
     ;; select
     ;; ("e"  er/expand-region "+")
@@ -2569,7 +2567,7 @@ stolen from [[https://github.com/mariolong/emacs.d/blob/f6a061594ef1b5d1f4750e9d
     ("d" kill-region "delete" :exit t)
 
     ("y" kill-ring-save "yank" :exit t)
-    ("M-SPC" nil "quit" :exit t)
+    ;; ("M-SPC" nil "quit" :exit t)
     ("C-SPC" nil "quit" :exit t)
     ("q" nil "quit" :exit t))