From d0dc8ed763221558fb9f17709bc0180248d86283 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 20 May 2019 13:07:10 +0200 Subject: [PATCH] add buffer splitting to vim Uses same bind as tmux, only with leader instead of C-a in front of it. --- .config/nvim/init.vim | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 2cdfb2d..b1ef3d4 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -79,6 +79,10 @@ Plug 'junegunn/goyo.vim', { 'for': ['mkd', 'txt'], 'on': 'Goyo' } " provide dist Plug 'junegunn/limelight.vim', { 'for': ['mkd', 'txt'], 'on': 'Goyo' } " provide even distraction free-er writing (lowlight paragraphs) Plug 'rhysd/vim-grammarous', { 'for': ['mkd', 'txt'], 'on': 'Goyo' } " integrate vim with languagetool for grammar checking (needs java8) +" Note-Taking Workflow +Plug 'vimwiki/vimwiki' +Plug 'michal-h21/vim-zettel' + " For async completion Plug 'Shougo/deoplete.nvim', { 'on': [] } " automatic suggestions, can also perhaps be changed for newer plugs Plug 'w0rp/ale', { 'on': [] } " asynchronous linting - might be superseded by lsp or coc.nvim at some point @@ -280,6 +284,11 @@ inoremap jk " first place nnoremap / :noh +" split buffers vertically/horizontally with the leader \ or - (mirrors my +" tmux setup) +nnoremap - :sp +nnoremap \ :vsp + " move around between matching brackets with tab nnoremap % nnoremap % @@ -304,7 +313,6 @@ nnoremap W :%s/\s\+$//:let @/='' " automatically on saving " autocmd BufWritePre * :%s/\s\+$//e - " 'open new tab' with leader-t (opens new buffer and switches to it) " open actual new tab with leader-T nnoremap t :vsp . @@ -321,6 +329,10 @@ nnoremap :NERDTreeVCS " open current nerdtree with current file highlighted nnoremap E :NERDTreeFind +" Call leaderf with (necessary to enable leaderf lazyloading) +nnoremap f :LeaderfFile +nnoremap F :LeaderfBuffer + " Mostly dealing with Prose writing from here on out " Format current Paragraph (esp useful in prose writing) nnoremap q gqap @@ -330,10 +342,6 @@ nnoremap Q vapJgqap " Enter distraction free prose mode with F11 noremap :Goyo -" Call leaderf with (necessary to enable leaderf lazyloading) -nnoremap f :LeaderfFile -nnoremap F :LeaderfBuffer - " }}} " ================================================================================ " END