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?

asked a year ago285 views
1 Answer
0
Accepted Answer

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
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions