Org Mode Basics In Doom Emacs

Table of Contents

1. Org Mode Basics In Doom Emacs

1.1. Getting Started with Org Mode

Read org mode manual with M-x org-info.
M-RET to insert new headline at current level.

1.1.1. org-toggle-heading : SPC-m-h

1.1.2. org-toggle-item : SPC-m-i

  • Unordered list item one
  • Unordered list item two
    • You can use dash instead of +
    • Another list item.
      1. Ordered list item one.
      2. Ordered list item two.

1.2. A new headline

1.2.1. Level 2

1.2.1.1. Level 3
  1. Level 4
    1. Level 5
      1. Level 6

1.2.2. Rotate current subtree between states: TAB

1.2.3. Rotate entire buffer between states : Shift-TAB

1.2.4. close (fold) the tree : zc

1.2.5. open (unfold) the tree : zo

1.2.6. fold everything : zM

1.2.7. unfold everything : zR

1.3. Motion

1.3.1. move left/down/up/right : h/j/k/l

1.3.2. next/prev heading (same level) : gj/gk OR CTR-j/k OR ]h/[h

1.3.3. move parent/child element : gh (NOT gl)

1.3.4. [[, ]] move next visible heading (may be a different level)

1.4. Structure Editing

1.4.1. insert new heading/item at current level : M-RET

1.4.2. insert new heading after subtree : C-RET

1.4.3. insert new child heading : C-M-RET

1.4.4. promote/demote heading : M-h/l OR M-LEFT/RIGHT

1.4.5. promote/demote current subtree : M-S-h/l OR M-S-LEFT/RIGHT

1.4.6. move subtree/list item up/down : M-j/k

1.4.7. move list item up/down but not subtree : M-S-j/k

1.4.8. combine with visual mode to bulk editing multiple nodes!

1.5. Some advanced editing thanks to Evil Mode!

1.5.1. select an element : vae

1.5.2. delete an element : dae

1.5.3. select a subtree : vaR

1.5.4. delete subtree : daR

1.5.5. yank subtree : yiR

1.6. Insert Snippets

1.6.1. SPACE-i-s

1.6.2. bang : #!/usr/bin/env bash

1.6.3. Insert a license : pick a free license

1.6.4. current time : Sun Feb 9 20:06:29 2020

1.6.5. pi :

3.141592654

1.7. TODO Set TAGS with : SPC-m-q   TODO

1.7.1. TODO example one

1.7.2. TODO example two : S-RIGHT

1.7.3. To remove TODO : S-LEFT

1.7.4. toggle the todo state : SPC-m-t

1.7.5. org-schedule : SPC-m-d-s

1.7.6. org-priority : SPC-m-p

1.7.7. To create checkbox : - [ ] [1/3] [33%]

To create counters on the heading [/] [%] ESC ENTER

  • [ ] eggs
  • [ ] milk
  • [X] beer : C-c C-c OR RET

1.7.8. Move this file to front of agenda : C-c-[

1.7.9. Org-agenda : SPC-o-a

1.7.10. Tag search : SPC-o-a-m

1.8. Tables

1.8.1. Creating a table

1.8.1.1. just start typing, e.g.|Name|Phone|Age RET |- TAB
1.8.1.2. convert region to table : C-c |
1.8.1.3. Go to forward/backward by cell : TAB/S-TAB
1.8.1.4. … separator at least 3 spaces : C-3 C-c |
1.8.1.5. Make org table headline : SPC m b -
1.8.1.6. Duplicate a field in the cell below : S-RET
ONE TWO THREE FOUR
This is a sentence Some stuff More ffffffff
This is a sentence Some stuff    
  Some stuff    
1.8.1.7. Move current row UP : M-k
1.8.1.8. Move current row DOWN : M-j
1.8.1.9. Move current column LEFT : M-h
1.8.1.10. Move current column RIGHT : M-l
1.8.1.11. Insert new column : M-S-l
1.8.1.12. Delete current column : M-S-h
1.8.1.13. Insert new row : M-S-j
1.8.1.14. Delete current row : M-S-k

1.8.2. Commands available inside tables

The following commands work when the cursor is inside a table.
Outside of tables, the same keys may have other functionality.

1.9. org-roam

1.10. Global config

1.10.1. #+SEQ_TODO

Allows us to overwrite in the current file the TODO states

1.11. Agenda view

Author: Derek Taylor

Created: 2025-02-08 Sat 02:21