Skip to content

Instantly share code, notes, and snippets.

@samuelematias
Created April 25, 2022 19:38
Show Gist options
  • Save samuelematias/7711b3dc657522065068a9c3748de47f to your computer and use it in GitHub Desktop.
Save samuelematias/7711b3dc657522065068a9c3748de47f to your computer and use it in GitHub Desktop.

Org Mode Basics In Doom Emacs

Getting Started with Org Mode

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

org-toggle-heading : ,h

org-toggle-item : , 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.

A new headline

Level 2

Level 3

Level 4

Level 5
Level 6

Rotate current subtree between states: TAB

Rotate entire buffer between states : S-TAB

close (fold) the tree : zc

open (unfold) the tree : zo

fold everything : zM

unfold everything : zR

Motion

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

next/prev heading : gj/gk

Structure Editing

insert new heading after subtree : C-RET

promote/demote heading : , s h / , s l

promote/demote current subtree : , s j / , s k

Some advanced editing thanks to Evil Mode!

select an element/subtree : vae

delete an element/subtree : dae

Insert Snippets

SPACE-i-s

bang : #!/usr/bin/env bash

Insert a license : pick a free license

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

pi :

3.141592654

Set TAGS with : SPC-m-q

example one

example two : S-RIGHT

To remove TODO : S-LEFT

toggle the todo state : SPC-m-t

org-schedule : , d s

[#A] org-priority : SPC-m-p

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

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

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

Org-agenda : SPC-o-a

Tag search : SPC-o-a-m

Tables

Creating a table

just start typing, e.g.|Name|Phone|Age RET |- TAB

convert region to table : C-c |

Go to forward/backward by cell : TAB/S-TAB

… separator at least 3 spaces : C-3 C-c |

Make org table headline : SPC m b -

Duplicate a field in the cell below : S-RET

ONETWOTHREEFOUR
This is a sentenceSome stuffMoreffffffff
This is a sentenceSome stuff
Some stuff

Commands available inside tables

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment