Plugin for switching to minimalist writing mode.
cd ~/.vim/bundle
git clone https://github.com/sgolitsynskiy/vim-write.git
To switch between current and writing mode, execute the :WriteToggleWritingMode
command.
To turn line numbers on and off (maintaning the left margin), execute the :WriteToggleLineNumbers
command.
Suggested sample mappings to add to your .vimrc:
nnoremap <leader>ww :WriteToggleWritingMode<CR>
nnoremap <leader>nn :WriteToggleLineNumbers<CR>
nnoremap <leader>nf :set foldcolumn=0
The third mapping helps when nn
was executed outside of writing mode (which would create a fold column).
You may also override the defaults by specifyiing these global variables, like so:
let g:write_marginwidth = 12
let g:write_textwidth = 60
let g:write_columns = 80
- This plugin uses hard wrap *
- The writing mode isn't as pleasing when the terminal window is maximized, or when used within a terminal multiplexer
- Minimalist (no invisible buffers, no true "distraction-free writing"), but lightweight, simple, and not intrusive
* Here's a good discussion of hard wrap vs. soft wrap
Suggestions and feedback are welcome.