IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    vim 文件备份

    istrone发表于 2015-06-24 03:05:08
    love 0
    set nu
    syntax on
    set tabstop=4
    
    set hlsearch   
    set incsearch " increment search
    set showmatch " when keyup the right ) the left ( bright
    set background=dark
    
    set nocompatible
    filetype on
    filetype off
    set rtp+=~/.vim/bundle/vundle
    let path='~/.vim/bundleplugins'
    call vundle#rc(path)
    
    Plugin 'gmarik/vundle'
    Plugin 'Emmet.vim'
    Plugin 'AutoComplPop'
    Plugin 'scrooloose/nerdtree' 
    Plugin 'php.vim-html-enhanced' 
    Plugin 'bling/vim-airline'
    Plugin 'fugitive.vim'
    Plugin 'elzr/vim-json'
    Plugin 'matchit.zip'
    Plugin 'godlygeek/tabular'
    Plugin 'plasticboy/vim-markdown'
    
    call vundle#end()
    
    filetype plugin indent on  
    
    set laststatus=2
    
    map <C-n> :NERDTreeToggle<CR>
    
    au FileType php call PHPFuncList()
    function PHPFuncList()
    				set dictionary-=~/.vim/dict/php_funclist
    				set dictionary+=~/.vim/dict/php_funclist
    				set complete-=k complete+=k
    endfunction
    
    colorscheme solarized
    "colorscheme blue
    ""colorscheme darkblue
    ""colorscheme default
    ""colorscheme delek
    ""colorscheme desert
    "colorscheme elflord
    ""colorscheme evening
    "colorscheme koehler
    ""colorscheme morning
    ""colorscheme murphy
    "colorscheme pablo
    ""colorscheme peachpuff
    "colorscheme ron
    ""colorscheme shine
    "colorscheme slate
    "colorscheme torte
    ""colorscheme zellner
    
    "保存时检测php文件的语法
    autocmd BufWritePost *.php call PHPSyntaxCheck()
    
    if !exists('g:PHP_SYNTAX_CHECK_BIN')
        let g:PHP_SYNTAX_CHECK_BIN = 'php'
    endif
    
    function! PHPSyntaxCheck()
        let result = system(g:PHP_SYNTAX_CHECK_BIN.' -l -n '.expand('%'))
        if (stridx(result, 'No syntax errors detected') == -1)
            echohl WarningMsg | echo result | echohl None
        endif
    endfunction
    
    set modifiable
    
    autocmd StdinReadPre * let s:std_in=1
    autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
    
    
    Maybe you like these:
    vim 指定文件自动补全
    vim 列编辑
    vim安装bundle管理插件
    cente os 编译安装vim 7.4
    PHP上传文件可能发生的错误
    无觅


沪ICP备19023445号-2号
友情链接