This is my .vimrc, modified from WurdBendur's: vimrc. See also the NaperWriMo vim page that collects many tips for vim for those using it for National Novel Writing Month, the free, international, annual event designed to motivate writers to complete a 50,000+ word novel in just 30 days in November.
vim is a fantastic moded text editor. In addition to being the best editor for editing code, it can easily also be used for writing notes, prose or fiction, especially when combined with markdown (a simple mark-up language) and pandoc (a multi-platform tool that can be used to convert markdown text files into many different formats, including Microsoft Word, OpenOffice/LibreOffice odt, epub, etc).
I use this under ubuntu Linux (including on ChromeOS) and on Windows 7 via cygwin.
Plugins I currently use
- Plug 'https://github.com/chriskempson/vim-tomorrow-theme'
- Plug 'alessandroyorba/despacio'
- I started out with the tomorrow theme, but I like despacio. I'll probably end up using both (depending on my mood)
- See this great overview of popular vim themes
- Plug 'morhetz/gruvbox' - my current favorite theme (as of 2019-01-09), using
- let g:gruvbox_italic=1
- let g:gruvbox_contrast_dark='hard'
- colorscheme gruvbox
Plug 'vim-airline/vim-airline' - Airline bar
- [Plug 'itchyny/lightline.vim](from https://github.com/itchyny/lightline.vim) - status bar (lightweight) - see the recommendations here for how to put wordcount into the status line
- Plug reeds/vim-litecorrect - lightweight spelling correction
- Plug 'scrooloose/syntastic' - syntax info
- Plug 'Raimondi/delimitmate' - smart completion of delimiters
- Plug 'vitalk/vim-simple-todo' - simple todo
This vimrc uses the excellent, simple, fast plug vim plugin manager. You will need to install this first (e.g., via:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Then when you bring up vim after installing the vimrc, do:
This will install the plugins, including the Tomorrow Night colorscheme.
Be sure to see the wonderful airline status bar page--there are many, many configuration options. You can also do a :help airline when within vim to see the documentation.
- If you happen to have to use Windows, this guide is very helpful for making vim plugins work there
- Note: I had to use vundle as described in the guide. Didn't try to make things work with Plug since I was in a hurry. Went through the vundle quick start after doing the steps in the guide above bullet (installed vim in my Windows users directory, cleaned up vimfiles, installed curl, tested it with pathogen, etc). Update: Plug works fine! Just had to reboot before using.
- Note: if you have a .vimrc in your $HOME, gvim will use it ahead of a .gvimrc in that $HOME directory!
- Note: With Windows 10, I had to put plug.vim in ~/vimfiles/autoload, then everything magically worked (after installing git, making sure that the Path environment variable was updated with the path to git, and that curl.cmd worked)