syntax on
set nu
set sw=4
set ts=4
set st=4
set cursorline
set autoindent
set hlsearch
set smarttab
"set expandtab
set pastetoggle=<F7>
" set utf-8 encode
set enc=utf-8
set fenc=utf-8
set fencs=utf-8,gb18030,utf-16,big5
"set termencoding=gb18030
set termencoding=utf-8
"":inoremap ( ()<ESC>i
"":inoremap ) <c-r>=ClosePair(')')<CR>
"":inoremap { {}<ESC>i
"":inoremap } <c-r>=ClosePair('}')<CR>
"":inoremap [ []<ESC>i
"":inoremap ] <c-r>=ClosePair(']')<CR>
"":inoremap " ""<ESC>i
function ClosePair(char)
if getline('.')[col('.') - 1] == a:char
return "\<Right>"
else
return a:char
endif
endf
" NERDTree
map <F10> :NERDTreeToggle<CR>
" taglist
map <F9> :TlistToggle<CR>
let Tlist_Auto_Highlight_Tag = 1
let Tlist_Auto_Open = 0
let Tlist_Auto_Update = 1
let Tlist_Close_On_Select = 0
let Tlist_Compact_Format = 0
let Tlist_Display_Prototype = 0
let Tlist_Display_Tag_Scope = 1
let Tlist_Enable_Fold_Column = 0
let Tlist_Exit_OnlyWindow = 1
let Tlist_File_Fold_Auto_Close = 0
let Tlist_GainFocus_On_ToggleOpen = 1
let Tlist_Hightlight_Tag_On_BufEnter = 1
let Tlist_Inc_Winwidth = 0
let Tlist_Max_Submenu_Items = 1
let Tlist_Max_Tag_Length = 30
let Tlist_Process_File_Always = 0
let Tlist_Show_Menu = 0
let Tlist_Show_One_File = 0
let Tlist_Sort_Type = "order"
let Tlist_Use_Horiz_Window = 0
let Tlist_Use_Right_Window = 1
let Tlist_WinWidth = 40
let tlist_php_settings = 'php;c:class;i:interfaces;d:constant;f:function'
" omnicppcomplete
set nocp
filetype plugin on
set completeopt=longest,menu
set completeopt=menuone
" a.vim
map <F8> :AV<cr>
" ctags
""set tags=/home/users/xx/tags
map <F5> :tselect <c-r>=expand("<cword>")<cr><cr>
" match
map <c-n> :match MatchParen /<c-r>//<cr><cr>
map <c-k> I//<Esc>
set laststatus=2
set statusline=%F%m%r%h%w\ %=[FORMAT=%{&ff}]\ %{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\"}\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
VIMRC配置
最新推荐文章于 2025-07-15 16:20:49 发布