aboutsummaryrefslogtreecommitdiff
path: root/stow/vim/.vim/rc/settings.vim
blob: e09753ea9fa64f3cd46eea4078f7fd2d4f78772e (plain)
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
let mapleader = ","

" Basic settings
set nocompatible
set encoding=utf-8
set number relativenumber
set tabstop=4
set shiftwidth=4
set scrolloff=2
set wildmode=longest,list,full
set splitbelow
set splitright
set vb " No bell
exec "set listchars=tab:\uBB·,trail:\uB7,nbsp:~"

" Searching
set ignorecase
set wrapscan
set incsearch
set nohlsearch

" Vertical split character
set fillchars+=vert:█

"Clean trailing whitespaces on save
autocmd BufWritePre * %s/\s\+$//e

" Autoupdate ~/.Xresources
autocmd BufWritePost ~/.Xresources !xrdb %

" Generate ~/.mainpage/urls on ~/.config/qutebrowser save
autocmd BufWritePost ~/.config/qutebrowser/config.py !grep -e \'.*\':\ \'.*{}.*\' "$HOME/.config/qutebrowser/config.py" | grep -v DEFAULT | sed 's/,//; s/^\ *//' > ~/.mainpage/urls