-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
76 lines (66 loc) · 1.34 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
" Gerard Marull-Paretas <[email protected]>
" SPDX-License-Identifier: MIT
" vim is not vi
set nocompatible
" allow local .vimrc
set exrc
set secure
" formatting
set tabstop=8
set shiftwidth=8
set softtabstop=8
set autoindent
set smarttab
" behaviour
set hidden
set backspace=indent,eol,start
set textwidth=80
set undofile
set undodir=~/.vimundo
set timeoutlen=1000
set ttimeoutlen=0
" appearance
set encoding=utf-8
set termencoding=utf-8
set colorcolumn=80
set nowrap
set wildmenu
set cursorline
set number
" searching
set hlsearch
set incsearch
set smartcase
set ignorecase
" colors
syntax enable
set background=dark
colorscheme solarized
" specific filetype settings
autocmd FileType html,css,tex setlocal expandtab softtabstop=2 shiftwidth=2
autocmd FileType python setlocal expandtab softtabstop=4 shiftwidth=4
" key bindings
let mapleader = ","
"" disable highlights
map <silent> <leader><space> :nohl<CR>
"" remove trailing spaces
nnoremap <Leader>rtw :%s/\s\+$//e<CR>
" plugin: airline
set laststatus=2
let g:airline#extensions#tabline#enabled=1
let g:airline#extensions#tabline#fnamemod=':t'
let g:airline_left_sep=''
let g:airline_right_sep=''
let g:airline_mode_map = {
\ '__' : '-',
\ 'n' : 'N',
\ 'i' : 'I',
\ 'R' : 'R',
\ 'c' : 'C',
\ 'v' : 'V',
\ 'V' : 'V',
\ '' : 'V',
\ 's' : 'S',
\ 'S' : 'S',
\ '' : 'S',
\ }