dotfiles/.vimrc

133 lines
2.8 KiB
VimL
Raw Normal View History

2016-01-24 19:32:42 +01:00
" Vundle package managment
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'altercation/vim-colors-solarized'
2016-09-03 15:46:24 +02:00
Plugin 'cohama/lexima.vim'
2016-01-24 19:32:42 +01:00
Plugin 'gmarik/Vundle.vim'
Plugin 'bling/vim-airline'
Plugin 'easymotion/vim-easymotion'
Plugin 'hdima/python-syntax'
2016-09-03 15:46:24 +02:00
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
2016-01-24 19:32:42 +01:00
Plugin 'kien/ctrlp.vim'
Plugin 'mattn/emmet-vim'
2016-09-03 15:46:24 +02:00
Plugin 'tomtom/tcomment_vim'
2016-01-24 19:32:42 +01:00
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
2016-09-03 15:46:24 +02:00
Plugin 'nixprime/cpsm'
2016-01-24 19:32:42 +01:00
Plugin 'Valloric/YouCompleteMe'
2016-09-03 15:46:24 +02:00
Plugin 'rhysd/vim-clang-format'
Plugin 'tmux-plugins/vim-tmux'
Plugin 'tmux-plugins/vim-tmux-focus-events'
Plugin 'Valloric/ListToggle'
Plugin 'jeetsukumaran/vim-buffergator'
2016-01-24 19:32:42 +01:00
call vundle#end()
set exrc
set secure
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
let mapleader=","
2016-09-03 15:46:24 +02:00
: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
2016-01-24 19:32:42 +01:00
filetype plugin indent on
set autoindent
set encoding=utf-8
2016-09-03 15:46:24 +02:00
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']
2016-01-24 19:32:42 +01:00
" Unsaved buffer switching
set hidden
2016-09-03 15:46:24 +02:00
let g:clang_format#style_options = {
\ "AccessModifierOffset" : -4,
\ "AllowShortIfStatementsOnASingleLine" : "true",
\ "AlwaysBreakTemplateDeclarations" : "true",
\ "Standard" : "C++11"}
let g:clang_format#code_style = 'llvm'
2016-01-24 19:32:42 +01:00
" Line numbering
set number
2016-09-03 15:46:24 +02:00
set numberwidth=4
:set mouse=a
2016-01-24 19:32:42 +01:00
" Persistent undo
2016-09-03 15:46:24 +02:00
set undodir=~/.vim/undodir/
2016-01-24 19:32:42 +01:00
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
2016-09-03 15:46:24 +02:00
" Quickfix
nnoremap <silent> <leader>f :YcmCompleter FixIt<CR>
2016-01-24 19:32:42 +01:00
" 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
2016-09-03 15:46:24 +02:00
" Color scheme
2016-01-24 19:32:42 +01:00
syntax enable
2016-09-03 15:46:24 +02:00
let python_highlight_all=1
2016-01-24 19:32:42 +01:00
set background=dark
let g:solarized_termcolors=256
colorscheme solarized