]> git.r.bdr.sh - rbdr/dotfiles/commitdiff
Add goyo and limelight to vim
authorRuben Beltran del Rio <redacted>
Mon, 28 Jun 2021 20:06:37 +0000 (22:06 +0200)
committerRuben Beltran del Rio <redacted>
Mon, 28 Jun 2021 20:06:37 +0000 (22:06 +0200)
vimrc

diff --git a/vimrc b/vimrc
index cbfdad22245b6cdf2178b0490d86d9ea5d718f9d..d457e33517572b825c25ea8c7bd9f13b2aacd801 100755 (executable)
--- a/vimrc
+++ b/vimrc
@@ -185,6 +185,17 @@ inoremap <C-S-k> <Esc>:m .-2<CR>==gi
 vnoremap <C-S-j> :m '>+1<CR>gv=gv
 vnoremap <C-S-k> :m '<-2<CR>gv=gv
 
+" Limelight / Goyo config
+
+autocmd! User GoyoEnter Limelight
+autocmd! User GoyoLeave Limelight!
+nnoremap <C-S-l> :Limelight!!<CR>==
+inoremap <C-S-l> <Esc>:Limelight!!<CR>==gi
+vnoremap <C-S-l> :<C-u>Limelight!!<CR>gv=gv
+nnoremap <C-S-g> :Goyo<CR>==
+inoremap <C-S-g> <Esc>:Goyo<CR>==gi
+vnoremap <C-S-g> :<C-u>Goyo<CR>gv=gv
+
 "
 " Plug Config
 "
@@ -208,6 +219,10 @@ Plug 'tpope/vim-endwise'
 Plug 'rstacruz/vim-closer'
 Plug 'michaeljsmith/vim-indent-object'
 
+" Distraction free editing
+Plug 'junegunn/goyo.vim'
+Plug 'junegunn/limelight.vim'
+
 " Tools
 Plug 'editorconfig/editorconfig-vim'
 Plug 'dense-analysis/ale'