in Emacs, edit multiple lines at once

前端 未结 8 1992
天涯浪人
天涯浪人 2020-12-22 16:29

I believe textmate has a mode where if you start typing, the same thing will be entered on all the lines you\'ve selected. Is there something similar to this in emacs? I\'m

8条回答
  •  甜味超标
    2020-12-22 17:07

    You can use the following commands (and keys) to accomplish this:

    • open-rectangle (C-x, r, o) add spaces
    • kill-rectangle (C-x, r, k) delete
    • clear-rectangle (C-x, r, c) replace with spaces
    • M-x string-insert-rectangle fill with specified text

    Here is a complete description of those features: http://www.gnu.org/software/emacs/manual/html_node/emacs/Rectangles.html

提交回复
热议问题