Skip to content

Instantly share code, notes, and snippets.

@naps62
Last active June 16, 2020 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naps62/20e71350443191dd002c6dc640eef0c4 to your computer and use it in GitHub Desktop.
Save naps62/20e71350443191dd002c6dc640eef0c4 to your computer and use it in GitHub Desktop.
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