diff --git a/.vimrc b/.vimrc index 5a3799e..76d7973 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,5 @@ +" leader key +:let mapleader = "," " vim statusline - kein plugin " https://shapeshed.com/vim-statuslines/ function! GitBranch() @@ -37,6 +39,7 @@ Plugin 'VundleVim/Vundle.vim' "Plugin 'matze/vim-move' Plugin 'sheerun/vim-polyglot' Plugin 'Xuyuanp/nerdtree-git-plugin' +Plugin 'jeetsukumaran/vim-buffergator' Plugin 'mhinz/vim-signify' Plugin 'ctrlpvim/ctrlp.vim' Plugin 'lifepillar/vim-solarized8' @@ -76,10 +79,38 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr \ quit | endif " " Tastenkürzel -nmap :tabnew:NERDTreeFind +"nmap :tabnew:NERDTreeFind " erstellt neuen tab und öffnet den open-dialog " -" nerdtree-git-plugin +" buffers +" https://joshldavis.com/2014/04/05/vim-tab-madness-buffers-vs-tabs/ +" +" This allows buffers to be hidden if you've modified a buffer. +" " This is almost a must if you wish to use buffers in this way. +set hidden +" +"" To open a new empty buffer +" This replaces :tabnew which I used to bind to this mapping +nmap :enew +" +"" Move to the next buffer +nmap :bnext + +" Move to the previous buffer + nmap :bprevious +" +"" Close the current buffer and move to the previous one +" This replicates the idea of closing a tab + nmap bq :bp bd # +" +"" Show all open buffers and their status +nmap bl :ls" +" " +" " +" " +" " +" +"" nerdtree-git-plugin let g:NERDTreeGitStatusIndicatorMapCustom = { \ 'Modified' :'*', \ 'Staged' :'+', @@ -99,9 +130,7 @@ let g:NERDTreeGitStatusIndicatorMapCustom = { filetype plugin indent on " " allgemeine Optionen -set number set showcmd -set showtabline=2 " zeigt immer die 'tabline' set showbreak=+++ set textwidth=100 set showmatch