Last active
June 16, 2020 10:08
-
-
Save naps62/20e71350443191dd002c6dc640eef0c4 to your computer and use it in GitHub Desktop.
Vim focus mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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