Easy Focus Mode in Vim
If you like full-screen focus mode on text editors (like Sublime's), you might have wanted the same thing in Vim. I know of at least one other plugin that lets you do this, but here's a very simple method that you can paste right into your .vimrc
and just use. It was written by Paul Rouget.
""" FocusMode
function! ToggleFocusMode()
if (&foldcolumn != 12)
set laststatus=0
set numberwidth=10
set foldcolumn=12
set noruler
hi FoldColumn ctermbg=none
hi LineNr ctermfg=0 ctermbg=none
hi NonText ctermfg=0
else
set laststatus=2
set numberwidth=4
set foldcolumn=0
set ruler
execute 'colorscheme ' . g:colors_name
endif
endfunc
nnoremap <F1> :call ToggleFocusMode()<cr>
Written by Benjamin Harris
Related protips
1 Response
A screenshot would be great.
EDIT: Much better, thanks. I might give it a try :)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#