Created
November 2, 2016 01:44
-
-
Save 9999years/c4d5ea8102df6df1a4e66edcc7ea6620 to your computer and use it in GitHub Desktop.
This file contains 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
"a quick vim script for distraction free writing | |
"use :NoDistractions | |
"turns off line numbers etc, shows word count in the ruler, | |
"no status line | |
"only in the current buffer | |
function! NoDistractions() | |
setlocal nolist | |
setlocal laststatus=0 | |
setlocal rulerformat=%{wordcount().words} | |
setlocal nonumber | |
setlocal cmdheight=1 | |
"see :h i_CTRL-\_CTRL-O | |
inoremap <buffer> <C-s> <C-\><C-o>:w<CR> | |
endfunction | |
command! -nargs=0 NoDistractions call NoDistractions() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment