-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
65 lines (64 loc) · 1.38 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
source /Users/stanley/.vundle
syntax on
" show row and column number
set ruler
" mouse support
set mouse=a
" tab configuration
set expandtab
set shiftwidth=4
set softtabstop=4
" show filename
set laststatus=2
" indent configuration
set autoindent
" highlight search
set incsearch
" disable octal incerment/decrement
set nrformats-=octal
" use line number
set nu
hi LineNr ctermfg=0
" wildmenu
set wildmenu
set wildmode=list:longest,full
" split behavior
set splitright
set splitbelow
" match paren
set showmatch
set matchtime=2
" display unprintable characters
set list
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
" convert current word to upper case
inoremap <c-u> <esc>viwUea
" autoread
set autoread
"
inoremap { {}<Left>
inoremap {<CR> {<CR>}<Esc>O
inoremap {{ {
inoremap {} {}
"
inoremap jk <esc>
set pastetoggle=<F2>
" Abbreviations
iabbrev scnaf scanf
iabbrev incldue include
" Makefile configuration
autocmd FileType make setlocal noexpandtab
" C configuration
autocmd FileType c setlocal cindent
" C++ configuration
autocmd FileType cpp :iabbrev <buffer> unss using namespace std;
autocmd FileType cpp setlocal cindent
" rb configuration
autocmd FileType ruby setlocal shiftwidth=2
autocmd FileType ruby setlocal softtabstop=2
" git commit
autocmd Filetype gitcommit setlocal spell textwidth=72
" indent base on file extension
if has('autocmd')
filetype plugin indent on
endif