Emacs org mode -- table

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)


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值