HudsonJoe's personal emacs configuration
Screen Shots Atom One Dark Theme Screen Shots (Using moe-theme)
Table of Contents
-
First, you gonna need an Emacs, or there is another way to install it for Mac users.
-
Your Emacs Version must be NO LOWER THAN 24.4, for there are many uses of 'with-eval-after-load'. However, if you are so determined to use it with some early versions of emacs, make sure that you get rid of all 'with-eval-after-load' functions, and replace them with (require 'package-name). All files containing 'with-eval-after-load' and examples to replace them will be given in Appendix.
-
If you are using Windows, probably the neotree package could not work right.
-
Do customize the codes in init-org.el before you use org-agenda and org-capture functions.
git clone https://github.com/Sort-Care/joemacs ~/.emacs.d
If you are using windows see here. Or, Windows用户配置的中文说明 After setting the "[home-path]" in Windows, use the similar command to install it:
git clone https://github.com/Sort-Care/joemacs [home-path]/.emacs.d
If you don't want to use git, try install joemacs manually:
- create folder .emacs.d under your home path(~).
- copy init.el and lisp folder to your .emacs.d folder.
- restart your emacs, it will install all packages needed from the internet.
- helm-ag: to make helm-ag work, you need to install the silver searcher
;;---------------- Packages for special file modes ----------
js2-mode
bison-mode
web-mode
;;----------- Packages providing awesome functionalities ----------
company
swiper
counsel
popwin
reveal-in-osx-finder
org-pomodoro
helm-ag
yasnippet
auto-yasnippet
neotree
exec-path-from-shell
;;---------------- Packages for edit convenience ----------
hungry-delete
smartparens
expand-region
iedit
;;-------------------------- themes ----------
monokai-theme
moe-theme
File and Command Functions | Key Bindings |
---|---|
Open Recent Files | C-x C-r |
Find Function | C-h C-f |
Find Variable | C-h C-v |
Find Function on key | C-h C-k |
Open Swiper | C-s |
ivy-resume | C-c C-r |
Open counsel M-x | M-x |
Find File | C-x C-f |
Counsel Describe Function | C-h f |
Counsel Describe Variable | C-h v |
Counsel Git Search | C-c p f |
Counsel Ag Search | C-c p a |
Counsel Locate Word | C-c c l |
Reveal File in Finder (Mac OS X) | C-c z |
Helm-ag Search Project Root | C-c p s |
Open File Tree (neotree) | f8 |
Caution: Note that if you are using systems other than Mac, you need to redefine these window move keys for the C-S key settings conflict with some cursor selecting functions.
Window Move | Key Bindings |
---|---|
Move Focusing Window | |
--------- window up | C-c w p |
--------- window down | C-c w n |
--------- window left | C-c w b |
--------- window right | C-c w f |
I added some TODO List states to org mode, you can totally customize them by:
M-x customize-group [RET] org-todo
Then find the group named "Org Todo Keywords".
About arguments in the parentheses:
Since it is normally too much to record a note for every state, Org mode expects configuration on a per-keyword basis for this. This is achieved by adding special markers ‘!’ (for a timestamp) or ‘@’ (for a note with timestamp) in parentheses after each keyword.
Before using Open Org Agenda shortcut, you need to appoint a folder:
(setq org-agenda-files '("~/org"))
Put this in init-org.el, after the (require 'org) or between the parentheses of with-eval-after-load function, like this:
(with-eval-after-load 'org
(setq org-agenda-files '("~/org"))
)
Org Mode | Key Bindings |
---|---|
Open Org Agenda ( need customizing before being used) | C-c a |
Org Capture ( need customizing before being used) | C-c r |
Org-pomodoro Start a Timer | C-c o p |
Editing Shortcuts | Key Bindings |
---|---|
Indent Buffer or Region | C-M-| |
Hippie Expand Completion | s-/ |
Expand Region Select | C-= |
Enter iedit Mode | M-s e |
Selecting Candidates of Company Completion | |
------- Next One | C-n |
------- Previous One | C-p |
Auto yasnippet Create | C-c s c |
Auto yasnippet Expand | C-c s e |
Move Line or Region | |
------- Up | M-p |
------- Down | M-n |
.emacs.d
|-- init.el
|-- lisp
|--- init-packages.el
|--- init-ui.el
|--- init-better-defaults.el
|--- init-keybindings.el
|--- init-org.el
|--- custom.el
|--- move-lines.el
- init-better-defaults.el: line 105: (with-eval-after-load 'dired
- init-keybindings.el : line 47 : (with-eval-after-load 'company
- init-keybindings.el : line 54 : (with-eval-after-load 'dired
- init-org.el : line 4 : (with-eval-after-load 'org
If you are using emacs earlier than version 24.4, you need to locate these files and replace all "with-eval-after-load" with "require", or the emacs launching process will throw errors like
Symbol's function definition is void: with-eval-after-load
For init-better-defaults.el, line 105: The origin function is as follows:
;;延迟Dired load
(with-eval-after-load 'dired
(define-key dired-mode-map (kbd "RET") 'dired-find-alternate-file))
Assume that we have come across an error saying that function definition is void for: with-eval-after-load. To fix it, we need to disable codes above and add some lines as below:
(require 'dired)
(defined-key dired-mode-map (kbd "RET") 'dired-find-alternate-file)
DO NOT Replace "with-eval-after-load" with "require" if not necessary, it is feasible by will slow down the launch speed of Emacs.