Emacs copy matching lines

后端 未结 5 1863
北恋
北恋 2020-12-13 16:13

In Emacs how can I easily copy all lines matching a particular regex? Preferably highlighting the matching lines as I type.

occur gets partway there by

5条回答
  •  天涯浪人
    2020-12-13 16:51

    You can use keep-lines to get what you want, copy them, and then undo. For the opposite, there is also flush-lines to get rid of lines you don't want.

提交回复
热议问题