chore(vim): add goyo.vim and configuration

This commit is contained in:
Stefan Imhoff
2021-12-11 13:57:32 +01:00
parent da395b1cac
commit bc2ac493d7
3 changed files with 32 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ source ~/.config/nvim/plugins/bookmarks.vim
source ~/.config/nvim/plugins/bufferline.lua
source ~/.config/nvim/plugins/colorizer.lua
source ~/.config/nvim/plugins/dashboard.vim
source ~/.config/nvim/plugins/goyo.vim
source ~/.config/nvim/plugins/ultisnips.vim
source ~/.config/nvim/plugins/vim-easymotion.vim
source ~/.config/nvim/plugins/web-devicons.lua

View File

@@ -36,6 +36,7 @@ Plug 'tpope/vim-abolish'
Plug 'APZelos/blamer.nvim'
Plug 'MattesGroeger/vim-bookmarks'
Plug 'godlygeek/tabular'
Plug 'junegunn/goyo.vim'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'windwp/nvim-autopairs'

30
nvim/plugins/goyo.vim Normal file
View File

@@ -0,0 +1,30 @@
" Goyo
" https://github.com/junegunn/goyo.vim
function! s:goyo_enter()
if executable('tmux') && strlen($TMUX)
silent !tmux set status off
silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
endif
set noshowmode
set noshowcmd
set scrolloff=999
Gitsigns toggle_signs
endfunction
function! s:goyo_leave()
if executable('tmux') && strlen($TMUX)
silent !tmux set status on
silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
endif
set showmode
set showcmd
set scrolloff=8
Gitsigns toggle_signs
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
" Mappings
noremap <leader>z :Goyo<CR>