iab #i #include
set cursorline
set nocompatible
set history=50
" keep 50 lines of command line history
set showcmd
" display incomplete commands
set incsearch
" do incremental searching
set number
set autoindent
set tabstop=8
set shiftwidth=8
set showmatch "显示匹配括弧
set cindent
set smartindent
syntax on
set nohls
set noet "tab不是空格 写makefile时的命令前的tab
"Turn backup off,since most stuff is in SVN ,git anyway...
"set backupdir=/tmp/backup/
set nobackup
set nowb
set noswapfile
nmap <F9> <C-W>w "两个文件间进行切换
nmap <F7> <C-W>< "左移
nmap <F8> <C-W>> "右移
"nmap wq :wq!<ENTER>
"nmap Wq :wq!<ENTER>
"nmap wQ :wq!<ENTER>
nmap :WQ<ENTER> :wq<ENTER>
nmap <F3> :Tlist<ENTER>
"nmap q :q!<ENTER>
nmap :Q<ENTER> :q<ENTER>
"set encoding=prc
"set fileencoding=prc
let&termencoding=&encoding
set fileencodings=utf8,gbk,prc,ucs-bom
set fileformat=unix "去除^M
"set dy=lastling "为什么文件很多行仅仅在没行开头显示@
set clipboard+=unnamed "与windows共享剪切板
" 不要生成swap文件,当buffer被丢弃的时候隐藏它
setlocal noswapfile
set bufhidden=hide
" 状态行颜色
highlight StatusLine guifg=SlateBlue guibg=Yellow
highlight StatusLineNC guifg=Gray guibg=White
" 在状态行上显示光标所在位置的行号和列号
set ruler
set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%)
" 不让vim发出讨厌的滴滴声
set noerrorbells
set novisualbell
set t_vb=
" 在被分割的窗口间显示空白,便于阅读
set fillchars=vert:\ ,stl:\ ,stlnc:\
" 可以在buffer的任何地方使用鼠标(类似office中在工作区双击鼠标定位)
set mouse=a
set selection=exclusive
set selectmode=mouse,key
" 启动的时候不显示那个援助索马里儿童的提示
set shortmess=atI
" 设定默认解码
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936
colorscheme evening
"颜色配置文件在/usr/shar/vim
"/vim72/colors/目录下
set foldmethod=syntax "开启折叠功能(语法折叠)
set foldlevel=100 " 启动vim时不要自动折叠代码
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
"let ctags -R --fields=+lS
"set tags=/home/dongyulong/source/embedded/linux-2.6.25.8/tags
let g:winManagerWindowLayout='FileExplorer|TagList'
nmap <F2> :WMToggle<cr>
set cscopequickfix=s-,c-,d-,i-,t-,e-
set tags=/home/dongyulong/source/embedded/linux-2.6.34/tags
"When .vimrc is edited,reload it
autocmd! bufwritepost vimrc source ~/.vimrc
set ruler "Always show current psition
set cmdheight=2 "The commandbar height
set so=7 "Set 7 lines to the curors - when moving vertical..
set hlsearch "查找高亮
"让文本也高亮
augroup filetypedetect
au BufNewFile,BufRead *.* setf ztxt
augroup END