-
Notifications
You must be signed in to change notification settings - Fork 15
/
.vimrc
133 lines (103 loc) · 2.31 KB
/
.vimrc
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
" -polka-
scriptencoding utf-8
"=============================================
" Initialization
"=============================================
" Load user settings
if filereadable(expand('~/.vimrc.plugin_settings'))
source ~/.vimrc.plugin_settings
endif
" Load pathogen if it is found
if filereadable(expand('~/.vim/bundle/vim-pathogen/autoload/pathogen.vim'))
source ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
endif
" Start .vimrc
set nocompatible
filetype plugin indent on
"=============================================
" Options
"=============================================
" Enable utf-8
set encoding=utf-8
" Color
set t_Co=256
set background=dark
colorscheme base16-default
syntax on
" Turn off error bells
set noerrorbells
set visualbell
set t_vb=
" Search
set ignorecase
set smartcase
set hlsearch
set incsearch
" Tab completion
set wildmode=list:longest,full
set wildignore=*.swp,*.o,*.so,*.exe,*.dll
set wildmenu
" Scroll
set scrolloff=3
" Tab settings
set ts=2
set sw=2
set expandtab
" Hud
set ruler
set number
set cursorline
set laststatus=2 " Always show status bar
set nowrap
" Visible whitespace
set listchars=tab:»·,trail:·
set list
" Buffers
set hidden
" History
set history=1000
set undolevels=1000
" Backup Directories
set backupdir=~/.vim/backups,.
set directory=~/.vim/swaps,.
if exists('&undodir')
set undodir=~/.vim/undo,.
endif
" Fix backspace
set backspace=indent,eol,start
" GUI options
if (has('gui_running'))
set guifont=Inconsolata-dz:h12
set guioptions-=T
set guioptions-=m
endif
"=============================================
" Remaps
"=============================================
let mapleader=','
let maplocalleader=','
" No arrow keys
map <Left> :echo "ಠ_ಠ"<cr>
map <Right> :echo "ಠ_ಠ"<cr>
map <Up> :echo "ಠ_ಠ"<cr>
map <Down> :echo "ಠ_ಠ"<cr>
" Jump key
nnoremap ` '
nnoremap ' `
" Change pane
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Turn off search highlight
nnoremap <localleader>/ :nohlsearch<CR>
" Trim trailing whitespace
nnoremap <localleader>ws m`:%s/\s\+$//e<CR>``
"=============================================
" Additional Config Files
"=============================================
" Load user settings
if filereadable(expand('~/.vimrc.local'))
source ~/.vimrc.local
endif