Skip to content

Latest commit

 

History

History
84 lines (64 loc) · 2.27 KB

ome-keybindings.org

File metadata and controls

84 lines (64 loc) · 2.27 KB

Oh My Emacs Keybindings

This is part of oh-my-emacs.

Key bindings for oh-my-emacs, mainly imported from emacs24-starter-kit.

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)

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)

Window switching.

(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)

Occur

Occur can show all lines in the current buffer containing a match for REGEXP.

(global-set-key (kbd "C-c o") 'occur)

RET

(global-set-key (kbd "RET") 'reindent-then-newline-and-indent)