如何以组织模式快速删除表中行的每个元素?
例如,如果我有下表:
| h1 | h2 | h3 | h4 |
|-------+-------+-------+--------|
| foo | bar | baz | bazong |
| lorem | ipsum | dolor | sit |
我想要这个
| h1 | h2 | h3 | h4 |
|-------+-------+-------+----------|
| +foo+ | +bar+ | +baz+ | +bazong+ |
| lorem | ipsum | dolor | sit |
无需在每个单元格的开头和结尾处手动添加“ +”。
如果将点放在要删除的行的开头,则可以使用以下replace-regexp删除所有内容
C-M-% ;; Query-regexp-replace
" +\(.+?\) +|" RET " +\1+ |" ;; Strikethrough all content up to the next |
然后仅对那条线的长度执行此操作(如果先选择该行,则可以使用来对整个区域执行!
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句