-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
executable file
·75 lines (63 loc) · 1.9 KB
/
.vimrc
File metadata and controls
executable file
·75 lines (63 loc) · 1.9 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
syntax enable "Enable syntax highlighting
set foldmethod=syntax
set foldlevelstart=99
set noexpandtab " Don't convert tabs to spaces
if v:version > 703
set number
endif
set relativenumber
set nuw=4
set nocompatible " Don't act compatible with vi
set incsearch " Enable incremental search
set autoindent " Enable automatic indenting
set hlsearch " Enable highlighting of search matches
set smartindent " Enable smart-starting of indentation when starting a block
set tabstop=8
set shiftwidth=8
set softtabstop=8
set tildeop " ~ can be used as an operator (invert case)
filetype off
set rtp+=~/.vim/bundle/vundle
call vundle#rc()
" Vundle config
Bundle 'gmarik/vundle'
Bundle 'scrooloose/syntastic'
Bundle 'Valloric/YouCompleteMe'
Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim'}
Bundle 'git://git.wincent.com/command-t.git'
Bundle 'bitc/vim-hdevtools'
filetype plugin indent on
set laststatus=2
let skip_loading_mswin=1
set wildignore+=*.o,.git,CMakeFiles,CMakeCache.txt
let mapleader=","
let maplocalleader=";"
" Filetype autodetects
autocmd BufNewFile,BufRead *.cl setf opencl
" for gvim
if has('gui_running')
set go-=f
set go-=T
set go-=r
set go-=m
set gfn=Inconsolata\ for\ Powerline\ 10
endif
" hotkey aliases
nnoremap <F9> :!make<cr>
nnoremap <F5> :YcmForceCompileAndDiagnostics<cr>
nnoremap <Space> :nohl<cr>
" Maps o to have special functionality when in a c/c++ file with
" a blank function with braces on the same line like this:
" void foo() {}
" to split the braces
function mine:FixBraces()
if match(getline("."), '{\s*}') != -1
execute "normal! ^f{di}i\<cr>\<tab>\<cr>\<esc>k$"
else
execute "normal! o\<esc>"
endif
endfunction
autocmd FileType c,cpp nnoremap <buffer> <localleader>i :call mine:FixBraces()<cr>a
autocmd FileType haskell nnoremap <buffer> <F1> :HdevtoolsType<CR>
autocmd FileType haskell nnoremap <buffer> <silent> <F2> :HdevtoolsClear<CR>
let g:syntastic_cpp_checkers=['ycm','gcc']