gpt4 book ai didi

emacs - 在 Emacs 中删除空白 block

转载 作者:行者123 更新时间:2023-12-04 22:51:00 26 4
gpt4 key购买 nike

我经常得到这样的代码块:

public class CustomFile {

public String path;
public String name;





public CustomFile (String pathToFile, String dbName) {
path = pathToFile;
name = dbName;
}
}

我希望能够将光标放在 public CustomFile 上方的行上并且能够删除所有的空白,直到但不包括 public String name; .是否有允许我执行此操作的命令或宏?

最佳答案

这看起来像你想要的:

C-x C-o runs the command delete-blank-lines, which is an interactive
compiled Lisp function in `simple.el'.

It is bound to C-x C-o.

(delete-blank-lines)

On blank line, delete all surrounding blank lines, leaving just one.
On isolated blank line, delete that one.
On nonblank line, delete any immediately following blank lines.

关于emacs - 在 Emacs 中删除空白 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5627064/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com