晒下个人的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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值