horizontal line : |-----+---+---+---+-------+---+---|
‘|’ is the column separator,
A table is re-aligned automatically each time you press <TAB> or <RET> or C-c C-c inside the table. The indentation of the table is set by the first line. Any line starting with ‘|-’ is considered as a horizontal separator line and will be expanded on the next re-align to span the whole table width. So, to create the above table, you would only type |name|Phone|Age| RET |- TAB
Creation and conversion
C-c | (org-table-create-or-convert-from-region) Convert the active region to table.
default whitespace as separator
every line has comma, it will be comma as separator
C-u N C-c | at least N consecutive space or TAB as separator
C-u C-u C-c | force TAB as separator
Re-aligning and field motion
C-c C-c (org-table-align) Re-align the table without moving the cursor.
S-<TAB> (org-table-previous-field)
M-a (org-table-beginning-of-field) beginning of the current table or the previous field.
M-e (org-table-end-of-field) end of the current table or the next field.
Column and row editing
M-<left> (org-table-move-column-left)
M-<right> (org-table-move-column-right)
M-S-<left> (org-table-delete-column) Kill the current column.
M-S-<right> (org-table-insert-column) relative with M-S-<left>,new column to the left of cursor
M-<up> (org-table-move-row-up)
M-<down> (org-table-move-row-down)
M-S-<up> (org-table-kill-row)
M-S-<down> (org-table-insert-row) new row above the current row
C-c - (org-table-insert-hline) new horizontal line below current row
C-c <RET> (org-table-hline-and-move) new horizontal line below current row and move the cursor
Calculations
C-c + (org-table-sum) Sum the numbers in the current column/region.show in buffer,C-y to paste
S-<RET> (org-table-copy-down) copy current field down to next row and move cursor along with it
Miscellaneous
M-x org-table-import Import a file as a table. The table should be TAB or whitespace separated.
M-x org-table-export Export the table, by default as a TAB-separated file.
Column width and alignment
make a table with several columns having a fixed width,one field anywhere in the column may contain just the string ‘<N>’ where ‘N’ is an integer specifying the width of the column in characters. then type C-c C-c to align.
C-c ` open a new window to show the hidden part
The Orgtbl minor mode
M-x orgtbl-mode toggle org table as minor mode
Turn it on by default:(add-hook 'message-mode-hook 'turn-on-orgtbl)
‘|’ is the column separator,
A table is re-aligned automatically each time you press <TAB> or <RET> or C-c C-c inside the table. The indentation of the table is set by the first line. Any line starting with ‘|-’ is considered as a horizontal separator line and will be expanded on the next re-align to span the whole table width. So, to create the above table, you would only type |name|Phone|Age| RET |- TAB
Creation and conversion
C-c | (org-table-create-or-convert-from-region) Convert the active region to table.
default whitespace as separator
every line has comma, it will be comma as separator
C-u N C-c | at least N consecutive space or TAB as separator
C-u C-u C-c | force TAB as separator
Re-aligning and field motion
C-c C-c (org-table-align) Re-align the table without moving the cursor.
S-<TAB> (org-table-previous-field)
M-a (org-table-beginning-of-field) beginning of the current table or the previous field.
M-e (org-table-end-of-field) end of the current table or the next field.
Column and row editing
M-<left> (org-table-move-column-left)
M-<right> (org-table-move-column-right)
M-S-<left> (org-table-delete-column) Kill the current column.
M-S-<right> (org-table-insert-column) relative with M-S-<left>,new column to the left of cursor
M-<up> (org-table-move-row-up)
M-<down> (org-table-move-row-down)
M-S-<up> (org-table-kill-row)
M-S-<down> (org-table-insert-row) new row above the current row
C-c - (org-table-insert-hline) new horizontal line below current row
C-c <RET> (org-table-hline-and-move) new horizontal line below current row and move the cursor
Calculations
C-c + (org-table-sum) Sum the numbers in the current column/region.show in buffer,C-y to paste
S-<RET> (org-table-copy-down) copy current field down to next row and move cursor along with it
Miscellaneous
M-x org-table-import Import a file as a table. The table should be TAB or whitespace separated.
M-x org-table-export Export the table, by default as a TAB-separated file.
Column width and alignment
make a table with several columns having a fixed width,one field anywhere in the column may contain just the string ‘<N>’ where ‘N’ is an integer specifying the width of the column in characters. then type C-c C-c to align.
C-c ` open a new window to show the hidden part
The Orgtbl minor mode
M-x orgtbl-mode toggle org table as minor mode
Turn it on by default:(add-hook 'message-mode-hook 'turn-on-orgtbl)