配置如下
[[email protected] ~]# cat ~/.vimrc
:set encoding=utf- fileencodings=ucs-bom,utf-,cp936
:set ts=
:set expandtab
:set autoindent
:set omnifunc=phpcomplete#CompletePHP
set runtimepath^=~/.vim/bundle/ctrlp.vim
详解如下
:set encoding=utf-
设置字符编码为utf-
:set ts=
设置一个tab为个空格
:set expandtab
tab转换为空格
:set autoindent
自动缩进
:set omnifunc=phpcomplete#CompletePHP
php 自动补全 快捷键为[ctrl + x , ctrl + o]
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsISOzUzNzYjMwEjNwITM2EDMy8CX0Vmbu4GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)
1 Clone the plugin into a separate directory
$ cd ~/.vim
git clone https://github.com/kien/ctrlp.vim.git bundle/ctrlp.vim
2 Add to your ~/.vimrc