如何在組織模式下快速刪除表格中一行的每個元素?
例如,如果我有下表:
| h1 | h2 | h3 | h4 |
|-------+-------+-------+--------|
| foo | bar | baz | bazong |
| lorem | ipsum | dolor | sit |
我想得到這個
| h1 | h2 | h3 | h4 |
|-------+-------+-------+----------|
| +foo+ | +bar+ | +baz+ | +bazong+ |
| lorem | ipsum | dolor | sit |
無需在每個單元格的開頭和結尾手動添加“+”。
答案1
如果將點放在要刪除的行的開頭,則可以使用以下replace-regexp刪除所有內容
C-M-% ;; Query-regexp-replace
" +\(.+?\) +|" RET " +\1+ |" ;; Strikethrough all content up to the next |
然後僅對該行的長度執行此操作(如果您先選擇該行,則可以使用!
.