1 " -------------------------------------------------------
5 " -------------------------------------------------------
7 " Let the leader key be ,
13 " iPad and Android keyboards have no ESC Key
18 set nocompatible " be iMproved, required
20 set omnifunc=syntaxcomplete#Complete
22 filetype off " required
25 " Install vim-plug if missing
27 let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
28 if empty(glob(data_dir . '/autoload/plug.vim'))
29 silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
30 " autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
36 call plug#begin('~/.vim/plugged')
38 " Markdown highlighting
39 " Plug 'tpope/vim-markdown'
40 " Plug 'plasticboy/vim-markdown'
41 " let g:markdown_github_languages = ['sh', 'python']
43 " Distraction free writing.
44 Plug 'junegunn/goyo.vim'
47 Plug 'bling/vim-airline'
49 " Plugin 'Windows-PowerShell-Syntax-Plugin'
51 " PowerShell Highlighting and detection
52 Plug 'pprovost/vim-ps1'
55 " Plug NLKNguyen/papercolor-theme
58 " Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
62 filetype plugin indent on " required for Vundle Bundle
64 nnoremap <leader>w :Goyo<Cr>
66 " If not something else, then assume Markdown
70 " Don't show tabs for HTML files. Do show trailing spaces."
71 au FileType html set nolist
72 au FileType javascript set nolist
74 set softtabstop=4 " makes the spaces feel like real tabs
76 " Sensible default for everything else.
81 au BufNewFile,BufRead *.go set noet ts=2 sw=2 sts=2
83 " Working with Markdown
85 au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
90 set backupdir=c:\temp,.backup/,~/.backup/,/tmp//
91 set directory=c:\temp,.swp/,~/.swp/,/tmp//
92 set undodir=c:\temp,.undo/,~/.undo/,/tmp//
93 set backspace=indent,eol,start " Do not be pedantic about backspace.