133 lines
2.8 KiB
VimL
133 lines
2.8 KiB
VimL
" Vundle package managment
|
|
set nocompatible
|
|
filetype off
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
call vundle#begin()
|
|
Plugin 'altercation/vim-colors-solarized'
|
|
Plugin 'cohama/lexima.vim'
|
|
Plugin 'gmarik/Vundle.vim'
|
|
Plugin 'bling/vim-airline'
|
|
Plugin 'easymotion/vim-easymotion'
|
|
Plugin 'hdima/python-syntax'
|
|
Plugin 'scrooloose/syntastic'
|
|
Plugin 'nvie/vim-flake8'
|
|
Plugin 'kien/ctrlp.vim'
|
|
Plugin 'mattn/emmet-vim'
|
|
Plugin 'tomtom/tcomment_vim'
|
|
Plugin 'octol/vim-cpp-enhanced-highlight'
|
|
Plugin 'tpope/vim-fugitive'
|
|
Plugin 'tpope/vim-surround'
|
|
Plugin 'nixprime/cpsm'
|
|
Plugin 'Valloric/YouCompleteMe'
|
|
Plugin 'rhysd/vim-clang-format'
|
|
Plugin 'tmux-plugins/vim-tmux'
|
|
Plugin 'tmux-plugins/vim-tmux-focus-events'
|
|
Plugin 'Valloric/ListToggle'
|
|
Plugin 'jeetsukumaran/vim-buffergator'
|
|
call vundle#end()
|
|
|
|
set exrc
|
|
set secure
|
|
|
|
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
|
|
|
|
let mapleader=","
|
|
|
|
:command W w
|
|
:command Q q
|
|
:command WQ wq
|
|
:command Wq wq
|
|
|
|
"python with virtualenv support
|
|
py << EOF
|
|
import os
|
|
import sys
|
|
if 'VIRTUAL_ENV' in os.environ:
|
|
project_base_dir = os.environ['VIRTUAL_ENV']
|
|
activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
|
|
execfile(activate_this, dict(__file__=activate_this))
|
|
EOF
|
|
|
|
|
|
" Autoindent for filetype
|
|
filetype plugin indent on
|
|
set autoindent
|
|
|
|
set encoding=utf-8
|
|
set scrolloff=5
|
|
set sidescrolloff=10
|
|
|
|
set completeopt-=preview
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
" CtrlP
|
|
nnoremap <silent> <C-o> :CtrlPBuffer<CR>
|
|
let g:ctrlp_match_func = {'match': 'cpsm#CtrlPMatch'}
|
|
let g:cpsm_unicode=1
|
|
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
|
|
|
" Unsaved buffer switching
|
|
set hidden
|
|
|
|
let g:clang_format#style_options = {
|
|
\ "AccessModifierOffset" : -4,
|
|
\ "AllowShortIfStatementsOnASingleLine" : "true",
|
|
\ "AlwaysBreakTemplateDeclarations" : "true",
|
|
\ "Standard" : "C++11"}
|
|
let g:clang_format#code_style = 'llvm'
|
|
" Line numbering
|
|
set number
|
|
set numberwidth=4
|
|
:set mouse=a
|
|
|
|
|
|
" Persistent undo
|
|
set undodir=~/.vim/undodir/
|
|
set undofile
|
|
set undolevels=1000
|
|
set undoreload=10000
|
|
|
|
" Searching
|
|
set ignorecase
|
|
set smartcase
|
|
set incsearch
|
|
set hlsearch
|
|
nnoremap <leader><space> :noh<CR>
|
|
|
|
" Text wrapping
|
|
set lbr
|
|
|
|
" Tabs
|
|
if has("autocmd")
|
|
filetype plugin indent on
|
|
autocmd FileType make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab
|
|
endif
|
|
|
|
" Quickfix
|
|
nnoremap <silent> <leader>f :YcmCompleter FixIt<CR>
|
|
|
|
" Terminal colors
|
|
set t_Co=256
|
|
|
|
set tabstop=4
|
|
set shiftwidth=4
|
|
set softtabstop=4
|
|
set expandtab
|
|
|
|
" Tab completion
|
|
set wildmode=longest,list
|
|
set wildmenu
|
|
|
|
set guifont=Ubuntu\ Mono\ derivative\ Powerline\ 13
|
|
let g:airline_powerline_fonts = 1
|
|
set laststatus=2
|
|
set ttimeoutlen=50
|
|
|
|
" Color scheme
|
|
syntax enable
|
|
let python_highlight_all=1
|
|
set background=dark
|
|
let g:solarized_termcolors=256
|
|
colorscheme solarized
|