0

I want to start using Vi(m) to edit documents, and one use case for me is to make my commits with vi to start learning their commands. Debian comes with both nano and vi installed but when I make a commit the one that opens is nano.

I know how to open a file in vi:

vi -v someFile.ext
vi -y some_other_file.ext2

What I want is to make vi (or any other editor) default when committing with git.

Is there a flag or something that makes me open vi when making a commit by default?

1 Answers1

0

Hi Israel, go to the .gitconfig and change the editor from nano to vi. if there is no editor specified, add an editor to the core section.

  [core]
    excludesfile = -/.gitignore_global
    editor = vi

collins
  • 76
  • 5