Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Fixing vim Editor for Dark Backgrounds so Comments Are Not Dark Blue

DZone's Guide to

Fixing vim Editor for Dark Backgrounds so Comments Are Not Dark Blue

Most developers know the pain that is opening up vim with the default settings, especially when it comes to viewing comments. Check out a quick fix that can help alleviate that pain.

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

Here is a simple command that can fix your vim editor for dark backgrounds so that your comments are not showing up in dark blue (unreadable).

Example screenshot:

vim-example










The temporary fix is to run the following command in the vim editor:

:set background=dark

Instead of:

:set background=light

The permanent fix for this is to add the command inside $HOME/.vimrc file:

:set background=dark

Please note that when you’re adding the property into the .vimrc file, you do not need to prefix it with “:”

Cheers!

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.

Topics:
vim ,editor ,vimrc ,comments ,color

Published at DZone with permission of Venkatt Guhesan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}