vim配置编辑php

wgypdeMacBook-Air:vim root# cat vimrc
" Configuration file for vim
set modelines=0        " CVE-2007-2438

" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible    " Use Vim defaults instead of 100% vi compatibility
set backspace=2        " more powerful backspacing

" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup
" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup


set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set cindent
set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s
set expandtab
set number
set nocompatible
set number
filetype on
set history=1000
set background=light
syntax on
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
set nohls
set incsearch
if has("vms")
    set nobackup
else
  set backup
 endif

set fileencodings=utf-8-bom,ucs-bom,utf-8,cp936,gb18030,ucs,big5

参考:

Linux下(.vimrc文件)

配置文件vimrc存放位置

Vim配置实例

VIM 中文解决方法

原文地址:https://www.cnblogs.com/dqxu/p/4303607.html