summaryrefslogtreecommitdiff
path: root/.vimrc
blob: 742c7617da1640229660a441434a26fddd33b706 (plain)
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Display

set cc=100
set nowrap
set number

syntax on

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Indentation

set autoindent
set expandtab
set shiftwidth=4
set smarttab

autocmd FileType make setlocal noexpandtab

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Key maps

nnoremap <Space> :

if filereadable("Makefile")
    nnoremap t :!make -j4<Cr>
endif

if filereadable("build.sh")
    nnoremap t :!./build.sh<Cr>
endif

if filereadable("build/build.ninja")
    nnoremap t :!ninja -C build<Cr>
endif