" Move around quickly
set incsearch
set hlsearch
filetype plugin on
syntax on
" activate modeline
set modeline
" 设置字符集(在latin1前加入gb2312)
set fileencodings=ucs-bom,utf-8,gb2312,latin1,default
" 设置字体
set guifont=Courier\ 10
" 设置为与PHP习惯一致
set tabstop=2
set shiftwidth=2
" 自动将制表符展开为空格
set expandtab
" 在'{'后自动缩格
set autoindent
set smartindent
" 显示行号
set number
" see partial commands as you type them
set showcmd
" 不要自动换行
set textwidth=0
" Spell Check On
if has('gui_running')
set spell
endif
" php syntax
" enable folding for classes and functions
let php_folding = 1
" abbreviation
ab func function
" plugins setting
" Tag List
if has('gui-running')
let Tlist_Auto_Open = 1
endif
let Tlist_Exit_OnlyWindow = 1
let Tlist_Use_Right_Window = 1
nnoremap <silent> <F8> :Tlist<CR>
" NERD tree
nmap <silent> <F7> :NERDTreeToggle<CR>
" file types
" Smarty files
au BufRead,BufNewFile *.tpl set filetype=html
" Drupal files
au BufRead,BufNewFile *.module set filetype=php
au BufRead,BufNewFile *.install set filetype=php
au BufRead,BufNewFile *.theme set filetype=php
au BufRead,BufNewFile *.profile set filetype=php
" CakePHP files
au BufRead,BufNewFile *.thtml set filetype=php
au BufRead,BufNewFile *.ctp set filetype=php
" Gallery2 files
au BufRead,BufNewFile *.class set filetype=php
" Magento files
au BufRead,BufNewFile *.phtml set filetype=php
set tags=tags
set autoindent
set fencs=utf-8,gbk,gb2312,gb18030,cs-bom,cp936,latin1
"~/.vimrc" 85L, 1549C 4,0-1 Top
Gvim 配置详单
最新推荐文章于 2022-04-05 13:24:43 发布