PPaste!

Home - All the pastes - Authored by Thooms

Raw version

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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