티스토리 뷰

반응형

1. Autojump

autojump 는 fs를 빠르게 탐색하는 플러그인으로 brew를 활용하여 설치합니다. 

$ brew install autojump

 

설치 후 .zshrc plugins에 autojump를 추가합니다. 

71 plugins=(git autojump)

 

사용법

> foo를 포함하는 디렉토리 점프

$ j foo

> 현재 디렉토리의 자식 디렉토리로 점프

$ jc bar

> Jump하지 않고 해당 디렉토리를 File Manager로 실행 (Mac finder, windows explorer...)

$ jo foo
$ jco bar

 

 

 


2. Auto Suggestions

자동 제안은 터미널 입력 시 history 기반 단어를 추천해줍니다. 

이 역시 brew 를 활용하여 설치가 가능합니다.

$ brew install zsh-autosuggestions

 

설치 후 zsh-autosuggestions.zsh 를 .zshrc의 마지막에 추가해야 합니다.

$ echo "source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc

사용법

> 전체 제안 Command 적용 : End 

> 단어 단위로 제안 : option + ->

 

아래와 같이 적용된 걸 확인할 수 있습니다.

 


 

3. Syntax Highlighting

zsh 내에서 해당 명령어가 실행가능한 것인지 에러인지 체크가 가능한 플러그인입니다. 

$ brew install zsh-syntax-highlighting

 

다음으로 plugin manager 방식으로 git 명령어를 활용하여 plugins 디렉토리에 다운받는 명령어입니다.

$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

 

 

여기도 마찬가지로 .zshrc의 마지막에 zsh-syntax-highlighting.zsh 를 추가합니다. 

$ echo "source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${HOME}/.zshrc

 

새 Tab을 열고 색상이 변경되면 적용이 완료된 것입니다.

 

반응형
댓글
공지사항