About software, technology and random things


Using Different Color Schemes with Vim


If you have been using the Linux console text editor vim (or: Vi IMproved), you have probably noticed already that at times - especially in files with a large amount of comments - the default color scheme on a black background is less than ideal. Dark blue on black is pretty hard to read and can strain the eyes a lot.

So today I went out to see if somebody had come up with a solution for this particular problem. I saw people who changed console colors by exporting and overwriting certain system variables, and others who edited the default color scheme.

The simplest solution I have found to this problem is just switching the color scheme. You can do that by typing the following in the already open vim session:

:colorscheme desert

where desert is just an example for the scheme of choice. Desert - for me - has just the right color for comments: aquamarine / light blue.

If you are satisfied with the scheme and would like it to be applied each time you launch vim, you can just edit /etc/vim/vimrc (or in my case with CentOS: /etc/vimrc) and add the following line:

colorscheme desert

with desert again, of course, being the chosen color scheme. This would apply this setting automatically for each vim instance that is launched system-wide. If you do not have access to the system-wide preferences or prefer just using it for your own user account, edit the ~/.vimrc instead.

The blog entry I got this tip from (Asher's space) has further instructions on how to edit existing color schemes and even a link to a blog post that explains how to edit the dark blue color for directories in ls listings with color, but I did not feel the need to go that far. If you are interested in that topic I can only encourage you to visit the original post.

Thanks for reading!

Update (2012-01-04):
Okay, looks like pingback isn't working, so here's a direct link to the original blog post:
vi code highlighting: change the default comments color from dark blue to light blue (


CountSMS – iPhone SMS Counter (Updated: unnecessary)

Update (2011-06-02):
Of course it's been quite some time (I believe with iOS 4.0) since this has been rendered unnecessary. The official Messages app now lets you view the currently used characters. Good job, Apple!

If you ever attempted to send a text message on your iPhone, you will probably have noticed that it is kind of hard to estimate the amount of letters you have entered. Which is quite annoying though, seeing as a miscalculation might cost you money.

When I dug around the internet in order to find a capable app that could replace Apple's standard Messages app, I could only find solutions for jailbroken phones ("BiteSMS", I believe). My iPhone however isn't, and it won't be (at least not for a long time), so that wasn't an option.

A nice little application that doesn't integrate with your standard Messages app (sadly 🙁 ) but however does the job quite well (as in: count the characters AND have a landscape mode keyboard) is CountSMS (iTunes link). It is for free and you can use it with the clipboard of course without any problems whatsoever. It even has nice Copy and Paste buttons on the top corners! 🙂

I know it's not an absolute amazing app, but it gets the job done (a lot better than Apple's standard Messages app! Shame on you, if I might say so 🙂 )

Thanks for reading and I hope you can benefit from that.

%d bloggers like this: