-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
140 lines (116 loc) · 4.22 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
133
134
135
136
137
138
139
140
set nocompatible " be iMproved, required
filetype off " required
" Note: need to
" `git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle`
" to get an intial copy of Vundle.
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
" Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
" Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
Plugin 'ycm-core/YouCompleteMe'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
set mouse=a
" 2-space tabs plz
set tabstop=2
set softtabstop=2
set shiftwidth=2
" don't choose (no)expandtab here, let ftplugins do it
" set expandtab
" Nicer pattern matching
set ignorecase
set smartcase
set incsearch
" Don't leave buffers unshown while modified
set nohidden
set showmatch
set ruler
if has("syntax")
set t_Co=256
syntax on
colorscheme wombat256
endif
" Make ':W' write the file too
command W w
set background=dark
set laststatus=2
set statusline=%f\ %m%r%h%w\ [%03.3b,%02.2B]\ %=%(%l,%v\ [%p%%]%)
set scrolloff=4
set showcmd
" Tweak the characters used when you 'set list' to see whitespace chars
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
let g:syntastic_python_checkers = ['pyflakes']
let g:syntastic_enable_signs = 0
" Is there a file with compiler flags to use?
if filereadable(".syntastic_cpp_flags")
let g:syntastic_cpp_compiler_options = readfile(".syntastic_cpp_flags")[0]
else
" Use a default that usually makes sense
let g:syntastic_cpp_compiler_options = '-std=c++0x -Wall -Wextra -Woverloaded-virtual -Isrc -Isrc/ext'
endif
if filereadable(".syntastic_c_flags")
let g:syntastic_c_compiler_options = readfile(".syntastic_c_flags")[0]
else
" Use a default that usually makes sense
let g:syntastic_c_compiler_options = '-std=c11 -Wall -Wextra -Isrc -Isrc/ext'
endif
" automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menuone,menu,longest,preview
set ofu=syntaxcomplete#Complete
" <F1> opening help is usually just a fat-finger; disable it.
" :help will still work.
map <F1> <Esc>
imap <F1> <Esc>
" tab-complete things more like bash
set wildmode=longest:list
" toggle hlsearch with leader-hl
nnoremap <Leader>hl :set hlsearch!<CR>
set nohlsearch
" toggle 'list' with leader-l
nnoremap <Leader>l :set list!<CR>
" toggle 'paste' with leader-p
nnoremap <Leader>p :set paste!<CR>
" leader-d for go to definition
nnoremap <Leader>d :YcmCompleter GoToDefinition<CR>
" leader-D for 'get docs'
nnoremap <Leader>D :YcmCompleter GetDoc<CR>
" leader-r for go to references
nnoremap <Leader>r :YcmCompleter GoToReferences<CR>
" leader-h for go to header/implfile
nnoremap <Leader>h :YcmCompleter GoToAlternateFile<CR>
" leader-F for go to FixIt
nnoremap <Leader>F :YcmCompleter FixIt<CR>
" leader-R for RefactorRename
nnoremap <Leader>R :YcmCompleter RefactorRename