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 error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

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!

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:
vim ,editor ,vimrc ,comments ,color

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}