As someone who has just recently started writing programming books [1] I'm really excited to see more such tools!<p>Some thoughts:<p>1. Code examples are the biggest problem to me in the tools that I tried. There's many little things about them, that need to look right - line numbers, display on kindle, line breaks<p>2. At the beginning, I've used Git and vim for writing in Markdown. However, at some point I realised that I wasn't efficient - I switched to Scrivener [2] and dropped the idea of using Git. In my case, it made me much more productive.<p>3. Writing an ebook is different than writing code. You probably don't need much of the history.<p>4. Research is for me the biggest part of writing, experimenting with different ideas, collecting code samples. It's good to have a proper tool to support it. In my case, Scrivener [2] was a huge improvement.<p>5. I use a combination of Scrivener, Leanpub, Dropbox and getdpd [3] for the whole project. Scrivener for research and notes organisation, Leanpub for generating the result files (PDF, mobi, epub), Dropbox for syncing those two. Getdpd for the selling part.<p>[1] <a href="http://rails-refactoring.com/" rel="nofollow">http://rails-refactoring.com/</a><p>[2] <a href="http://literatureandlatte.com/scrivener.php" rel="nofollow">http://literatureandlatte.com/scrivener.php</a><p>[3] <a href="http://getdpd.com/" rel="nofollow">http://getdpd.com/</a>