From 925369e97824733ed3ea321663d4db2cbacea7dc Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Fri, 24 Dec 2021 11:42:43 +0100 Subject: Adjusts nvim config --- .config/nvim/init.vim | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to '.config/nvim/init.vim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 3176eea..e143cd6 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -4,7 +4,7 @@ call plug#begin(stdpath('data') . '/plugged') -Plug 'gruvbox-community/gruvbox' +Plug 'doums/darcula' Plug 'preservim/nerdtree' Plug 'ryanoasis/vim-devicons' @@ -26,10 +26,10 @@ nnoremap let mapleader=" " set shiftwidth=2 -set nu rnu +set number set mouse=a -colorscheme gruvbox +colorscheme darcula hi Normal guibg=NONE ctermbg=NONE @@ -37,6 +37,13 @@ hi Normal guibg=NONE ctermbg=NONE let g:NERDTreeShowHidden=1 +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * NERDTree | if argc() > 0 || exists('s:std_ine') | wincmd p | endif +autocmd VimEnter * if argc() > 0 | silent NERDTreeFind | wincmd p | endif + +autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif +autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif + map NERDTreeToggle @@ -51,6 +58,7 @@ nnoremap Telescope buffers " Keys " " +" buffer pane navigation nnoremap nnoremap nnoremap @@ -59,6 +67,11 @@ nnoremap nnoremap tabprevious nnoremap tabnext +" esc / quit map -nnoremap :w +nnoremap q + +" save +nnoremap w +inoremap w -- cgit v1.2.3