웹개발

[이클립스] 공백 표시, 탭 입력 시 스페이스 입력

옛날에 2024. 2. 8. 10:52

 

 

Window > Preferences > 검색어 white 입력 >  General >  Editors > Text Editors

위의 경로에 > Show whitespace characters 체크

 

체크해두면 탭, 엔터, 스페이스 표시되어 개발 표준을 맞추기 수월.

 

 

 

같은 설정화면에서 Displayed tab width 값이 4인 것을 확인하고 Insert spaces for tabs 를 체크하면, 

키보드의 탭키 입력시 스페이스바를 네번 입력한 것으로 처리.

 

※ 우클릭 > Source > Format(Ctrl + Shift + F) 관련 설정은 JAVA, WEB(javascript,  css, html), XML 파일마다 포맷 설정 가능.

JAVA

Window > Preferences > Java > Code Style > Formatter > New... > New Profile 생성 > Indentation 영역에서 Tab policy, Indentation size,  Tab size 각 항목을 수정.

 

WEB(javascript,  css, html)

- javascript

Window > Preferences > Web > Client-sideJavaScript > Formatter > New... > New Profile 생성 > Indentation 탭 > General settings 영역에서 Indentation 영역에서 Tab policy, Indentation size,  Tab size 각 항목을 수정.

- css

Window > Preferences > Web > CSS Files > Editor > Indent  using spaces 항목을 선택 후 값 수정

- html

Window > Preferences > Web > HTML Files > Editor > Indent  using spaces 항목을 선택 후 값 수정

 

XML

Window > Preferences > XML > Editor > Indent  using spaces 항목을 선택 후 값 수정