晒下个人的vim配置

" set background=dark命令必须在syntax on之前调用,否则无效
set background=dark
syntax on

set nocompatible
" let &termencoding=&encoding
set encoding=utf-8
set tabstop=4
set softtabstop=4
set shiftwidth=4
set nu
set ai
set fdm=marker
set foldclose=all
set foldopen=all
set incsearch
set hlsearch
set history=100
set ruler
set showcmd
set showmatch
" 忽略大小写
" 若是小写模式搜索,则忽略大小写;若模式中有大写,则就要大小写模式敏感
set ignorecase smartcase
set expandtab
set textwidth=78

" dispaly tab and space
set list
set listchars=tab:>-,trail:-

" number of lines used for the command-line
set cmdheight=2

" Set to auto read when a file is changed from the outside
set autoread

" Write the contents of the file automaticly 自动保存
set autowrite

" 打开状态行
set laststatus=2

" :sh
set shell=/bin/bash

filetype plugin on

if !exists('g:AutoComplPop_Behavior')
let g:AutoComplPop_Behavior = {}
let g:AutoComplPop_Behavior['php'] = []
call add(g:AutoComplPop_Behavior['php'], {
\ 'command' : "\<C-x>\<C-o>",-
\ 'pattern' : printf('\(->\|::\|\$\)\k\{%d,}$', 0),
\ 'repeat' : 0,
\})
endif

" 删除所有的inoremap映射
:imapclear

" js 格式化
:nnoremap <SID><F6> :call g:Jsbeautify()<CR>

" 公用注释
:iabbrev #b /*****************************************************************
:iabbrev #e <Space>*****************************************************************/

" 经常性错误自动纠正
" 注:当遇到经常性出错的单词时可以添加进来
:iab teh the

" 每次打开日志文件,自动定位到文件末尾
autocmd BufReadPost *.log normal G

au BufRead,BufNewFile /usr/local/services/nginx/conf/* set ft=nginx

你可能感兴趣的:(vim)