IntelliJ - Save Actions 플러그인 적용

Hyunjun Jang·2021년 11월 22일

Save Actions 자동정렬 플러그인

자동정렬을 단축키를 사용하여 저장하도 되지만 단축키를 계속 눌러줘야 하는 번거로움이 있고 정렬 작업을 잊고 못하는 경우가 발생한다. 인텔리제이에 저장 시 자동으로 정렬해주는 Save Actions 라는 유용한 플러그인을 제공한다.

설치 및 설정

1. Save Actions 플러그인 설치
Preferences -> Plugins -> Save Actions -> Install

2. IntelliJ 재시작

3. Save Actions 설정
Preferences > Other Settions > Save Actions 이동

  • General 아래 항목 체크

    • Activate save actions on save (before saving each file, performs the configured actions below)
    • Activate save actions on shorcut (default "CTRL + SHIFT + S")
    • Activate save actions on batch
    • No action if compile errors(applied per file)
  • Formatting Actions 아래 항목 체크

    • Optimize imports
    • Reformat file
    • Rearrange fields and methods

  • File Path Inclusions 추가
    • .*.java 을 입력하여 java 파일만 자동 정렬하도록 설정

확인

  • 저장 시 자동정렬이 되는지 확인한다
  • Code -> Reformat Code 선택하여 일괄 적용하여 자동 정렬이 되는지 확인 한다.
profile
Let's grow together😊

1개의 댓글

comment-user-thumbnail
2023년 8월 9일

덕분에 잘 적용했습니다 감사합니다😊

답글 달기