The Artima Developer Community
Sponsored Link

Agile Buzz Forum
A Proper Cygwin Environment

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Thomas Wheeler

Posts: 24
Nickname: twheeler
Registered: Jan, 2013

Thomas Wheeler is a Senior Consultant for Improving Enterprises, based in Dallas TX.
A Proper Cygwin Environment Posted: Jan 28, 2013 12:37 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Thomas Wheeler.
Original Post: A Proper Cygwin Environment
Feed Title: Random Artifacts
Feed URL: http://randomartifacts.blogspot.com/feeds/posts/default
Feed Description: Generally about agile, software development, and technical tips with occasional forays into other subjects.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Thomas Wheeler
Latest Posts From Random Artifacts

Advertisement
I've been spending more time in Cygwin lately, after having decided to wean myself from Ye Olde Windows Command Prompt. (Actually, I've been using 4NT since back in the day when it was called 4DOS and ran as a replacement for COMMAND.COM.) As with anything else I use, "out of the box" is just a starting point, and I've spent some time creating a proper Cygwin environment. Here's what I've done:


Mapping Cygdrive

By default, Cygwin mounts all Windows drives under the /cygdrive/ mount point. Who wants to look at and type that all day? Certainly not me. Edit /etc/fstab and replace the existing line:
none /cygdrive cygdrive binary,posix=0,user 0 0
with:
none / cygdrive binary,posix=0,user 0 0
Now I can type cd /c/Users/ instead of cd /cygdrive/c/Users.


Mintty

Cygwin normally runs in a standard Windows command window. There are better ways to run Cygwin, and Mintty is one of the best. Bring up an Explorer window, navigate to cygwin/bin, and find mintty.exe. Make a shortcut and move it someplace more convenient. To make Mintty read your ~/.bash_profile you'll need to edit the command line parameters. Right-click your shortcut and select Properties. Add -e /bin/bash --login to the end of the command line. Now bash will run your ~/.bash_profile when you start Mintty.


Colors and Fonts

(Colors and fonts are an awfully subjective matter, so I'll understand if you disagree with some of the specifics of this section.)

After a bit of initial doubt, I've become a fan of the Solarized color scheme. A tip of the hat to Ethan for creating a very readable color scheme that can be applied to just about any application. So let's Solarize Cygwin.


Mintty

I have much love for Mintty, but its default colors are boring. To Solarize them, go to mintty-colors-solarized. Select either .mintty--solarized-dark or .mintty--solarized-light and insert the contents of this file into your ~/.minttyrc file. (Which may not yet exist.)

dircolors (ls)

Solarized directory colors can be found at dircolors-solarized. I've put the contents of dircolors.ansi-dark into my ~/.dir_colors. Set up an alias for ls and evaluate dircolors in ~/.bashrc:
eval `dircolors ~/.dir_colors`
...
alias ls="ls --color"


vim

First, I'm not a vim bigot. I'm sure Emacs is wonderful, I just never learned it. You'll have to go elsewhere to get your Solarized Emacs love. Now, for those of you still reading, go to vim-colors-solarized and get colors/solarized.vim. Put this file into ~/.vim/colors. Edit (create if necessary) ~/.vimrc and ensure it contains:
syntax enable
set background=dark
colorscheme solarized
That wasn't so hard, was it?

Fonts

There are plenty of monospaced fonts available on the web, some very good. I have been going back and forth between Consolas and Adobe's recently released Source Code Pro. Both are very well designed; I find them to be equally readable, and I'm pretty picky about fonts. Another very good font is Proggy, which I used for years. At the moment I'm using Consolas at 9 point bold, but that may change....

More to come....

Read: A Proper Cygwin Environment

Topic: Software Development Linkopedia January 2013 Previous Topic   Next Topic Topic: Product Ownership in a Nutshell

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use