Org Mode Basics In Doom Emacs
目录
- Getting Started with Org Mode
- A new headline
- Motion
- Structure Editing
- Some advanced editing thanks to Evil Mode!
- 插入 Snippets
- TODO 设置标签 : SPC-m-q TODO
- 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
- Move current row UP : M-k
- Move current row DOWN : M-j
- Move current column LEFT : M-h
- Move current column RIGHT : M-l
- Insert new column : M-S-l
- Delete current column : M-S-h
- Insert new row : M-S-j
- Delete current row : M-S-k
- Commands available inside tables
- Creating a table
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 : SPC-m-h
org-toggle-item : SPC-m-i
- Unordered list item one
- Unordered list item two
- You can use dash instead of +
- Another list item.
- Ordered list item one.
- Ordered list item two.
A new headline
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
下一个/前一个标题 : gj/gk OR CTR-j/k
move parent/child element : gh/gl
Structure Editing
在当前 level 插入标题或列表 : M-RET
在子树后插入新标题 : C-RET
升级/降级标题 : M-h/l OR M-LEFT/RIGHT
升级/降级当前子树 : M-S-h/l OR M-S-LEFT/RIGHT
上/下移动子树/列表 : M-j/k
上/下移动列表,但不移动子树 : M-S-j/k
Some advanced editing thanks to Evil Mode!
select an element : vae
delete an element : dae
select a subtree : vaR
delete subtree : daR
yank subtree : yiR
插入 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
TODO 设置标签 : SPC-m-q TODO
TODO example one
TODO example two : S-RIGHT
移除 TODO : S-LEFT
切换 TODO 状态 : SPC-m-t
org-schedule : SPC-m-d-s
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
标签搜索 : 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
ONE | TWO | THREE | FOUR |
---|---|---|---|
This is a sentence | Some stuff | More | ffffffff |
This is a sentence | Some stuff | ||
Some stuff |
Move current row UP : M-k
Move current row DOWN : M-j
Move current column LEFT : M-h
Move current column RIGHT : M-l
Insert new column : M-S-l
Delete current column : M-S-h
Insert new row : M-S-j
Delete current row : M-S-k
Commands available inside tables
The following commands work when the cursor isinside a table. Outside of tables, the same keys may have other functionality.