Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4733665
  • 博文数量: 930
  • 博客积分: 12070
  • 博客等级: 上将
  • 技术积分: 11448
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-15 16:57
文章分类

全部博文(930)

文章存档

2011年(60)

2010年(220)

2009年(371)

2008年(279)

分类: LINUX

2009-04-01 16:30:27

  首先是按安装vim-full,alias vi='vim',syntax on!!!!再编辑/etc/vimrc,
添加set foldmethod=syntax

代码折叠
许多editor都支持代码折叠,Vim也不例外
常用的快捷键
zc 折叠代码
zo 打开折叠的代码
还有其他的快捷键可以查看帮助
:h fold

 unsigned char *tmp;
 32
 33 struct icmp *icmp_hdr_make(unsigned char *buf,int icmp_type,unsigned int
 34 +-- 92 lines: icmp_code,struct ip_header_fields *header) {----------------------------------------------------
126
127 +-- 10 lines: int code_make(unsigned int code,int limit) {----------------------------------------------------
137
138 +--  3 lines: * Function used in 'verbose mode'---------------------------------------------------------------
141
142 +-- 62 lines: void verbose_icmphdr(struct icmp *icmphdr) {----------------------------------------------------
204

 zo之后的代码:
 33 struct icmp *icmp_hdr_make(unsigned char *buf,int icmp_type,unsigned int
 34                            icmp_code,struct ip_header_fields *header) {
 35
 36         struct icmp *icmp_pt = (struct icmp *)(buf+sizeof(struct ip));
 37
 38         icmp_pt->icmp_type = icmp_type;
 39
 40 +--- 24 lines: switch(icmp_type) {----------------------------------------------------------------------------
 64
 65 +---  4 lines: if (!header->error) {--------------------------------------------------------------------------
 69  
 70         if (icmp_type == ICMP_TIMESTAMP)
 71                 icmp_pt->icmp_otime = orig_timestamp();

阅读(824) | 评论(0) | 转发(0) |
0

上一篇:shell menu

下一篇:/etc/inittab

给主人留下些什么吧!~~