Joshua Branson 7811b36316 various changes. | 3 years ago | |
---|---|---|
auto-insert-directory | 3 years ago | |
images | 6 years ago | |
lisp | 3 years ago | |
site-lisp | 10 years ago | |
snippets | 6 years ago | |
yatemplate-dir | 8 years ago | |
.agignore | 11 years ago | |
.bookmarks.el | 3 years ago | |
.gitignore | 6 years ago | |
.gitmodules | 8 years ago | |
LICENSE | 10 years ago | |
README.md | 7 years ago | |
abbrev_defs | 3 years ago | |
alias | 9 years ago | |
custom.el | 3 years ago | |
ede-projects.el | 6 years ago | |
helm-doc.org | 9 years ago | |
init.el | 3 years ago | |
scratch-pkg.el | 10 years ago |
Not so long ago I forked Steve Purcell's emacs config. You can find the original config here: https://github.com/purcell/emacs.d
My emacs config is still structured like Steve Purcell's. All of my code for my init.el is in my lisp/ folder. This config uses evil-mode with friendly dvorak keybindings. If you like the qwerty keyboard layout and the default non-modal behavior of emacs, then you probably should not use this config. One last important note: I am an amateur programmer lacking Mr. Purcell's elisp experience. His emacs config has been known to work on windows and mac. I do not try to support those OSes, and my config is no where near as stable as his. Your computer won't crash if you use my config, but emacs might crash occasionally.
Emacs itself comes with support for many programming languages. This config targets web programmers using php, javascript, html, and css. It offers no other major benefits to any other programming languages. Though I am customizing org mode more as time goes on.
Here are some cool modes that my config offers:
To install, clone this repo to ~/.emacs.d
, i.e. ensure that the
init.el
contained in this repo ends up at ~/.emacs.d/init.el
:
git clone https://github.com/jbranso/.emacs.d.git
But when running emacs fails for you, go ahead and try using purcell's .emacs.d:
git clone https://github.com/purcell/emacs.d.git ~/.emacs.d
Upon starting up Emacs for the first time, further third-party packages will be automatically downloaded and installed. At least that is what is supposed to happen. Currently this functionality is broken. You can clone my config just fine, but when you try to start emacs, emacs'll will call say things like where is package X,Y, and Z? I'm working on fixing these issues. Like right now. Sept. 19, 2015.
To get these things fixed, these need to be addressed.
I use helm-mode instead of ido, and you should too. Helm mode is an incremental completion framework that is superior to ido-mode. Helm-swoop alone is super amazing (although swiper.el, is nice too). This config uses "C-c h" as the default helm keybinding, "C-c C-h" call the traditional help package. Yeah, helm is better than emacs 'help. Check out what you can do with helm here: https://tuhdo.github.io/helm-intro.html
I also use projectile, which is a way to quickly navigate your way through lots of source code files. Type "C-c p" to see a list of options. I really like "C-c p h", which uses helm to navigate projectile's sources! Currently projectile is broken.
Update the config with git pull
. You'll probably also want/need to update
the third-party packages regularly too:
M-x package-list-packages, then U followed by x.
All of these key bindings can be found in lisp/init-editing-utilities.el
Keybinding | Description |
---|---|
Mod a | highlight the whole buffer |
Mod d | downcase word at point |
Mod g | magit status |
Mod s | save all open buffers |
C-c TAB | indent the entire buffer according to the major mode |
C-c \ | delete the spaces between two words |
C-c SPC | delete the excess space between two words |
C-c a | org-agenda |
C-c b | eval the whole buffer. ie: if it's lisp code, evaluate the code (eval-buffer) |
C-c B | use helm to browse the kill ring |
C-c c | org-capture |
C-c d | open dired in the current directory (dired-jump) |
C-c D | (dumb-jump-go), which finds the definition of thing at point. |
C-c e | use helm to select an emacs command (helm-M-x) |
C-c E | open eshell (eshell) |
C-c f | do a regexp search forward (isearch-forward-regexp) |
C-c F | do a regular search backward (isearch-forward) |
C-c g | open gnus (gnus) |
C-c h | this is helm's command prefix and does nada |
C-c i | prompts for an info manual name then opens it |
C-c l | evaluate the last elisp express ie (dired-jump) |
C-c L | org store link |
C-c m | opens up helm-mini, which is a nice way to open up recently visited files (helm-mini) |
C-c M p | emms play previous song (that's right. I'm using emacs to stream and play music) |
C-c M n | emms play next song |
C-c M P | emms pause |
C-c p | print the working directory in the minibuffer |
C-c R | find name dired. This is the emacs find and replace for multiple buffers command. |
C-c q | fill the current paragraph |
C-c s | use the silver searcher to rapidly search for a string. You have to install the silver search to do this. |
C-c t | transpose chars |
C-c T | transpose words |
C-c x | align via regexp |
j | join the lower line to the end of this line, when in evil normal mode |
J | join the current line the end of the previous line, when in evil normal mode |
m KEY | mark the current spot in the buffer with KEY, when in evil normal mode |
' KEY | go to the marked KEY in the buffer, when in evil normal mode |
; | comment-dwin. This is an emacs command that either adds a comment to the current line, or if the line is highlighted, then it comments out the line, when in evil normal mode |
q | save and quit the current buffer. This is the same as (save-buffer) (kill-buffer), when in evil normal mode |
C-w [h | t | n | s] | move to the up, down, left, or right window. The syntax [ h | t | n | s ] means that you have to pick either h, t, n, s. So the only valid commands are C-w h, C-w t, C-w n, C-w s |
C-c r | This begins to define an evil macro. In emacs state the binding for this in C-x ( |
C-h | insert a new line below point and switch to insert state |
C-t | insert a new line above point and switch to insert state. The reader should not that this conflicts with the emacs binding of (transpose-chars), which I have rebound to (global-set-key (kbd "C-c t") 'transpose-chars) |
spacebar | inserts a space, when in evil normal mode |
> | move point to the beginning of the buffer, when in evil normal mode |
< | move point to the end of the buffer, when in evil normal mode |
To add your own customization, use M-x customize and/or
create a file ~/.emacs.d/lisp/init-local.el
which looks like this:
... your code here ...
(provide 'init-local)
If you need initialisation code which executes earlier in the startup process,
you can also create an ~/.emacs.d/lisp/init-preload-local.el
file.
If you plan to customize things more extensively, you should probably just fork the repo and hack away at the config to make it your own!
You might also want to check out emacs-starter-kit
and prelude
.
If you hit any problems, please first ensure that you are using the latest version of this code, and that you have updated your packages to the most recent available versions (see "Updates" above). If you still experience problems, go ahead and file an issue on the github project.
-Joshua Branson