Skip to content

Instantly share code, notes, and snippets.

@naps62

naps62/focus-mode.vim

Last active Jun 16, 2020
Embed
What would you like to do?
Vim focus mode
let g:focused = 0
function! Focus()
let g:focused = 1 - g:focused
if g:focused == 1
let b:coc_suggest_disable = 1
:Goyo 120
:Limelight
:Voom markdown
:exe "normal \<C-w>\<C-w>"
set nocursorline
set nocursorcolumn
set noshowmode
:nmap j jzz
:nmap k kzz
:nmap G Gzz
:silent !xdotool key --repeat 10 Ctrl+apostrophe
:silent !tmux set status off
else
let b:coc_suggest_disable = 0
:Goyo!
:Limelight!
:Voomquit
set cursorline
set cursorcolumn
set showmode
:unmap j
:unmap k
:unmap G
:silent !xdotool key Ctrl+0
:silent !tmux set status on
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.