<?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>一个故事@MySQL DBA &#187; vi</title>
	<atom:link href="http://www.orczhou.com/index.php/tag/vi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.orczhou.com</link>
	<description>一个故事@MySQL DBA</description>
	<lastBuildDate>Tue, 20 Dec 2011 15:51:20 +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>Vim使用简介</title>
		<link>http://www.orczhou.com/index.php/2010/03/vim-recording/</link>
		<comments>http://www.orczhou.com/index.php/2010/03/vim-recording/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 14:35:01 +0000</pubDate>
		<dc:creator>orczhou</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.orczhou.com/?p=1209</guid>
		<description><![CDATA[<p><font color="red">
<pre>        "工欲善其事,必先利其器"
                                   《论语》
</pre>
<p></p></font></p>
<p>写在前头：vim是<strong>Linux</strong>下最常用的编辑工具，一般认为vim是Vi IMproved（增强的vi）的缩写，很多时候我们也把vim称为vi。vi是一个上手比较难，但是一旦掌握，就能大大提高效率的工具。本文<strong>仅</strong>介绍一些Vim使用的基本概念，读者可以根据本文给出参考文献继续深入了解Vim。</p>
<p><font color="red">1. 认识Vi</font></p>
<p>直接使用vi（或者vim）命令，<strong>有时</strong>会看到如下的内容</p>
<pre>
<div class="mycode">                 Vim is open source and freely distributable

~                       Help poor children in Uganda!
~              type  :help iccf&#60;Enter&#62;       for information
</div>
</pre>
<p>[......]</p><p class='read-more'><a href='http://www.orczhou.com/index.php/2010/03/vim-recording/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><font color="red">
<pre>        "工欲善其事,必先利其器"
                                   《论语》
</pre>
<p></font></p>
<p>写在前头：vim是<strong>Linux</strong>下最常用的编辑工具，一般认为vim是Vi IMproved（增强的vi）的缩写，很多时候我们也把vim称为vi。vi是一个上手比较难，但是一旦掌握，就能大大提高效率的工具。本文<strong>仅</strong>介绍一些Vim使用的基本概念，读者可以根据本文给出参考文献继续深入了解Vim。</p>
<p><font color="red">1. 认识Vi</font></p>
<p>直接使用vi（或者vim）命令，<strong>有时</strong>会看到如下的内容</p>
<pre>
<div class="mycode">                 Vim is open source and freely distributable

~                       Help poor children in Uganda!
~              type  :help iccf&lt;Enter&gt;       for information
</div>
</pre>
<p><span id="more-1209"></span></p>
<p>建议用户向荷兰<a href="http://iccf-holland.org/index.html">ICCF</a>捐款, 用于帮助乌干达的艾滋病患者，可以通过键入命令:help iccf<Enter>查看更多细节。</p>
<p>你可以使用如下命令开始编辑一个文本：</p>
<pre>
<div class="mycode">vi doat.txt</div>
</pre>
<p><font color="red">2. Vim中的模式</font></p>
<p>Vi和Windows下的编辑器最大的一个不同是Vi有多种模式：<font color="blue">Normal模式，编辑模式，命令模式</font>。使用命令(如 vi dota.txt)后，首先进入Normal模式（这个模式下，可以移动光标的位置）；如果准备开始编辑了，按下a（或者i）就可以进入编辑模式，这时，和普通的编辑器就差不多了；完成编辑希望保存并退出文本时，你可以先按Esc进入Normal模式，然后按:wq保存并退出。（还是有点点复杂的:）事实上还有Ex Select Visual等模式）</p>
<p><font color="red">3. Vim中的一些功能</font></p>
<p>这里将罗列一些Vi的功能，本文将不详述，因为只要你知道她有这些功能，Google大神会告诉你具体操作。</p>
<p><font color="blue">语法高亮</font>：当你编写shell代码时，高亮可以帮你发现一些明显的语法错误；<font color="blue">录制、播放</font>：当你在成百次的重复一些复杂的vi操作时，录制会帮你大忙；<font color="blue">列编辑</font>：据我知道，很多人之所以使用破解版的UE，就是因为这个；<font color="blue">搜索、替换</font>：这也是编辑器基本的功能。<font color="blue">编程函数自动补齐</font>：还在等什么，Have a try（欢迎补充）</p>
<p><font color="red">4. ctrl+s冻结Vim的问题</font></p>
<p>刚开始使用vim的人，会习惯性地使用ctrl+s保存，这将会导致Linux终端被冻结。事实上，ctrl+s会锁住Linux终端的输入和输出。可以使用<strong>crtl+q解除</strong>锁定，恢复正常。</p>
<p>参考手册：</p>
<p><a href="http://vimcdoc.sourceforge.net/doc/intro.html">sourceforge.net上的中文文档</a> | <a href="http://edyfox.codecarver.org/html/vim_edit_tips.html">滇狐大作viki</a> | <a href="http://www.vim.org/">Vim the editor</a> | <a href="http://blog.sina.com.cn/s/blog_46dac66f010005kw.html">善用佳软 介绍vim</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.orczhou.com/index.php/2010/03/vim-recording/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

