summaryrefslogtreecommitdiffstats
path: root/.config/nvim/init.vim
blob: 8d7b9248cc50950c1eb5452567da4a9d817e6bea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
set clipboard+=unnamedplus
set nocompatible
set nohlsearch
set number
syntax on

" Automatically deletes all trailing whitespace and newlines at end of file on save.
autocmd BufWritePre * %s/\s\+$//e
autocmd BufWritepre * %s/\n\+\%$//e

" Reloads programs when config file is updated.
autocmd BufWritePost ~/.config/picom/picom.conf !pkill -USR1 picom
autocmd BufWritePost ~/.config/polybar/config !pkill -USR1 polybar
autocmd BufWritePost ~/.config/sxhkd/sxhkdrc !pkill -USR1 sxhkd
autocmd BufWritePost ~/.config/termite/config !pkill -USR1 termite