Chinaunix首页 | 论坛 | 博客
  • 博客访问: 40414
  • 博文数量: 21
  • 博客积分: 1080
  • 博客等级: 少尉
  • 技术积分: 265
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-06 00:07
文章分类
文章存档

2009年(7)

2008年(14)

我的朋友
最近访客

分类:

2008-10-24 16:15:09



set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936

set nocompatible

set history=100


set confirm


set clipboard+=unnamed


filetype on


filetype plugin on

filetype indent on


set viminfo+=!


set iskeyword+=_,$,@,%,#,-


syntax on


:highlight OverLength ctermbg=red ctermfg=white guibg=red guifg=white
:match OverLength '\%101v.*'

highlight StatusLine guifg=SlateBlue guibg=Yellow
highlight StatusLineNC guifg=Gray guibg=White


set nobackup


setlocal noswapfile
set bufhidden=hide


set linespace=0


set wildmenu

set ruler
set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%)


set cmdheight=2


set backspace=2


set whichwrap+=<,>,h,l


set mouse=a
set selection=exclusive
set selectmode=mouse,key


set shortmess=atI


set report=0


set noerrorbells

set fillchars=vert:\ ,stl:\ ,stlnc:\



set showmatch


set matchtime=5


set ignorecase


set nohlsearch


set incsearch

set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$

set scrolloff=3


set novisualbell


set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}

set laststatus=2

set formatoptions=tcrqn


set autoindent

set smartindent


set cindent


set tabstop=4


set softtabstop=4
set shiftwidth=4


set noexpandtab


set nowrap


set smarttab



let Tlist_Sort_Type = "name"


let Tlist_Use_Right_Window = 1


let Tlist_Compart_Format = 1


let Tlist_Exist_OnlyWindow = 1


let Tlist_File_Fold_Auto_Close = 0


let Tlist_Enable_Fold_Column = 0



if has("autocmd")
   autocmd FileType xml,html,c,cs,java,perl,shell,bash,cpp,python,vim,php,ruby set number
   autocmd FileType xml,html vmap 'o'>o-->
   autocmd FileType java,c,cpp,cs vmap ''>o*/
   autocmd FileType html,text,php,vim,c,java,xml,bash,shell,perl,python setlocal textwidth=100
   autocmd Filetype html,xml,xsl source $VIMRUNTIME/plugin/closetag.vim
   autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$") |
      \   exe "normal g`\"" |
      \ endif
endif " has("autocmd")



map :call CompileRunGcc()
func! CompileRunGcc()
exec "w"
exec "!gcc % -o %<"
exec "! ./%<"
endfunc


map :call CompileRunGpp()
func! CompileRunGpp()
exec "w"
exec "!g++ % -o %<"
exec "! ./%<"
endfunc


set encoding=utf-8
function! SetFileEncodings(encodings)
    let b:myfileencodingsbak=&fileencodings
    let &fileencodings=a:encodings
endfunction
function! RestoreFileEncodings()
    let &fileencodings=b:myfileencodingsbak
    unlet b:myfileencodingsbak
endfunction

au BufReadPre *.nfo call SetFileEncodings('cp437')|set ambiwidth=single
au BufReadPost *.nfo call RestoreFileEncodings()


au BufRead,BufNewFile *  setfiletype txt


set foldenable
set foldmethod=manual
nnoremap @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')


let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1



winpos 300 100
set lines=28
set columns=90


set guioptions+=b
set guioptions-=r
set guioptions-=l
set guioptions-=T


colorscheme desert
set guifont=Consolas\ 11.5
set guifontset=Microsoft\ YaHei\ 11

set number
autocmd InsertLeave * se nocul
autocmd InsertEnter * se cul







阅读(307) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~