org-config-examples.org 2.9 KB

GTD setups

General Configuration/Customization

Some useful keybindings

Here is a subset of my personal org-mode key-bindings that others may find useful.

(add-hook 'org-mode-hook (lambda () (local-set-key "\M-n" 'outline-next-visible-heading) (local-set-key "\M-p" 'outline-previous-visible-heading) ;; table (local-set-key "\M-\C-w" 'org-table-copy-region) (local-set-key "\M-\C-y" 'org-table-paste-rectangle) (local-set-key "\M-\C-l" 'org-table-sort-lines) ;; display images (local-set-key "\M-I" 'org-toggle-iimage-in-org) ;; fix tab (local-set-key "\C-y" 'yank) ;; yasnippet (allow yasnippet to do it's thing in org files) (org-set-local 'yas/trigger-key [tab]) (define-key yas/keymap [tab] 'yas/next-field-group)))

References and explanations of the above:

  • see * iimage in org (display images in org files) for an explanation of
  • the =org-toggle-iimage-in-org= function (inline images in org-mode files).
  • yasnippet is a tools for snippet expansion in Emacs. Since Org-mode is
  • descendant of text-mode, all text snippets will work inside of org files, I also use the following to simplify the creation of example and source code blocks.

block

#name : #+begin_...#+end_

$0

iimage in org (display images in org files)

Thanks to many on the mailing list for this great addition to Org-Mode. See iimage for information on iimage-minor-mode.

(add-to-list 'iimage-mode-image-regex-alist (cons (concat "\\[\\[file:\\(~?" iimage-mode-image-filename-regex "\\)\\]") 1))

(defun org-toggle-iimage-in-org () "display images in your org file" (interactive) (if (face-underline-p 'org-link) (set-face-underline-p 'org-link nil) (set-face-underline-p 'org-link t)) (iimage-mode))