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?

gefragt vor einem Jahr300 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen