cygwin xterm-256color mintty

Recently I’ve decided to use the emacs version that comes with cygwin. Before I’ve use EmacsW32 which was quite ok, but wasn’t as integrated with cygwin as I would have liked it to be.

Now that cygwin’s xterm even has 256 color support even in text mode (so you don’t have to start cygwin’s X server…) I thought it makes sense to switch to cygwin emacs (in text mode). By having 256 colors I would be able to get my favorite syntax highlighting color scheme even in text mode.

Now in order to get 256 colors you have to set the terminal type of mintty (the default xterm in cygwin) to xterm-256color. You can do this either by clicking on the upper left cygwin icon and choose “Options->Terminal-Type” or by directly edition you ~/.mintty file. “man mintty” will be your friend anyway.

Now in order to let emacs know that it has 256 colors you also have to set your TERM environment variable to xterm-256color.

If you now start emacs and type “M-x list-colors-display” you will see that you have 256 color for customizing emacs faces.