<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[阿Tim日志]]></title> 
<link>https://atim.cn/index.php</link> 
<description><![CDATA[专业的php开发者.开发团队的带队人]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[阿Tim日志]]></copyright>
<item>
<link>https://atim.cn/post/1015/</link>
<title><![CDATA[vim自动格式化的功能]]></title> 
<author>bkkkd &lt;partybase@gmail.com&gt;</author>
<category><![CDATA[开发应用]]></category>
<pubDate>Thu, 19 May 2011 09:27:51 +0000</pubDate> 
<guid>https://atim.cn/post/1015/</guid> 
<description>
<![CDATA[ 
	真没想到Vim确实很强大,强大到自己就有自动格式化的功能.而且比其它的编辑器的自动格式化还要强大.<br/><br/>我在网上搜索了 <a href="http://www.google.com/search?q=vim+%E4%BB%A3%E7%A0%81%E6%A0%BC%E5%BC%8F%E5%8C%96" target="_blank">Vim 代码格式化</a> 找出来的内容大都是下面这篇文件<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>从别的编辑器里粘贴到vim里的代码经常由于不正常的缩进变得格式混乱。<br/><br/>格式化全文： gg=G<br/><br/>自动缩进当前行： ==<br/><br/>格式化当前光标接下来的10行： 10=<br/><br/>格式化选定的行： v&nbsp;&nbsp; （向上下选择）=<br/><br/>官方解释：http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl#14.6<br/><br/>14.6.<br/><br/> How do I format/indent an entire file?<br/><br/>You can format/indent an entire file using the gg=G command, where<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;gg - Goto the beginning of the file<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;- apply indentation<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;G&nbsp;&nbsp;- till end of file<br/><br/>For more information, read<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;:help gg<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;:help =<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;:help G<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;:help 'formatprg'<br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;:help C-indenting<br/></div></div><br/>但这里没有说明具体怎么使用<br/>我在这里就说明一下,在需要普通模式下输入<br/><div class="code"><br/>gg<br/></div><br/>这个命令会使用光标移动到文件开头<br/><div class="code"><br/>然后再输入<br/>&#91;code&#93;<br/>=G<br/></div><br/>将文件格式化.<br/>其中 <span style="color: red;">=G</span>是组合命令.=号是格式化的命令,而G是指定范围到文件末端.<br/>
]]>
</description>
</item><item>
<link>https://atim.cn/post/1015/#blogcomment7973</link>
<title><![CDATA[[评论] vim自动格式化的功能]]></title> 
<author>123 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 06 Jun 2018 07:29:30 +0000</pubDate> 
<guid>https://atim.cn/post/1015/#blogcomment7973</guid> 
<description>
<![CDATA[ 
	渣
]]>
</description>
</item>
</channel>
</rss>