diff options
author | Daniel Weipert <code@drogueronin.de> | 2021-12-24 11:42:43 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2021-12-24 11:42:43 +0100 |
commit | 925369e97824733ed3ea321663d4db2cbacea7dc (patch) | |
tree | 3695640d1f9f40bec65bf4f676ee296335b4e134 /.config/nvim | |
parent | ce9297c354ce3b2fb20f83d2e26b1b2bc77b70c7 (diff) |
Adjusts nvim config
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/init.vim | 21 |
1 files changed, 17 insertions, 4 deletions
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 <SPACE> <Nop> 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 <C-b> <cmd>NERDTreeToggle<CR> @@ -51,6 +58,7 @@ nnoremap <leader><leader> <cmd>Telescope buffers<CR> " Keys " " +" buffer pane navigation nnoremap <A-Left> <C-w><Left> nnoremap <A-Up> <C-w><Up> nnoremap <A-Right> <C-w><Right> @@ -59,6 +67,11 @@ nnoremap <A-Down> <C-w><Down> nnoremap <C-Left> <cmd>tabprevious<CR> nnoremap <C-Right> <cmd>tabnext<CR> +" esc / quit map <ESC><C-c> <CR> -nnoremap <silent> <C-s> :w<CR> +nnoremap <C-q> <cmd>q<CR> + +" save +nnoremap <silent> <C-s> <cmd>w<CR> +inoremap <silent> <C-s> <ESC><cmd>w<CR> |