-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
156 lines (119 loc) · 3.29 KB
/
vimrc
File metadata and controls
156 lines (119 loc) · 3.29 KB
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
" Set encoding to UTF-8
set encoding=utf-8
" Necessary on some Linux distros for pathogen to properly load bundles
filetype off
" Load all Neobundle Bundles
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" gvim settings
if has('gui_running')
set guioptions=-M
set lines=999 columns=999
endif
call neobundle#begin(expand('~/.vim/bundle'))
let g:neobundle#types#git#default_protocol = 'https'
NeoBundleFetch 'Shougo/neobundle.vim'
source ~/.vim/neobundle.vim
call neobundle#end()
NeoBundleCheck
" Set vim-specific functions available, breaking compatibility with vi
set nocompatible
" Line number
set number
" Color settings
syntax on
set t_Co=256
colorscheme molokai
set cursorline!
set lazyredraw
set cursorcolumn
hi Visual term=reverse cterm=reverse guibg=Grey
" Search options
set incsearch
set hlsearch
nnoremap <CR> :nohlsearch <CR><CR>
" History setup
set history=700
set undolevels=700
" Line wrapping options
set nowrap
" Enable mouse use in all modes
set mouse=a
" Disable visual bells
set visualbell t_vb=
" Hide files in Ex
let g:netrw_list_hide= '.*\.pyc$'
" Statusline setup
set statusline=%f\ " Filename
set statusline+=%c, " Cursor Column
set statusline+=%l/%L " Cursor Line/Total Lines
set statusline+=%{StatuslineTrailingSpaceWarning()}
set laststatus=2
" Indentation settings
set sw=4
set sts=4
set expandtab
set autoindent
" Loading indent and plugins depending on the filetype
filetype plugin on
filetype indent on
" Folding settings
set nofoldenable
" Fix slow O inserts
set timeout timeoutlen=1000 ttimeoutlen=100
" Command line completion
set wildmode=list:longest
set wildmenu
set wildignore=*.o,*.obj,*.swp,*~,#*#
" Display tabs and trailing spaces
set list
set listchars=tab:\ ¬,trail:.
" Allow backgrounding buffers without writing them, and remember marks/undo
" for backgrounded buffers
set hidden
set switchbuf=useopen
" Store temporary files in a central spot
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
" Abbreviations to keep me from going insane
source ~/.vim/abbreviations.vim
" Changing default leader key
let mapleader=","
" File type configuration
source ~/.vim/fileconfig.vim
" Functions
source ~/.vim/functions.vim
" Leader commands
source ~/.vim/keymap.vim
" Snippets
source ~/.vim/snippets.vim
" Ctrl P setup
let g:ctrlp_map = "<C-P>"
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|\.svn$\|node_modules$',
\ 'file': '\.pyc$',
\ }
let g:ctrlp_working_path_mode = 2
let g:ctrlp_dotfiles = 0
let g:ctrlp_max_files = 99999999
" NERDTree setup
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" Ctrl-Space setup
let g:ctrlspace_symbols = {
\ "cs" : "#",
\ "tab" : "⊙",
\ "all" : "∷",
\ "open" : "◎",
\ "tabs" : "○",
\ "c_tab" : "●",
\ "load" : "⋮ → ∙",
\ "save" : "∙ → ⋮",
\ "prv" : "⌕",
\ "s_left" : "›",
\ "s_right" : "‹"
\ }
" EasyMotion setup
let g:EasyMotion_leader_key = ';'
" Recalculate the trailing whitespace warning when idle, and after saving
autocmd cursorhold,bufwritepost * unlet! b:statusline_trailing_space_warning