<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mimijidi &#187; textmate</title>
	<atom:link href="http://otherside.mimijidi.com/entries/tag/textmate/feed/" rel="self" type="application/rss+xml" />
	<link>http://otherside.mimijidi.com</link>
	<description></description>
	<lastBuildDate>Wed, 09 Jun 2010 11:50:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>News About TextMate 2</title>
		<link>http://otherside.mimijidi.com/entries/news-about-textmate-2/</link>
		<comments>http://otherside.mimijidi.com/entries/news-about-textmate-2/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 12:53:52 +0000</pubDate>
		<dc:creator>Zhen Sun</dc:creator>
				<category><![CDATA[Application]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://otherside.mimijidi.com/?p=75</guid>
		<description><![CDATA[Finally Allan Odgaard posted a new blog about the current state of TextMate 2. So where does development stand for 2.0? It feels to me like most of the modules are getting close, say 90%. But as they say, on the horizon, mountains look small. The requests for TextMate 1 have mostly been incremental additions [...]]]></description>
			<content:encoded><![CDATA[<p>Finally <a href="http://blog.macromates.com/">Allan Odgaard </a> posted a new blog about <a href="http://blog.macromates.com/2009/working-on-it/">the current state of TextMate 2</a>.</p>

<blockquote>
  <p>So where does development stand for 2.0? It feels to me like most of the<br />
  modules are getting close, say 90%. But as they say, on the horizon,<br />
  mountains look small.</p>
  
  <p>The requests for TextMate 1 have mostly been incremental additions such<br />
  as split views, chunked undo, and editing over SFTP. But TextMate 2 is<br />
  about more than new surface features. Every part has been completely<br />
  rewritten to take advantage of the lessons learned from the years of<br />
  version 1. Not only are the low-level data structures chosen for<br />
  increased flexibility, but the abstractions on which TextMate is<br />
  built—snippets, scope-based language grammars, context-dependent<br />
  settings—have been rethought and are more powerful than ever. In the<br />
  coming months, I’ll try to describe some of these new abstractions, but<br />
  for now, know that I am excited about the new ideas involved.</p>
</blockquote>

<p>Sounds great. After many years of hearing &#8220;TextMate 2 is still under development&#8221; I was afraid that TextMate 2 would become the new <a href="http://en.wikipedia.org/wiki/Duke_Nukem_Forever">Duke Nukem Forever</a>. Glade] to here it&#8217;s still alive. I really hope they&#8217;ve already found a better solution to <a href="http://otherside.mimijidi.com/entries/cjk-in-textmate/">handle CJK characters</a> since that&#8217;s the main reason I switched to <a href="http://www.barebones.com/products/bbedit/">BBEdit</a> a few months ago. (And I&#8217;m happy with BBEdit right now, solid and sound.)</p>

<blockquote>
  <p>I have enlisted a technical writer to help bring this blog back to life,<br />
  and I’ll try to communicate more of TextMate’s status and direction<br />
  through him.</p>
</blockquote>

<p>Hopes we can hear more about the progress from him, I&#8217;m pretty curious about how TextMate 2 will looks like. And hopefully we can see a Alpha build months later?</p>

<p>Keep up the good work, Allan! (And please post more news about TextMate 2&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://otherside.mimijidi.com/entries/news-about-textmate-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextMate 内的中文字符显示与输入</title>
		<link>http://otherside.mimijidi.com/entries/cjk-in-textmate/</link>
		<comments>http://otherside.mimijidi.com/entries/cjk-in-textmate/#comments</comments>
		<pubDate>Mon, 25 Dec 2006 21:37:36 +0000</pubDate>
		<dc:creator>Zhen Sun</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Chinese]]></category>
		<category><![CDATA[cjk]]></category>
		<category><![CDATA[Japanese]]></category>
		<category><![CDATA[Korean]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://otherside.mimijidi.com/entries/cjk-in-textmate/</guid>
		<description><![CDATA[TextMate 是 Mac OS X 下著名的编辑器，相信很多看过 Ruby on Rails Screencast 的开发者都对它有深刻的印象 —— 流畅的生成固定格式代码(Snipper)，方便的 Project 管理，以及像老牌编辑器 BBEdit 一样使用 unix 命令来过滤文本内容。但是 TextMate 对于在开发过程中使用中、日、韩文字的开发着来说却有一些麻烦。 无法正确显示 CJK 字符 无法正确输入 CJK 字符 好在 Hetima 提供了两种可以间接解决问题的办法： 显示 CJK 字符 大多数 CJK 字体都是 2 字宽，在 TextMate 下会和后边的 CJK 字符重叠在一起。（没有使用标准的 NSView？）对于这个问题 Hetima 提出了用 缩小日文字体宽度 的办法来解决，不过实际上最后的效果有点见仁见智。我照猫画虎的用中文字体做了一些实践，下面把大致的步骤写一下。 字体变形有许多选择：从超贵的 FontGrapher 到开放原始码的 FontForge，按照 Hetima 的介绍我们用 FontForge 就可以。用 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://macromates.com/">TextMate</a> 是 Mac OS X 下著名的编辑器，相信很多看过 Ruby on Rails Screencast 的开发者都对它有深刻的印象 —— 流畅的生成固定格式代码(Snipper)，方便的 Project 管理，以及像老牌编辑器 <a href="http://www.barebones.com/products/bbedit/">BBEdit</a>
 一样使用 unix 命令来过滤文本内容。但是 TextMate 对于在开发过程中使用中、日、韩文字的开发着来说却有一些麻烦。</p>

<ul>
<li>无法正确显示 CJK 字符</li>
<li>无法正确输入 CJK 字符</li>
</ul>

<p>好在 Hetima 提供了两种可以间接解决问题的办法：</p>

<h4 id="display">显示 CJK 字符</h4>

<p>大多数 CJK 字体都是 2 字宽，在 TextMate 下会和后边的 CJK 字符重叠在一起。（没有使用标准的 NSView？）对于这个问题 <a href="http://d.hatena.ne.jp/hetima/">Hetima</a> 提出了用 <a href="http://d.hatena.ne.jp/hetima/20061102">缩小日文字体宽度</a> 的办法来解决，不过实际上最后的效果有点见仁见智。我照猫画虎的用中文字体做了一些实践，下面把大致的步骤写一下。</p>

<p>字体变形有许多选择：从超贵的 <a href="http://www.adobe.com/support/fontographer/downloads.html">FontGrapher</a> 到开放原始码的 <a href="http://fontforge.souceforge.org/">FontForge</a>，按照 Hetima 的介绍我们用 FontForge 就可以。用 FontForge 读取 .dfont 或者 .ttf 文件，然后用 <a href="http://fontforge.sourceforge.net/scripting-alpha.html#Scale">Scale()</a> 和 <a href="http://fontforge.sourceforge.net/scripting-alpha.html#MergeFonts">MergeFonts()</a>
方法来变形、合并字体。要注意的是 FontForge 需要 X11 环境的支持，如果你在安装 Mac OS X 的时候没有安装过，可以在第一张安装盘中的 Optional Install 中安装。脚本中使用了 2 款字体，都是可以在 Mac OS X 中找到的（/System/Library/Fonts/）。如果你想要“华文黑体”（STHei.ttf）而不是“黑体”（Hei.dfont），那你需要 <a href="http://www.everything2.com/index.pl?node_id=1256000">动一点小手脚</a> —— STHei.ttf 受 FSType/2 保护，FontForge 在脚本中是动不到它的。当然你也可以用任意两种免费的中英文字体进行组合。</p>

<p>把 Hei.dfont 和 Monaco.dfont 两款字体复制到同一文件夹中，（比如 ~/tmfont/）然后建立文本文件 tmfont.pe：</p>

<blockquote><p><code>#!/usr/local/bin/fontforge -script<br />
<br />
#中文字体处理<br />
Open("Hei.dfont"); #中文字体<br />
SelectAll()<br />
foreach<br />
  Scale(60, 100, 0, 0) #横0.6，纵1.0  <br />
endloop  <br />
Generate("temp.ttf", "", 0x14)  <br />
Close()  <br />
  <br />
#Monaco 字体合并  <br />
Open("Monaco.dfont"); #英文字体  <br />
MergeFonts("temp.ttf");  <br />
SetFontNames("TextMate-Regular", "TextMate", "TextMate Regular", "Regular", "")  <br />
Generate("TextMate.ttf", "", 0x14)  <br />
Close()</code></p></blockquote>

<p>这样就差不多了。开启 X11 环境（/Applications/Utilities/），在 term 中赋予 tmfont.pe 执行权限并执行：</p>

<blockquote>
  <p><code>chmod +x tmfont.pe  
  ./tmfont.pe</code></p>
</blockquote>

<p>之后，你应该能在目录下找到 TextMate.ttf，安装这个字体就可以啦。</p>

<p class="cr">
<img src="http://myskitch.com/otherside/cjk-in-textmate-20070805-114638.jpg" alt="CJK in TextMate" /><br />
使用了自定义字体的 TextMate
</p>

<h4 id="input">输入 CJK 字符</h4>

<p>相比显示 CJK 字符来说简单多了：下载安装 <a href="http://hetima.com/textmate/index-e.html">Hetima 的 CJK-Input.tmplugin</a>。(Kudos to Hetima again.)</p>

<h4 id="links">Links</h4>

<ul>
<li><a href="http://d.hatena.ne.jp/hetima/20061102/1162435711">TextMate で日本語をわりとまともに表示する</a></li>
<li><a href="http://hetima.com/textmate/index-e.html">CJK-Input.tmplugin</a></li>
</ul>

<p>TextMate 的主页上称 TextMate 2.0 将使用 Leopard 中的 CoreText（也就是说想用 2.0 就必须要买 10.5 :-|），作者承诺届时 CJK 支持问题将得到彻底解决。
我在写代码的时候不常用到中文，也许写注释给别人看的时候会用到。虽然这个方法显示的文字略显小，不过聊胜于无，希望对同样使用 TextMate 的朋友有所帮助。</p>
]]></content:encoded>
			<wfw:commentRss>http://otherside.mimijidi.com/entries/cjk-in-textmate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
