4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

git commit vimじゃない vimに変更

Last updated at Posted at 2020-04-27

git commit 時にvimじゃないエディタが開いたらびっくりしますよね(ついさっきした)
その際の簡単な対処法メモを残しておきます

vim じゃないエディタの終了方法

  • nano: ctrl + x と入力

  • (emacs: ctrl + x ctrl + c と入力)

git commit 時に開くエディタを vim に変更

コマンド

下記コマンドでvimに変更できます

git config --global core.editor "$(which vim)"

簡単な説明

git config --global core.editor "/path/to/editor"
Git のデフォルトエディタを設定する

which COMMAND
COMMAND のフルパスを表示する

$(COMMAND)
COMMAND をサブシェルで実行し、その実行結果が文字列(コマンド)として出力/実行される

参考ページ

4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?