在vim/vi中快速执行php或c/c++的方法
如果使用VIM来编写代码,可能很多朋友就会想了,有没有什么方法来建立一个快捷键,能快速的运行我们所编写的代码呢?!!答案当然是肯定了的,不然也不会写这篇日志来讨论这个问题了。
在介绍方法之前,先来谈一下自己以前的执行方式吧!
先拿PHP来讲吧,最传统的方式就是将编写好的代码放在apache的根目录,然后通过浏览器来运行,或者使用php命令来运行php.可以使用php的r参数
- linuxany@~$ php -r "echo 'hqlong';"
来快速测试,或者使用q参数
- linuxany@~$ php -q test.php
来运行。
comments vi vim
没有评论
44
How to hide comments
————
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
command line and one for VIM, and a bit of advice for Debian administrators.
继续阅读 »