aboutsummaryrefslogtreecommitdiff
path: root/vimrc
blob: ced19d582cc81c6e954037d4be13a1552782a29c (plain) (blame)
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
" Don't ensure compatibility with vi at all cost
set nocompatible
" More flexible backspace
set backspace=indent,eol,start
" Dark background
set bg=dark
set hlsearch
" Set the terminals title
set title
" Always show a status line
set laststatus=2
" Automatically indent, and do it smart
set autoindent smartindent
" Enhanced mode for command-line completion
set wildmenu
" Don't jump to the matching bracket automatically
set noshowmatch
" Enable ruler
set ruler
" Use UTF-8
set fileencoding=utf-8 encoding=utf-8
" Disable folding completely
set nofen
" Enable line numbers
" set nu
" Set the tabwidth
set ts=4
" Enable syntax highlighting
syntax on
" swap file directory
set directory=/tmp

" don't store .viminfo in $HOME
set viminfo+=n/tmp/.viminfo_atsu

" Highlighting for whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/

highlight IdentTab ctermbg=blue guibg=blue
match IdentTab /^\t\+/
autocmd BufWinEnter * match IdentTab /^\t\+/
autocmd InsertEnter * match IdentTab /^\t\+\%#\@<!/
autocmd InsertLeave * match IdentTab /^\t\+/

autocmd BufWinLeave * call clearmatches()