vim

"tab缩进
set ts=4
set expandtab
set shiftwidth=4

"配色
syntax enable "语法高亮
set background=dark
colorscheme solarized

"set mouse=a "鼠标可用
set autoread "自动检测外部更改
set cindent "c文件自动锁紧
set autoindent "自动对齐

"set showmatch "显示匹配
"set hlsearch "高亮查找
set fdm=marker "语法高亮
"set cursorline "语法高亮
"set ruler "显示标尺
"set paste "粘贴 不能与autoindent共存
"set number

" 设置编码
set encoding=utf-8
set nocompatible
set laststatus=2
" 设置文件编码
set fenc=utf-8

" Vundle 配置 -------------------------

set nocompatible " required
filetype off " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'fatih/vim-go'
Bundle 'Blackrush/vim-gocode'
Plugin 'Valloric/YouCompleteMe'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)

" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required

" GO
" =====================================================
" vim-go --------------------------------

let g:go_disable_autoinstall = 0
let g:go_fmt_command = "goimports"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1

au FileType go nmap <Leader>i <Plug>(go-info)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap gd <Plug>(go-def-tab)

" go-code --------------------------------
"imap <F6> <C-x><C-o> "将F6 映射为自动补全快捷键

" PHP
" =====================================================
" The php doc plugin

let php_baselib = 1
let php_htmlInStrings = 1
let php_noShortTags = 1
let php_folding = 1
source ~/.vim/php-doc.vim
:imap <C-D> <ESC>:call PhpDocSingle()<CR>
:nmap <C-D> :call PhpDocSingle()<CR>
:vmap <C-D> :call PhpDocRange()<CR>
"open a NERDTree automatically when vim starts up
"autocmd vimenter * NERDTree

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • .vimrc内容如下 "=============================================...
    Morb1d阅读 1,030评论 0 0
  • 1下载vundle git clone https://github.com/VundleVim/Vundle.v...
    ad丶leo阅读 577评论 0 0
  • 快捷键 分屏 :split 或 :sp 水平分 上下:vsplit 或 :vs垂直分屏 左右关闭分屏 :qu...
    taobao阅读 471评论 0 1
  • 中文介绍 原来的repo放在 spf13-vim-leoatchina,因为原来一时脑抽,把中文字体放进去后导致体...
    leoatchina阅读 777评论 0 3
  • 我的学校“风水”还挺好的,校门口左有汇通中通,右有圆通申通,还有其他几位“大师”隐居在学校的各个地方,带来“一片生...
    柳涛虹阅读 221评论 0 1