Skip to content

vim 配置 #1

Description

@patricksuo
set nocompatible              " be iMproved, required
filetype off                  " required

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'

Plugin 'Valloric/YouCompleteMe'
Plugin 'scrooloose/nerdtree'
Plugin 'Yggdroot/LeaderF'
Plugin 'ludovicchabant/vim-gutentags'
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'ericbn/vim-solarized'

" Add maktaba and codefmt to the runtimepath.
" (The latter must be installed before it can be used.)
Plugin 'google/vim-maktaba'
Plugin 'google/vim-codefmt'
" Also add Glaive, which is used to configure codefmt's maktaba flags. See
" `:help :Glaive` for usage.
Plugin 'google/vim-glaive'


call vundle#end()            " required

call glaive#Install()

filetype plugin indent on    " required

" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup

" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup

au FileChangedShell * echo "Warning: File changed on disk"

autocmd FileType c,cpp setlocal et sta sw=2 sts=2


filetype indent plugin on
set ruler
set number 
set showcmd
set nocompatible 
"set cursorline
syntax enable
set background=dark
"set background=light
colorscheme solarized
let g:solarized_termcolors=256



let NERDTreeShowLineNumbers = 1 "在nerdtree中显示行号
let  NERDTreeQuitOnOpen = 0
let NERDTreeWinSize=40
let NERDTreeBookmarksFile=expand("$HOME/.vim-NERDTreeBookmarks")
let NERDTreeShowBookmarks=1
"F5打开/关闭nerdtree
map <silent> <F5> :NERDTreeToggle<cr>
noremap <c-p> :LeaderfBufTag!<cr>

" highlight search result
set hls


" Disable annoying beeping
set noerrorbells
set vb t_vb=

let g:cpp_class_scope_highlight = 1


augroup autoformat_settings
	autocmd FileType c,cpp,proto,javascript AutoFormatBuffer clang-format
augroup END

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions