Git Default/Core Editor - Nano

0

Each time my cloud9 ec2 instance is booted up, it changes my git core.editor to "nano". I want my git core.editor to be "vim".

I have tried to set it up by directly editing the ~/.gitconfig file and also issuing the command git config --global core.editor "vim". While that works temporarily, it reverts back to "nano" when the ec2 instance is rebooted either by me or by aws.

How do I permanently change my git core.editor to "vim" in Cloud9?

질문됨 일 년 전300회 조회
1개 답변
0
수락된 답변

The .bashrc of the Linux user of Cloud9 contains a setting to force nano, so you can force vim by making the following changes.

$ vim ~/.bashrc  

~omission (of middle part of a text)~

# modifications needed only in interactive mode
if [ "$PS1" != "" ]; then
    # Set default editor for git
    #git config --global core.editor nano                      ## <--- Comment out
    git config --global core.editor 'vim -c "set fenc=utf-8"'  ## <--- Add
profile picture
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠