Skip to content

scottmacphersonmusic/.emacs.d

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

mv ~/.emacs.d ~/.emacs.d.backup
git clone https://github.com/re5et/.emacs.d-for-my-friends.git ~/.emacs.d

Start Emacs

you should be presented with this README and you can continue from there.

Max OSX stuff:

use alt as meta

Ctrl-H v (describe variable) mac-command-modifier RET Use customize to set value as meta

Keybindings

Emacs has a lot of keybindings, many of them useful. We aren’t going to discuss defaults, you should use the tutorial (C-h T) for that.

This will be a list of things that are different or added.

Overridden Defaults

C-j is remapped to C-x

C-x is too clumsy a keybinding for as important as it is in Emacs. Anytime you hit C-j, it will generate a C-x for you.

Anywhere you see C-x, you can use C-j instead.

C-j is originally mapped to `electric-newline-and-maybe-indent` and will usually be bound to RET by the mode you are using.

M-j is used as a user prefix key

M-j is a nice prefix key (usually user prefixes are C-c, which is less ideal).

M-j is originally bound to `indent-new-comment-line`, which isn’t that useful.

Project Navigation

For our practical purposes, projects are directory structues that have a .git folder at the top level. You can get much fancier with project defenition, see here: https://github.com/re5et/simp

M-j gmagit status buffer
M-j ffuzzy find file
M-j ssearch project
M-j S-ssearch entire project
M-j dproject root dired (directory listing)

Bookmark Prefixed Project Navigation

To pick a project from a bookmark and then take a project navigation action, you hold down Meta for the second keystroke

M-j M-gmagit status buffer
M-j M-ffuzzy find file
M-j M-ssearch project
M-j M-dproject root dired (directory listing)

Frame and window movement

M-lnext-in-frame-window
M-Lnext-multiframe-window
M-hprevious-in-frame-window
M-Hprevious-multiframe-window
C-S-,Undo window configuration change
C-S-.Redo window configuration change
C-S-\Rotate windows
M-S-\Swap split orientation
C-S-bmove back one in window history
C-S-fmove forward one in window history

Buffer niceities

C-,indent entire buffer according to mode
C-S-/revert buffer (to last save)
M-j Ggit time machine for buffer file
C-x C-kkill focused buffer

Editing niceities

M-zdelete from point up until characater
M-oindent-and-open-newline
C-oprevious-indent-and-open-newline
M-S-bbackward to word
M-S-fforward to word
M-S-mexpand region
M-S-nduplicate current line down
M-S-pduplicate current line up
C-S-mmultiple cursors “mark all like this”
C-S-nmove current line down
C-S-pmove current line up
C-S-yinsert from kill ring search
C-S-ssearch forward for thing at point
C-S-rsearch backward for thing at point
C-S-spaceexchange mark and point
C-x ffill region (wrap region)
C-x C-soverridden save that forces save each time
M-j S-mrename buffer and file
M-j kcopy line
M-j M-kkill whole line

Jumping around

M-j Jbookmark-jump
C-x C-bibuffer (instead of list buffers)
C-x C-ddired-jump (go to directory for file)

more

There are more things in my/my-keybindings.el that I didn’t cover, check them out.

Learning

Go through the emacs tutorial: C-h T

try out: M-x info

About

My .emacs.d stuff, without the rough edges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%