-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
75 lines (65 loc) · 1.65 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
nnoremap <silent> <C-l> :nohl<CR><C-l>
inoremap jj <esc>
syntax on
" reminders:
" tabstop: Width of \t
" softtabstop: Amount of whitespace a tab keypress will produce in
" shiftwidth Determines the amount of whitespace to add in normal mode
" expandtab: Use spaces instead of tabs
set autoindent
set expandtab
set nohlsearch
set ignorecase
set incsearch
set laststatus =2
set number
set relativenumber
set ruler
set shiftwidth =2
set showcmd
set smartcase
set softtabstop =4
set splitbelow
set splitright
set tabstop =4
set undodir=$HOME/.vimundo
set undofile
fun CSetup()
setl expandtab
setl shiftwidth =4
setl softtabstop =4
setl tabstop =4
endfun
fun PythonSetup()
setl expandtab
setl shiftwidth =4
setl softtabstop =4
setl tabstop =4
endfun
fun MakefileSetup()
setl noexpandtab
setl shiftwidth =8
setl softtabstop =8
setl tabstop =8
endfun
fun RustSetup()
setl expandtab
setl shiftwidth =4
setl softtabstop =4
setl tabstop =4
endfun
fun YamlSetup()
setl expandtab
setl shiftwidth =2
setl softtabstop =2
setl tabstop =2
endfun
" :setfiletype <C>-d to autocomplete available FileTypes from all directories
" that vim uses for syntax highlighting definitions
autocmd FileType c call CSetup()
autocmd FileType cpp call CSetup()
autocmd FileType python call PythonSetup()
autocmd FileType make call MakefileSetup()
autocmd FileType rust call RustSetup()
autocmd FileType yaml call YamlSetup()
au BufNewFile,BufRead,BufReadPost *.mail set syntax=HTML