<?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>Sparkle&#039;s Workshop &#187; iterm</title>
	<atom:link href="http://weavesky.com/tag/iterm/feed/" rel="self" type="application/rss+xml" />
	<link>http://weavesky.com</link>
	<description></description>
	<lastBuildDate>Tue, 24 Apr 2012 03:32:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>令你的Mac Term更好用</title>
		<link>http://weavesky.com/2008/02/29/make-your-mac-term-better/</link>
		<comments>http://weavesky.com/2008/02/29/make-your-mac-term-better/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 13:47:50 +0000</pubDate>
		<dc:creator>Sparkle</dc:creator>
				<category><![CDATA[苹果]]></category>
		<category><![CDATA[iterm]]></category>

		<guid isPermaLink="false">http://weavesky.com/2008/02/29/%e4%bb%a4%e4%bd%a0%e7%9a%84mac-term%e6%9b%b4%e5%a5%bd%e7%94%a8/</guid>
		<description><![CDATA[一直都认为Mac的Term很难用,包括内置的,还有很多人推荐的iTerm 我一直都在用iTerm,但是有很多问题,显示不了中文,输入不了中文,在VI或者一些软件下面不能用方向键(甚至我ssh到一台linux主机都不能用) 在windows平台的时候,使用putty或者securecrt等term软件,都有一大堆设置可以使用.而iTerm不停出新版本,也不见有多少个设置.就算用Linux,也没有那么多问题.还真的有狠心把MacBook装成Linux算了的想法 网上没有任何这方面的资料,还到一些blog里面留言询问别人的心得,也没有结果 研究了很久,终于知道怎么处理了 首先是方向键问题,我突然想想有可能emacs的键位可以使用,结果真的可以.^N ^P ^B ^F分别代表上下左右,这样用了一段时间 后来突然想起我在securecrt在设置把TERM改成Linux,改不会是有影响 于是在~/.profile加入 export TERM=linux 果然,方向键都有效了,整个操作变得跟Linux一样.原来securecrt的设置只是主动传给shell,而并不是它自己的设置.而且ssh到linux主机也正常了.后来研究发现,TERM会跟随ssh传递到远端shell,当然你可以自己再修改一次. 然后就是中文问题了,经过研究发现,我的Linux系统里面有一个文件/etc/inputrc 里面有一些关于meta的设置,而MacOS下面并没有这个文件 于是我在~/.inputrc加入一样的meta设置]]></description>
			<content:encoded><![CDATA[<p>一直都认为Mac的Term很难用,包括内置的,还有很多人推荐的iTerm<br />
我一直都在用iTerm,但是有很多问题,显示不了中文,输入不了中文,在VI或者一些软件下面不能用方向键(甚至我ssh到一台linux主机都不能用)</p>
<p>在windows平台的时候,使用putty或者securecrt等term软件,都有一大堆设置可以使用.而iTerm不停出新版本,也不见有多少个设置.就算用Linux,也没有那么多问题.还真的有狠心把MacBook装成Linux算了的想法</p>
<p>网上没有任何这方面的资料,还到一些blog里面留言询问别人的心得,也没有结果</p>
<p>研究了很久,终于知道怎么处理了</p>
<p>首先是方向键问题,我突然想想有可能emacs的键位可以使用,结果真的可以.^N ^P ^B ^F分别代表上下左右,这样用了一段时间<br />
后来突然想起我在securecrt在设置把TERM改成Linux,改不会是有影响<br />
于是在~/.profile加入</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TERM</span>=linux</pre></div></div>

<p>果然,方向键都有效了,整个操作变得跟Linux一样.原来securecrt的设置只是主动传给shell,而并不是它自己的设置.而且ssh到linux主机也正常了.后来研究发现,TERM会跟随ssh传递到远端shell,当然你可以自己再修改一次.</p>
<p>然后就是中文问题了,经过研究发现,我的Linux系统里面有一个文件/etc/inputrc<br />
里面有一些关于meta的设置,而MacOS下面并没有这个文件<br />
于是我在~/.inputrc加入一样的meta设置</p>
<pre lang=“bash">
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on
</pre>
<p>然后把iTerm的Encoding改成UTF-8</p>
<p>另外还在~/.profile加入</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">ls</span>=<span style="color: #ff0000;">&quot;ls -wG&quot;</span></pre></div></div>

<p>现在ls终于能看见中文,而且输入中文也正常.不过delete文字不太正常,还没找到解决方法.</p>
<p>Mac默认就是按照UTF-8存储中文的,如果连上Linux并不是用UTF-8而是用GBK的话,可以临时修改iTerm的Encoding来查看</p>
]]></content:encoded>
			<wfw:commentRss>http://weavesky.com/2008/02/29/make-your-mac-term-better/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

