jdavcs / vim-write

Minimalist writing mode for Vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vim Write

Plugin for switching to minimalist writing mode.

Installation

Pathogen

cd ~/.vim/bundle
git clone https://github.com/sgolitsynskiy/vim-write.git

Usage

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.

Optional Configuration

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

Limitations

  1. This plugin uses hard wrap *
  2. The writing mode isn't as pleasing when the terminal window is maximized, or when used within a terminal multiplexer
  3. 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

Contributions

Suggestions and feedback are welcome.

License

MIT

About

Minimalist writing mode for Vim

License:MIT License


Languages

Language:Vim Script 100.0%