Chinaunix首页 | 论坛 | 博客
  • 博客访问: 61824
  • 博文数量: 25
  • 博客积分: 1899
  • 博客等级: 上尉
  • 技术积分: 250
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-29 23:45
文章分类

全部博文(25)

文章存档

2012年(22)

2010年(3)

我的朋友

分类: LINUX

2012-02-28 22:49:15

" g CTRL-G show information about current cursor
" vg CTRL-G statistics the bytes
" vimdiff

set noscrollbind " do & dp => Obtain is left and Put is right. "
nnoremap ffp :set fileencoding=cp936:w:set fileencoding
nnoremap ffu :set fileencoding=utf-8:w:set fileencoding

" cscope
set cscopequickfix=s-,c-,d-,i-,t-,e-,g-,f- "cw to check on qkfix

map ffs :tab cs find s =expand("")
map ffg :tab cs find g =expand("")
map ffE :tab cs find e =expand("")
map fff :tab cs find f =expand("")
map ffi :tab cs find i =expand("")

" find a GLABL: int g_var;
" or: struct stname st_var;
map ffG mA:tab cs find s =expand(""):copenggVGtty`A:cex system('grep -E "^[[:space:]]*[a-zA-Z0-9_]+[[:space:]]*[a-zA-Z0-9_]*[[:space:]]*=expand("");" /dev/shm/xm')

" find a nType: { struct | enum | union } nType {
" or: { struct | enum | union } nType
" fft, cause _t is always the suffix of struct
map fft mA:tab cs find s =expand(""):copenggVGtty`A:cex system( 'grep -E "(struct\\|enum\\|union)[[:space:]]*=expand("")[[:space:]]*{?[[:space:]]*$" /dev/shm/xm')

" find a MACRO: #define MACRO sth_org
" or: typedef sth_org MACRO;
" or: } MACRO;
map ffd mA:tab cs find s =expand(""):copenggVGtty`A:cex system('grep -E "(typedef.*[[:space:]]+=expand("")[[:space:]]*;\\|#define[[:space:]]*=expand("")\\|}[[:space:]]*=expand("")[[:space:]]*;)" /dev/shm/xm')
" find a GLABL: int g_var;
" or: struct stname st_var;
map ffG mA:tab cs find s =expand(""):copenggVGtty`A:cex system('grep -E "^[[:space:]]*[a-zA-Z0-9_]+[[:space:]]*[a-zA-Z0-9_]*[[:space:]]*=expand("");" /dev/shm/xm')

" find a nType: { struct | enum | union } nType {
" or: { struct | enum | union } nType
" fft, cause _t is always the suffix of struct
map fft mA:tab cs find s =expand(""):copenggVGtty`A:cex system( 'grep -E "(struct\\|enum\\|union)[[:space:]]*=expand("")[[:space:]]*{?[[:space:]]*$" /dev/shm/xm')

" find a MACRO: #define MACRO sth_org
" or: typedef sth_org MACRO;
" or: } MACRO;
map ffd mA:tab cs find s =expand(""):copenggVGtty`A:cex system('grep -E "(typedef.*[[:space:]]+=expand("")[[:space:]]*;\\|#define[[:space:]]*=expand("")\\|}[[:space:]]*=expand("")[[:space:]]*;)" /dev/shm/xm')

" find a Funcn: return_type Funcn(arg1, arg2, arg3)
" e Entry
" no '=' ';' '>> FUNC_CALL'
" no end with ::$
" no as the Type of var
" map ffe mA:tab cs find s =expand(""):copenggVGtty`A:cex system( 'grep -E -v "(^$\\|[;=]\\|>> =expand("")[^:]+\\|\(=expand("")\\|>> return\\|>> while\\|>> if\\|>> switch\\|extern)" /dev/shm/xm ')
map ffe mA:tab cs find s =expand(""):copenggVGtty`A:cex system( 'grep -E -v "(^$\\|[;=]\\|>> =expand("")[^:]+\\|\(=expand("")\\|>> return\\|>> while\\|>> if\\|>> switch\\|extern\\|=expand("")[[:space:]])\\|::$" /dev/shm/xm ')


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

上一篇:vimrc

下一篇:teck-intervier

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