<?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>ubuntu,debian,redhat -linuxany.com &#187; vi</title>
	<atom:link href="http://www.linuxany.com/archives/tag/vi/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 08:59:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>在vim/vi中快速执行php或c/c++的方法</title>
		<link>http://www.linuxany.com/archives/1277.html</link>
		<comments>http://www.linuxany.com/archives/1277.html#comments</comments>
		<pubDate>Wed, 26 May 2010 11:57:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vimrc]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1277</guid>
		<description><![CDATA[如果使用VIM来编写代码，可能很多朋友就会想了，有没有什么方法来建立一个快捷键，能快速的运行我们所编写的代码呢？！！答案当然是肯定了的，不然也不会写这篇日志来讨论这个问题了。 在介绍方法之前，先来谈一下自己以前的执行方式吧！ 先拿PHP来讲吧，最传统的方式就是将编写好的代码放在apache的根目录，然后通过浏览器来运行，或者使用php命令来运行php.可以使用php的r参数 linuxany@~$ php -r &#34;echo 'hqlong';&#34; 来快速测试，或者使用q参数 linuxany@~$ php -q test.php 来运行。 接下来讲怎么将vim支持一键执行。 大致原理是使用键盘映射，将快捷键映射到执行的命令。 在.vimrc中添加 nmap &#60; F5 &#62; &#60; ESC &#62;:!clear &#38;&#38; php -q &#60; C-R &#62;%&#60; cr &#62; 即当我们按下F5时，就相当于执行了如下操作。 1.按下ESC，然后再按下:,进入vim命令行模式 2.执行clear清屏操作。 3.然后运行当前脚本。 4.最后执行回车操作. 下面有几个指令需要解释一下: < C - R >%:得到当前文件的名字,包括路径.(按ctrl+r,然后再按%) 接下来可以测试一下. vim /tmp/test.php &#60; ? php &#160; &#160; echo&#160;&#34;hqlong&#34;; ?&#62; 保存后,按F5, 就是快速的得出执行结果。 [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1277.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to hide comments</title>
		<link>http://www.linuxany.com/archives/819.html</link>
		<comments>http://www.linuxany.com/archives/819.html#comments</comments>
		<pubDate>Sat, 29 Aug 2009 14:36:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=819</guid>
		<description><![CDATA[Introduction &#8212;&#8212;&#8212;&#8212; Although comments can be a blessing in the configuration file of an unfamiliar system, they eventually become annoying if one is already very familiar with the file. In some extreme cases, they can actually be an obstruction to clarity. Here are two methods for viewing files without hash (#) comments, one for the [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/819.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vi 用法</title>
		<link>http://www.linuxany.com/archives/107.html</link>
		<comments>http://www.linuxany.com/archives/107.html#comments</comments>
		<pubDate>Mon, 24 Dec 2007 16:37:15 +0000</pubDate>
		<dc:creator>x72</dc:creator>
				<category><![CDATA[1.Application]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://www.linuxplay.cn/index.php/archives/104</guid>
		<description><![CDATA[1.6.1  vi 的工作模式 Vi 在初始启动后首先进入编辑模式，当用户在编辑模式下键入 i, a, o 等命令之后，可进入插入模式；键入 : 可进入命名模式。在插入模式下，用户随后输入的，除 Esc 之外的任何字符均将被看成是插入到编辑缓冲区中的字符。按 Esc 之后，从插入模式切换到编辑模式。 1.6.2  编辑模式 1. 移动光标 要对正文内容进行修改，首先必须把光标移动到指定位置。移动光标的最简单的方式是按键盘的上、下、左、 右箭头键。除了这种最原始的方法之外，用户还可以利用 vi 提供的众多字符组合键，在正文中移动光标，迅 速到达指定的行或列，实现定位。例如： k、j、h、l 功能分别等同于上、下、左、右箭头键 Ctrl+b 在文件中向上移动一页（相当于 PageUp 键） Ctrl+f 在文件中向下移动一页（相当于 PageDown 键） H 将光标移到屏幕的最上行（Highest） nH 将光标移到屏幕的第 n 行 2H 将光标移到屏幕的第 2 行 M 将光标移到屏幕的中间（Middle） L 将光标移到屏幕的最下行（Lowest） nL 将光标移到屏幕的倒数第 n 行 3L 将光标移到屏幕的倒数第 3 行 w [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/107.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

