Emacs

- 146 words - 1 minute
(setq custom-file "~/.emacs.d/custom-file.el")
(load custom-file)

(desktop-save-mode 1)
(server-mode 1)

(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)

(global-set-key (kbd "<f1>") 'fit-window-to-buffer)
(global-set-key (kbd "<f6>") 'other-window)
(global-set-key (kbd "<f7>") 'previous-buffer)
(global-set-key (kbd "<f8>") 'next-buffer)
(global-set-key [f9] 'global-hl-line-mode)

(global-set-key (kbd "M-<down>") 'scroll-up-line)
(global-set-key (kbd "M-<up>") 'scroll-down-line)

(add-hook 'python-mode-hook 'outline-minor-mode)
; hide
(define-key cm-map "q" 'outline-hide-sublevels)
(define-key cm-map "t" 'outline-hide-body)
(define-key cm-map "o" 'outline-hide-other)
(define-key cm-map "c" 'outline-hide-entry)
(define-key cm-map "l" 'outline-hide-leaves)
(define-key cm-map "d" 'outline-hide-subtree)
; show
(define-key cm-map "a" 'outline-show-all)
(define-key cm-map "e" 'outline-show-entry)
(define-key cm-map "i" 'outline-show-children)
(define-key cm-map "k" 'outline-show-branches)
(define-key cm-map "s" 'outline-show-subtree)
; navigate
(define-key cm-map "u" 'outline-up-heading)
(define-key cm-map "n" 'outline-next-visible-heading)
(define-key cm-map "p" 'outline-previous-visible-heading)
(define-key cm-map "f" 'outline-forward-same-level)
(define-key cm-map "b" 'outline-backward-same-level)
(global-set-key "\M-o" cm-map)

(global-set-key [M-left] 'outline-hide-body)
(global-set-key [M-right] 'outline-show-all)
; (global-set-key [M-up] 'outline-previous-heading)
; (global-set-key [M-down] 'outline-next-heading)
(global-set-key [S-M-left] 'outline-hide-sublevels)
(global-set-key [S-M-right] 'outline-show-children)
(global-set-key [C-M-up] 'outline-previous-visible-heading)
(global-set-key [C-M-down] 'outline-next-visible-heading)