let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' if empty(glob(data_dir . '/autoload/plug.vim')) silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif set noerrorbells set nocompatible call plug#begin() Plug 'junegunn/goyo.vim' Plug 'reedes/vim-pencil' Plug 'godlygeek/tabular' Plug 'junegunn/limelight.vim' Plug 'vim-scripts/txt.vim' Plug 'reedes/vim-wordy' Plug 'vim-voom/VOoM' Plug 'preservim/vim-wheel' Plug 'dkarter/bullets.vim' Plug 'psliwka/vim-smoothie' Plug 'osyo-manga/vim-over' Plug 'mhinz/vim-startify' Plug 'farmergreg/vim-lastplace' Plug 'davidbeckingsale/writegood.vim' call plug#end() au FileType markdown setlocal foldlevel=99 set noswapfile set nocompatible if has("autocmd") filetype plugin indent on endif "vim-markdown shit let g:vim_markdown_frontmatter = 1 "prosemode shit : let w:ProseModeOn = 0 function EnableProseMode() setlocal spell spelllang=en_gb Goyo 100 SoftPencil WritegoodToggle echo "Prose Mode On" " Limelight Voom markdown endfu function EnableProseMode2() setlocal spell spelllang=en_gb Goyo 66 SoftPencil echo "Prose Mode On" " Limelight WritegoodToggle endfu function DisableProseMode() Goyo! NoPencil setlocal nospell " Limelight! echo "Prose Mode Off" WritegoodDisable endfu command Prose call EnableProseMode() command Prose2 call EnableProseMode2() command UnProse call DisableProseMode() command Reader call EnableReaderMode() function ScratchBufferize() setlocal buftype=nofile setlocal bufhidden=hide setlocal noswapfile endfu "autocmd VimEnter * PlugInstall " Colour names: let g:limelight_conceal_ctermfg = 'gray' autocmd BufEnter * :syntax sync fromstart augroup VCenterCursor au! au BufEnter,WinEnter,WinNew,VimResized *,*.* \ let &scrolloff=winheight(win_getid())/2 augroup END function! WordCount() let s:old_status = v:statusmsg let position = getpos(".") exe ":silent normal g\" let stat = v:statusmsg let s:word_count = 0 if stat != '--No lines in buffer--' let s:word_count = str2nr(split(v:statusmsg)[11]) let v:statusmsg = s:old_status end call setpos('.', position) return s:word_count endfunction set statusline= " clear the statusline for when vimrc is reloaded set statusline+=%-3.3n\ " buffer number set statusline+=%f\ " file name set statusline+=%h%m%r%w " flags set statusline+=[%{strlen(&ft)?&ft:'none'}, " filetype set statusline+=%{strlen(&fenc)?&fenc:&enc}, " encoding set statusline+=%{&fileformat}] " file format set statusline+=%10.10{WordCount()}w\ " wordcount set statusline+=%= " right align set statusline+=%{synIDattr(synID(line('.'),col('.'),1),'name')}\ " highlight set statusline+=%b,0x%-8B\ " current char set statusline+=%-14.(%l,%c%V%)\ %<%P " offset set noruler " set laststatus=2 " show statusline filetype indent off "quotes for the cow let g:startify_custom_header_quotes = [ \ [ '“All you have to do is write one true sentence. Write the truest sentence that you know.” So finally I would write one true sentence, and then go on from there. It was easy then because there was always one true sentence that I knew or had seen or had heard someone say.'], \ [ 'Write the best story that you can and write it as straight as you can. '], \ [ 'This book began magnificently, went on very well for a long way with great stretches of great brilliance and then went on endlessly in repetitions that a more conscientious and less lazy writer would have put in the waste basket.'], \ [ 'When I was writing, it was necessary for me to read after I had written. If you kept thinking about it, you would lose the thing that you were writing before you could go on with it the next day.'], \ [ 'When I had to write it, then it would be the only thing to do and there would be no choice. Let the pressure build. In the meantime I would write a long story about whatever I knew best.It was a very simple story called “Out of Season” and I had omitted the real end of it which was that the old man hanged himself. This was omitted on my new theory that you could omit anything if you knew that you omitted and the omitted part would strengthen the story and make people feel something more than they understood.'], \ [ 'All I must do now was stay sound and good in my head until morning when I would start to work again.'], \ [ 'Since I had started to break down all my writing and get rid of all facility and try to make instead of describe, writing had been wonderful to do. But it was very difficult, and I did not know how I would ever write anything as long as a novel. It often took me a full morning of work to write a paragraph.'], \ [ 'I was getting tired of the literary life, if this was the literary life that I was leading, and already I missed not working and I felt the death loneliness that comes at the end of every day that is wasted in your life.'], \ ]