vim-colors-writer


Ⅰ. 插件描述

Distraction free writing for Vim, with light and dark themes

Ⅱ. 基本信息

创建日期:  2012-06-01
使用用户:  2
Github星:  4
插件作者:  Nathan Long

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'nathanlong/vim-colors-writer'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'nathanlong/vim-colors-writer'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'nathanlong/vim-colors-writer'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/nathanlong/vim-colors-writer

Ⅳ. 文档说明

# Writer Colorscheme for Vim

This is a minimal distraction-free theme for writing in Vim. There are many like it, but this one is mine.

There's a light mode that's reminicent of IAWriter for use in bright environments and a dark theme similiar to WriteRoom for dark environments.

I built this specifically for use in MacVim and it works best with Tim Pope's Markdown Syntax or my fork of it.

Installation

The best way to install is with a plugin manager like Vundle or Pathogen.

Vundle:

" Add to .vimrc
Plugin 'nathanlong/vim-colors-writer'

Pathogen:

git clone https://github.com/nathanlong/vim-colors-writer.git ~/.vim/bundle/colors-writer

Manual:

If you roll your Vim setup manually, clone the repo and split the files into their respetive directories (colors/writer.vim -> .vim/colors/writer.vim and so on).

Default Commands

I've built some simple commands into the plugin, all of these can be remapped:

CommandMapDescription
:WriterToggle<leader>wrToggles writer on and off in fullscreen mode.
:WriterInitQuiet<leader>wRLoads writer into your current buffer with no fullscreen
:WriterJournal<leader>wjCreates a new dated journal file (format: YYMMDD.md) in your specified journal directory.
:WriterJournalOff<leader>wJCreates a new dated journal file (format: YYMMDD.md) but does not launch writer.
:WriterSwitchThemes<leader>wqSwitches between dark and light themes while in fullscreen mode
:WriterExit<leader>wcCloses writer and reapplies your defaults
:WriterWrap<leader>wpToggle between hard and soft text wrapping.

Example remapping:

nnoremap <D-R> :WriterToggle<CR>

Customization

There are a few options you can place in your .vimrc to control default behavior:

SettingDescriptionDefault
g:writer_journal_dirControls where the journal function saves files. Accepts a path.$HOME
g:writer_themeChoose which theme to load by default. Accepts 'light' or 'dark''light'
g:writer_wrapPicks hard wrap (forces line breaks) or soft wrap (no breaks)'hard'
g:writer_fontAllows GUI font and size to be set, same format as guifontnone

Example usage:

let g:writer_theme = 'dark'
let g:writer_font = 'Source\\ Code\\ Pro:h18'

添加新评论