My Avatar

LanternD's Castle

PhD Student in ECE @ MSU

Spacemacs Rocks Note Day 6

2017-11-01

A series of notes that I learn Emacs hacking. Org-capture, org-pomodoro; file encoding with utf-8; batch rename files in dired mode, seach and replace with helm-ag; flycheck; snippets auto complete.

 

Use org-capture to take notes

(setq org-capture-templates
      '(("t" "Todo" entry (file+headline "D:/Dropbox/AGDA/Orz.org" "Agenda")
	 "* TODO [#B] %?\n %i\n"
	 :empty-line 1)))
(setq org-agenda-files '("D:/Dropbox/AGDA"))

Miscellaneous optimization

(set-language-environment "UTF-8")
(with-eval-after-load 'company
  (define-key company-active-map (kbd "M-n") nil)
  (define-key company-active-map (kbd "M-p") nil)
  (define-key company-active-map (kbd "C-n") #'company-select-next)
  (define-key company-active-map (kbd "C-p") #'company-select-previous))

Batch rename files in dired mode

Search and replace (Important)

brew install the_silver_searcher
apt-get install silversearcher-ag

Use flycheck to highlight typos

About snippets.

yasnippet package

auto-yasnippet package



Disqus Comment 0