emacs - change some keybindings
[dotfiles.git] / emacs.d / config.org
index 26ccb4b..e7e50e1 100644 (file)
@@ -642,6 +642,7 @@ Logging Stuff
   (setq org-clock-into-drawer t)
   ;; save state change notes and time stamp into LOGBOOK drawer
   (setq org-log-into-drawer t)
+  (setq org-clock-into-drawer "CLOCK")
 #+END_SRC
 
 *** Tags
@@ -834,6 +835,20 @@ extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-em
 
 #+END_SRC
 
+Defined keys, using vi keybindings, Refer abo-abo's setting [[https://github.com/abo-abo/oremacs/blob/c5cafdcebc88afe9e73cc8bd40c49b70675509c7/modes/ora-nextmagit.el][here]]
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (dolist (map (list magit-status-mode-map
+                     magit-log-mode-map
+                     magit-diff-mode-map
+                     magit-staged-section-map))
+    (define-key map "j" 'magit-section-forward)
+    (define-key map "k" 'magit-section-backward)
+    (define-key map "n" nil)
+    (define-key map "p" nil)
+    (define-key map "v" 'recenter-top-bottom)
+    (define-key map "i" 'magit-section-toggle))
+#+END_SRC
+
 * IDO & SMEX
 
 ** IDO
@@ -1023,8 +1038,8 @@ Some global bindings on =Super=, on Mac, it is =Command=
 
   ;; (global-set-key (kbd "s-y") 'projectile-find-file)
   (global-set-key (kbd "s-f") 'projectile-find-file)
-  (global-set-key (kbd "s-[") 'persp-next)
-  (global-set-key (kbd "s-]") 'persp-prev)
+  ;; (global-set-key (kbd "s-[") 'persp-next)
+  ;; (global-set-key (kbd "s-]") 'persp-prev)
 
   (global-set-key (kbd "s-`") 'mode-line-other-buffer)
 
@@ -1219,15 +1234,14 @@ Quickly start eshll in split window below, refer [[http://www.howardism.org/Tech
           (insert (concat "ls"))
           (eshell-send-input)))))
 
-  ;; (global-set-key (kbd "M-`") (lambda ()
-  ;;                               (interactive)
-  ;;                               (if (buffer-name))))
+  (global-unset-key (kbd "M-`"))
+  (global-set-key (kbd "M-`") #'eshell-here)
 #+END_SRC
 
 * Misc Settings
 
 ** [[https://github.com/abo-abo/hydra][Hydra]]
-
+*** hydra install
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (use-package hydra
     :ensure t)
@@ -1292,10 +1306,10 @@ Refer [[https://github.com/abo-abo/hydra/blob/master/hydra-examples.el][hydra-ex
 
   (defhydra sd/hydra-window (:color red :columns nil)
     "window"
-    ("h" windmove-left nil)
-    ("j" windmove-down nil)
-    ("k" windmove-up nil)
-    ("l" windmove-right nil)
+    ("h" windmove-left nil :exit t)
+    ("j" windmove-down nil :exit t)
+    ("k" windmove-up nil :exit t)
+    ("l" windmove-right nil :exit t)
     ("H" hydra-move-splitter-left nil)
     ("J" hydra-move-splitter-down nil)
     ("K" hydra-move-splitter-up nil)
@@ -1304,12 +1318,12 @@ Refer [[https://github.com/abo-abo/hydra/blob/master/hydra-examples.el][hydra-ex
            (interactive)
            (split-window-right)
            (windmove-right))
-     "vert")
+     "vert" :exit t)
     ("x" (lambda ()
            (interactive)
            (split-window-below)
            (windmove-down))
-     "horz")
+     "horz" :exit)
     ("o" delete-other-windows "one" :exit t)
     ("a" ace-window "ace")
     ("s" ace-swap-window "swap")
@@ -1493,11 +1507,10 @@ Type =o= to go to the link
 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/emms/")
+    (setq emms-source-file-default-directory "~/Music/")
     :config
     (emms-standard)
     (emms-default-players)