add buffer splitting to vim

Uses same bind as tmux, only with leader instead of C-a in front of it.
This commit is contained in:
Marty Oehme 2019-05-20 13:07:10 +02:00
parent 5a5d6129d5
commit d0dc8ed763

View file

@ -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 '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) 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 " For async completion
Plug 'Shougo/deoplete.nvim', { 'on': [] } " automatic suggestions, can also perhaps be changed for newer plugs 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 Plug 'w0rp/ale', { 'on': [] } " asynchronous linting - might be superseded by lsp or coc.nvim at some point
@ -280,6 +284,11 @@ inoremap jk <ESC>
" first place " first place
nnoremap <leader>/ :noh<cr> nnoremap <leader>/ :noh<cr>
" split buffers vertically/horizontally with the leader \ or - (mirrors my
" tmux setup)
nnoremap <leader>- :sp<cr>
nnoremap <leader>\ :vsp<cr>
" move around between matching brackets with tab " move around between matching brackets with tab
nnoremap <tab> % nnoremap <tab> %
nnoremap <tab> % nnoremap <tab> %
@ -304,7 +313,6 @@ nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
" automatically on saving " automatically on saving
" autocmd BufWritePre * :%s/\s\+$//e " autocmd BufWritePre * :%s/\s\+$//e
" 'open new tab' with leader-t (opens new buffer and switches to it) " 'open new tab' with leader-t (opens new buffer and switches to it)
" open actual new tab with leader-T " open actual new tab with leader-T
nnoremap <leader>t :vsp .<cr> nnoremap <leader>t :vsp .<cr>
@ -321,6 +329,10 @@ nnoremap <leader><C-e> :NERDTreeVCS<CR>
" open current nerdtree with current file highlighted " open current nerdtree with current file highlighted
nnoremap <leader>E :NERDTreeFind<CR> nnoremap <leader>E :NERDTreeFind<CR>
" Call leaderf with <leader-f> (necessary to enable leaderf lazyloading)
nnoremap <leader>f :LeaderfFile<cr>
nnoremap <leader>F :LeaderfBuffer<cr>
" Mostly dealing with Prose writing from here on out " Mostly dealing with Prose writing from here on out
" Format current Paragraph (esp useful in prose writing) " Format current Paragraph (esp useful in prose writing)
nnoremap <silent> <leader>q gqap nnoremap <silent> <leader>q gqap
@ -330,10 +342,6 @@ nnoremap <silent> <leader>Q vapJgqap
" Enter distraction free prose mode with F11 " Enter distraction free prose mode with F11
noremap <F11> :Goyo<CR> noremap <F11> :Goyo<CR>
" Call leaderf with <leader-f> (necessary to enable leaderf lazyloading)
nnoremap <leader>f :LeaderfFile<cr>
nnoremap <leader>F :LeaderfBuffer<cr>
" }}} " }}}
" ================================================================================ " ================================================================================
" END " END