summaryrefslogtreecommitdiff
path: root/.config/nvim/config/config.vim
blob: 2c1b895a57528b369de9adda761728689aba9e87 (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
33
34
35
36
37
38
39
40
41
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

" colors
colorscheme darcula
set termguicolors
highlight Normal guibg=NONE ctermbg=NONE

" diff
if &diff
  autocmd BufEnter * if winnr('$') == 1 | quit | endif
endif

" pdf
autocmd BufWinEnter *.pdf split | exe expandcmd("terminal firefox '<afile>:p'") | quit

" libreoffice
function LOOpen()
  split
  exe expandcmd("terminal libreoffice %")
  quit
endfunction
command! LOOpen call LOOpen()