Sometimes the colors are hard to see when opening a file with vim on a console such as Linux. In such a case, I will share a memo on how to change the color.
(1) Set the colon (:) to the command mode and enter "color scheme". Type color and press the tab key to save it. ② Press the tab key and select the color scheme you want to use. For example, when changing the color scheme "elflord":
:colorscheme elflord
Setting the color scheme every time you open vim is a hassle. So set the default color scheme. The settings are written in a file called "vimrc".
vimrc is prepared as a hidden file under each user's home directory. So you can open it as follows.
vim ~/.vimrc
Then write and save as follows. (When using elford as the color scheme)
colorscheme elflord
vimrc is loaded as a setting when you open vim, so if you open vim, the color scheme will be replaced automatically.
Recommended Posts