set nocompatible
" show the cursor position all the time
set ruler
set showmode
set showcmd
set noignorecase
set hlsearch
set incsearch
set smartindent
set showmatch
" 设置vim中tab为4个空格
set shiftwidth=4
set ts=4 "8
set sts=4
set expandtab
filetype on
filetype plugin on
filetype indent on
" 因为执行了filetype plugin on,所以下面的2行可以去掉
" autocmd FileType java set noexpandtab
" autocmd FileType Makefile set noexpandtab
set nobackup
let &termencoding=&encoding
set fileencodings=utf-8,gb2312,ucs-bom,euc-cn,euc-tw,gb18030,gbk,cp936
" let g:fencview_autodetect=1
" let g:fencview_auto_patterns='*'
" tab complete now ignores these
set wildignore=*.o,*.obj,*.bak,*.exe,*~
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" :map :tabnext
" :map :nohl
" :map :w!
" :imap :i
" :imap :tabnexti
" :imap :nohli
" :imap :w!i
nmap :w!
nmap :wa
nmap
nmap
"nmap
"nmap :pop
"nmap :tag
nmap g
"nmap :tn
"nmap :tp
"nmap
"nmap
nmap
vmap
nmap n
"nmap g]
nmap :.ccp
nmap :e!
nmap q
imap :w!i
"imap
"imap i
imap :wa!i
imap i
imap i
"imap i
"imap :popi
"imap :tagi
imap gi
"imap i
"imap i
imap i
imap n
"imap g]i
imap :.ccp
imap :e!i
imap q
nmap
nmap g]
nmap :%!xxd -r
imap
imap g]i
imap :%!xxd -ri
nmap :set hlsgd
imap :set hlsgdi
nmap gf
imap gfi
nmap :%!xxd -g 1
imap :%!xxd -g 1i
"nmap gg
"imap ggi
nmap :TlistToggle
imap :TlistTogglei
"let Tlist_Use_Horiz_Window=1
let Tlist_Use_Right_Window=1
nmap :set mouse=
imap :set mouse=i
nmap :set mouse=a
imap :set mouse=ai
nmap :run macros/gdb_mappings.vim
imap :run macros/gdb_mappings.vim
"nmap :w!
"imap :w!i
"map!
"nmap q
"nmap w
"nmap e
"nmap r
"nmap t
"nmap 5 g]
"nmap q
syntax on
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%04.4b]\ [HEX=\%04.4B]\ [LEN=%L]\ [%03p%%]\ [POS=%04v,%04l]]
set laststatus=2
set mouse=a
set hlsearch
set ff=unix ",dos
set autoread
"set paste
function! Mydict()
let expl=system('grep -r ' .
\ expand(""))
windo if
\ expand("%")=="diCt-tmp" |
\ q!|endif
25vsp diCt-tmp
setlocal buftype=nofile bufhidden=hide noswapfile
1s/^/\=expl/
1
endfunction
"nmap F :call Mydict()
function Gliethttp()
let exp=expand("")
echo exp
cexpr system('gsearch_beagle -g ' . exp)
cw
" copen
" execute "grep -r " . exp . " *" . " --exclude=*svn* --exclude=*.exe --exclude=*.bin --exclude=*.elf --exclude=tags --exclude=*.swp --exclude=cscope.out --exclude=*.[oO]"
" execute "grep " . "/n /S " . exp . " *.c *.h *.s *.java *.cpp *.cxx *.ld Makefile *.ini *.inc"
"windows xp findstr /n /S exp *.c *.h ...
endfunction
function Gliethttp2(express)
echo a:express
cexpr system('gsearch_beagle -g ' . a:express)
cw
" copen
" execute "grep -r '" . a:express . "' *" . " --exclude=*svn* --exclude=*.exe --exclude=*.bin --exclude=*.elf --exclude=tags --exclude=*.swp --exclude=cscope.out --exclude=*.[oO]"
" execute "grep " . "/n /S " . a:express . " *.c *.h *.s *.java *.cpp *.cxx *.ld Makefile *.ini *.inc"
"windows xp findstr /n /S a:express *.c *.h ...
endfunction
function _Gliethttp()
let exp=expand("")
echo exp
cexpr system('gsearch_beagle -g ' . exp)
cw
" copen
" execute "grep . .c"
" execute "grep -wr " . exp . " *" . " --exclude=*svn* --exclude=*.exe --exclude=*.bin --exclude=*.elf --exclude=tags --exclude=*.swp --exclude=cscope.out --exclude=*.[oO]"
" execute "grep " . "/n /S " . exp . " *.c *.h *.s *.java *.cpp *.cxx *.ld Makefile *.ini *.inc"
"windows xp findstr /n /S /I exp *.c *.h ...
endfunction
function _Gliethttp2(express)
echo a:express
cexpr system('gsearch_beagle -g ' . a:express)
cw
" copen
" execute "grep -wr '" . a:express . "' *" . " --exclude=*svn* --exclude=*.exe --exclude=*.bin --exclude=*.elf --exclude=tags --exclude=*.swp --exclude=cscope.out --exclude=*.[oO]"
" execute "grep " . "/n /S " . a:express . " *.c *.h *.s *.java *.cpp *.cxx *.ld Makefile *.ini *.inc"
"windows xp findstr /n /S /I a:express *.c *.h ...
endfunction
nmap :call _Gliethttp()
vmap y:call _Gliethttp2(""")
".
nmap :call Gliethttp()
vmap y:call Gliethttp2(""")
nmap :call _Gliethttp()
vmap y:call _Gliethttp2(""")
nmap :call Gliethttp()
vmap y:call Gliethttp2(""")
nmap s
imap s
nmap s
imap s
nmap :set mouse=
imap :set mouse=i
nmap :cn
nmap :cp
nmap :set mouse=a
imap :set mouse=ai
nmap gd