set nocompatible
syntax on
" Vundle magic
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'rbgrouleff/bclose.vim'
Plugin 'jiangmiao/auto-pairs'
" Plugin 'airblade/vim-gitgutter'
Plugin 'roblillack/vim-bufferlist'
Plugin 'ervandew/supertab'
Plugin 'scrooloose/nerdtree'
Plugin 'ctrlpvim/ctrlp.vim'
call vundle#end()
filetype plugin indent on
" Line & column numbers
set number
set ruler
" Indentation & co.
set autoindent
set expandtab
set tabstop=4
set shiftwidth=4
set colorcolumn=80
set so=8
" UTF8 or die
" set encoding=utf8
" Show trailing whitespaces and tabs
set list lcs=trail:·,tab:»·
" Color scheme & font
set background=dark
" colorscheme base16-atelierlakeside
colorscheme two-firewatch
set gfn=Hack:h12 " Inconsolata:h14
" Key bindings
nmap <C-k> :call BufferList()<CR>
nmap <C-a> :NERDTreeToggle<CR>
nmap <C-l> :vs<CR>
nmap <C-b> :Bclose<CR>
" nmap <C-p> :CtrlP .<CR>
imap ^[OA <ESC>ki
imap ^[OB <ESC>ji
imap ^[OC <ESC>li
imap ^[OD <ESC>hi
cabbrev cws %s/\s\+$//e " Clear whitespaces
command! W w
" Misc
let g:SuperTabDefaultCompletionType = "<c-n>"
let g:SuperTabLongestHighlight = 1
set complete-=i
" set updatetime=250 " GitGutter update time
set mouse=a " Enable mouse features
set clipboard=unnamed " Enable clipboard features
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*virtualenv*,logs/*
set whichwrap+=<,>,h,l,[,] " Go to previous/next line when at end of line
" Search highlighting
set hlsearch
" Do not show scrollbars
set guioptions-=R
set guioptions-=L
" Allow Shift+Arrow text selection
nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
vmap <S-Left> <Left>
vmap <S-Right> <Right>
imap <S-Up> <ESC>v<Up>
imap <S-Down> <ESC>v<Down>
imap <S-Left> <ESC>v<Left>
imap <S-Right> <ESC>v<Right>
if has("gui_macvim")
nmap <C-Tab> :tabnext<CR>
nmap <C-S-Tab> :tabprev<CR>
imap <C-Tab> <ESC>:tabnext<CR>
imap <C-S-Tab> <ESC>:tabprev<CR>
endif