Starter Kit Bindings
This is part of the Emacs Starter Kit.
Starter Kit Bindings
Key Bindings.
You know, like Readline.
(global-set-key (kbd "C-M-h") 'backward-kill-word)
Align your code in a pretty way.
(global-set-key (kbd "C-x \\") 'align-regexp)
Completion that uses many different methods to find options.
(global-set-key (kbd "M-/") 'hippie-expand)
Turn on the menu bar for exploring new modes
(global-set-key [f1] 'menu-bar-mode)
Font size
(define-key global-map (kbd "C-+") 'text-scale-increase) (define-key global-map (kbd "C--") 'text-scale-decrease)
Use regex searches by default.
(global-set-key (kbd "C-s") 'isearch-forward-regexp) (global-set-key (kbd "\C-r") 'isearch-backward-regexp) (global-set-key (kbd "C-M-s") 'isearch-forward) (global-set-key (kbd "C-M-r") 'isearch-backward)
File finding
(global-set-key (kbd "C-x M-f") 'ido-find-file-other-window) (global-set-key (kbd "C-x C-p") 'find-file-at-point) (global-set-key (kbd "C-c y") 'bury-buffer) (global-set-key (kbd "C-c r") 'revert-buffer) (global-set-key (kbd "M-`") 'file-cache-minibuffer-complete) (global-set-key (kbd "C-x C-b") 'ibuffer) (global-set-key (kbd "C-x f") 'recentf-ido-find-file)
Window switching. (C-x o goes to the next window)
(windmove-default-keybindings) ;; Shift+direction (global-set-key (kbd "C-x O") (lambda () (interactive) (other-window -1))) ;; back one (global-set-key (kbd "C-x C-o") (lambda () (interactive) (other-window 2))) ;; forward two
Indentation help
(global-set-key (kbd "C-x ^") 'join-line)
If you want to be able to M-x without meta
(global-set-key (kbd "C-x C-m") 'execute-extended-command)
Help should search more than just commands
(global-set-key (kbd "C-h a") 'apropos)
Activate occur easily inside isearch
(define-key isearch-mode-map (kbd "C-o") (lambda () (interactive) (let ((case-fold-search isearch-case-fold-search)) (occur (if isearch-regexp isearch-string (regexp-quote isearch-string))))))
Org-mode
Two global binding for Org-mode (see starter-kit-org)
The Org-mode agenda is good to have close at hand
(define-key global-map "\C-ca" 'org-agenda)
Org-mode supports links, this command allows you to store links globally for later insertion into an Org-mode buffer. See Handling-links in the Org-mode manual.
(define-key global-map "\C-cl" 'org-store-link)
Rgrep
Rgrep is infinitely useful in multi-file projects.
(see (describe-function 'rgrep))
(define-key global-map "\C-x\C-r" 'rgrep)