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?

preguntada hace un año300 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas