0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

vimのカラースキームを変更する方法

Posted at

Linuxなどのコンソールでファイルをvimで開いたときに色が見にくい時があります。
そんな時に色を変更する方法をメモがてら共有します。

vimを開いてから変更する方法

①コロン(:)をうちコマンドモードにし「colorscheme」と入力します。colorと入力してtabキーを入力すれば保管されます。
②tabキーを押して使用したいカラースキームを選択します。
例えば「elflord」というカラースキームを変更する際には以下のようになります。

:colorscheme elflord

恒常的にカラースキームを設定する方法

vimを開くたびにカラースキーム設定をするのは面倒です。
そこでデフォルトのカラースキームを設定します。
設定を書き込むのは「vimrc」というファイルです。

vimrcは各ユーザーのホームディレクトリ配下に隠しファイルとして用意されています。
なので以下のように開けます。

vim ~/.vimrc

そして以下のように書き込み保存します。(カラースキームとしてelfordを使用した場合)

colorscheme elflord

vimrcはvimを開いたときに設定として読み込まれますのであとはvimを開けばカラースキームは自動で置き換わってくれます。

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?