Making vim (vi) text color easier to see on WSL-Ubuntu

Table of Content

Comments in .bashrc hard to see

I'm using WSL-Ubuntu session of MobaXterm on Ubuntu 18.04LTS on WSL, but when I open .bashrc with vi (vim), comments are hard to see. So make the text color easier to see. Referring to this site (in Japanese), let's introduce a color scheme of molokai to make it easier to see.

Installing molokai

Start a terminal, create vim's personal setting directory .vim in the home directory, install molokai, and open .vimrc using vi.

$ mkdir .vim
$ cd .vim
$ mkdir colors
$ git clone https://github.com/tomasr/molokai
Cloning into'molokai'...
remote: Enumerating objects: 148, done.
remote: Total 148 (delta 0), reused 0 (delta 0), pack-reused 148
Receiving objects: 100% (148/148), 27.68 KiB | 885.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
$ mv molokai/colors/molokai.vim ./colors/
$ cd ..
$ vi .vimrc

Edit .vimrc as follows:

syntax on
colorscheme molokai
set t_Co=256
hi Comment ctermfg=102
hi Visual ctermbg=255

opening the .bashrc using vi, it should be easier to see.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.