set mouse=a set splitright set updatetime=250 " tabs, spaces set shiftwidth=2 set tabstop=2 set expandtab set list set listchars=tab:\ \ ,trail:- " ruler set relativenumber number augroup numbertoggle autocmd! autocmd BufEnter,WinEnter * if &nu && mode() != 'i' | set relativenumber | endif autocmd BufLeave,WinLeave * if &nu | set norelativenumber | endif augroup END " diff if &diff autocmd BufEnter * if winnr('$') == 1 | quit | endif endif " pdf autocmd BufWinEnter *.pdf split | exe expandcmd("terminal firefox ':p'") | quit " libreoffice function LOOpen() split exe expandcmd("terminal libreoffice %") quit endfunction command! LOOpen call LOOpen()