My Avatar

LanternD's Castle

An electronics enthusiast - survive technically

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

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

Miscellaneous optimization

1
(set-language-environment "UTF-8")
1
2
3
4
5
(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)

1
2
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