From 2243a7fd58faafb5cb4d2ab3947b3adab8eeb475 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 18 Jan 2023 13:38:08 +0100 Subject: [nvim] reorganize config and plugins --- .config/nvim/config/config.vim | 33 +++++++++++++++++++++++++++++++++ .config/nvim/config/keys.vim | 20 ++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .config/nvim/config/config.vim create mode 100644 .config/nvim/config/keys.vim (limited to '.config/nvim/config') diff --git a/.config/nvim/config/config.vim b/.config/nvim/config/config.vim new file mode 100644 index 0000000..0f2b65e --- /dev/null +++ b/.config/nvim/config/config.vim @@ -0,0 +1,33 @@ +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 BufEnter *.pdf split | exe expandcmd("terminal firefox :p") | quit diff --git a/.config/nvim/config/keys.vim b/.config/nvim/config/keys.vim new file mode 100644 index 0000000..bfb45e9 --- /dev/null +++ b/.config/nvim/config/keys.vim @@ -0,0 +1,20 @@ +" leader +nnoremap +let mapleader=" " + +" buffer pane navigation +nnoremap +nnoremap +nnoremap +nnoremap + +nnoremap tabprevious +nnoremap tabnext + +" esc / quit +map +nnoremap q + +" save +nnoremap w +inoremap w -- cgit v1.2.3