首先是按安装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();
阅读(871) | 评论(0) | 转发(0) |