易截截图软件、单文件、免安装、纯绿色、仅160KB

VIM开发C/C++插件cvim的安装及使用


利用c.vim插件,你可以实现
添加文件头
添加注释
插入一些代码片段
语法检查
读函数文档
注释代码块
这一插件的作者是 Fritz Mehner, 目标就是打造程序员流畅的编辑环境。

这一插件还能完成:
Statement oriented editing of C / C++ programs
Speed up writing new code considerably.
Write code and comments with a professional appearance from the beginning.
Use code snippets
接下来我们对这一插件详细介绍.
3 安装插件
Step 1: 下载c.vim
$ cd /usr/src
$ wget http://www.vim.org/scripts/download_script.php?src_id=9679
Step 2: 安装
$ mkdir ~/.vim
$ cd ~/.vim
$ unzip /usr/src/cvim.zip
Step 3: 启用这一插件
$ vim ~/.vimrc
filetype plugin on
8 c.vim的使用
Feature 1: Add Automatic Header to *.c file
当你新建一个扩展名.c的文件时候,自动在文件头部增加头部注释
$ vim myprogram.c
/*
* =================================================
* Filename: myprogram.c
*
* Description:
*
* Version: 1.0
* Created: 01/19/09 20:23:25
* Revision: none
* Compiler: gcc
*
* Author: Dr. Fritz Mehner (mn),
mehner@fh-swf.de
为防备电子邮件地址收集器,这个 E-mail 地址被隐藏,你的浏览器必须支持 Javascript 才可看到这个邮件地址
* Company: FH Südwestfalen, Iserlohn
*
* =================================================
*/
其中如果你要改变 AUTHOR 和 COMPANY的值, 要修改模板文件 ~/.vim/c-support/templates/Templates
$ vim ~/.vim/c-support/templates/Templates
|AUTHOR| = geekstuff
|AUTHORREF| = gk
|EMAIL| = subscribe@geekstuff
|COMPANY| = thegeekstuff.com
现在编辑一个新文件,看看你的作者和公司名称改变了没有。
$ vim myprogram.c
/*
* =================================================
*
* Filename: myprogram.c
*
* Description:
*
* Version: 1.0
* Created: 01/19/09 20:26:43
* Revision: none
* Compiler: gcc
*
* Author: geekstuff (gk), subscribe@geekstuff
* Company: thegeekstuff.com
*
* =========================================


相关文档:

C 读取程序的环境变量

/*
 ============================================================================
 Name        : test.c
 Author      : alf
 Version     :
 Copyright   : Your copyright notice
  ......

C/C++学习

最近对基础知识进行了学习,发现以前很多东西都没有搞清楚
1. 编译的问题,头文件主要是定义
//////// add.c
int add(int a, int b)
{
     return a + b;
}
///////// main.c
#include <stdio.h>
int add(int a, int b);
int main ()
{
      printf("%d" ......

读《c程序设计语言》一些感受

     最近在看《c程序设计语言》,就是那本被誉为C语言圣经的书籍。几天看了一章,感触很大,开篇就涉及到很多实用程序,不像谭浩强那样让人深陷语法细节之中,而且学完谭的书感觉什么都不能做。很多问题谭都回避了。所谓专业看看c程序设计语言的代码的风格就能感受到,一种精心雕琢的艺术品。第一章有 ......

C/C++ 头文件 常用头文件功能查询表

#include <assert.h>    //设定插入点
#include <ctype.h>     //字符处理
#include <errno.h>     //定义错误码
#include <float.h>     //浮点数处理
#include <fstream.h>    //文件输入/输出
#include  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号