2011-04-11 2 views
4

필자는 종종 다음과 같은 코드 블록으로 끝납니다.Emacs에서 공백 블록 삭제

public class CustomFile { 

    public String path; 
    public String name; 





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

public CustomFile 위의 줄에 커서를 놓고 public String name;까지 포함하여 모든 공백을 삭제할 수 있기를 원합니다. 이 작업을 수행 할 수있는 명령 또는 매크로가 있습니까?

답변

10

이 당신이 원하는 모양 : 내가 원하는 정확히 무엇을

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. 
+0

합니다. 감사. –