add study note file
[dotfiles.git] / emacs.d / config.org
index 70d381a..8e6bbe7 100644 (file)
@@ -988,7 +988,7 @@ extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-em
   (add-to-list 'org-structure-template-alist
                '("E" "#+BEGIN_SRC emacs-lisp :tangle yes :results silent\n?\n#+END_SRC"))
   (add-to-list 'org-structure-template-alist
-               '("S" "#+BEGIN_SRC sh\n?\n#+END_SRC"))
+               '("S" "#+BEGIN_SRC sh :results output replace\n?\n#+END_SRC"))
   (add-to-list 'org-structure-template-alist
                '("p" "#+BEGIN_SRC plantuml :file uml.png \n?\n#+END_SRC"))
   (add-to-list 'org-structure-template-alist
@@ -1436,6 +1436,17 @@ When see function by =C-h f=, and visit the source code, I would like the buffer
     :ensure t)
 #+END_SRC
 
+** Ag
+install =ag=, =the-silver-searcher= by homebrew on mac
+#+BEGIN_SRC sh
+brew install the-silver-searcher
+#+END_SRC
+
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (use-package ag
+    :ensure t)
+#+END_SRC
+
 * Dired
 ** Dired bindings
 =C-o= is defined as a global key for window operation, here unset it in dired mode
@@ -2446,7 +2457,7 @@ Most use =C-o C-o= to switch buffers; =C-o x, v= to split window; =C-o o= to del
     ;; buffer / windows switch
     ("o" sd/toggle-max-windows "one" :exit t)
     ("C-k" sd/delete-current-window "del" :exit t)
-    ("D" (lambda ()
+    ("C-d" (lambda ()
              (interactive)
              (kill-buffer)
              (sd/delete-current-window))