-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
80 lines (67 loc) · 2.3 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
set nocompatible
filetype off
" set the runtime path to include Vundle
set rtp+=$HOME/.vim/bundle/Vundle.vim/
call vundle#begin('$HOME/.vim/bundle/')
" let Vundle manage Vundle
Plugin 'VundleVim/Vundle.vim'
" add NERDTree to show dirs
Plugin 'scrooloose/nerdtree'
" shows git status in the gutter
Plugin 'airblade/vim-gitgutter'
" suggests syntax
" Plugin 'vim-syntastic/syntastic'
" run gdb in vim by running :ConqueGdbSplit ./executable
Plugin 'vim-scripts/Conque-GDB'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
syntax enable " enable syntax highlighting
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set shiftwidth=4 " indent corresponding to one tab
set expandtab " tabs are spaces
set number " show line numbers
set relativenumber
set showcmd " show command in bottom bar
set cursorline " highlight current line
set showmatch " highlight match [{()}]
set mouse=a " enable mouse click
nnoremap B ^
nnoremap E $
" colorscheme brogrammer
" always open up vim with NERDTree open
autocmd VimEnter * NERDTree
" always start off in the main windows
autocmd VimEnter * wincmd p
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
map <C-n> : NERDTreeToggle<CR>
set statusline=bot
highlight Comment ctermfg=LightBlue
highlight ExtraWhitespace ctermbg=red guibg=red
" use actual tab chars in Makefile
autocmd Filetype make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab
autocmd Filetype h setlocal expandtab shiftwidth=4 softtabstop=4
autocmd Filetype c setlocal expandtab shiftwidth=4 softtabstop=4
autocmd Filetype cpp setlocal expandtab shiftwidth=4 softtabstop=4
" Enable Folding {{{
set foldenable
set foldlevelstart=10
set foldnestmax=10
set foldmethod=indent
"}}}
" use space for folding
nnoremap <space> za
" use ctrl+space to do autocompletion in insert mode
inoremap <Nul> <C-p>
" use ctrl+space to do spelling suggestion in normal mode
nnoremap <Nul> z=
" Surround anything selected with the given mathich quotes, bracket, etc
map '' xi'<Esc>pa'<Esc>
map "" xi"<Esc>pa"<Esc>
map () xi(<Esc>pa)<Esc>
map [] xi[<Esc>pa]<Esc>
map {} xi{<Esc>pa}<Esc>
" Folding for this file {{{
set modelines=1
" }}}