improvements through rewriting

This commit is contained in:
Reed Esau
2014-01-05 13:19:31 -07:00
parent 650f86d8ea
commit 62eb63a7c3

View File

@@ -6,14 +6,13 @@
## Features ## Features
* Groups global settings (like colorscheme) into themes * Groups global settings (like colorscheme, ruler, etc.) into themes
* Stays out of your way, except where you want it * Stays out of your way, except where you want it
* No predefined key mappings to interfere with your other mappings
* Integrates with [airline](https://github.com/bling/vim-airline) * Integrates with [airline](https://github.com/bling/vim-airline)
* Support for GUI-based Vim includes: font, linespace, fullscreen, * Support for GUI-based Vim includes: font, linespace, fullscreen,
transparency, and screen columns/lines transparency, and screen columns/lines
## Why thematic? ## Why _thematic_?
You may be among the many Vim users who keep things simple by sticking You may be among the many Vim users who keep things simple by sticking
with a single theme that suits their needs, configuring it in their with a single theme that suits their needs, configuring it in their
@@ -32,7 +31,7 @@ want the screen stripped of all extraneous detail, with a traditional
font and generous left and right margins. font and generous left and right margins.
Managing such an multi-theme environment in Vim has traditionally been Managing such an multi-theme environment in Vim has traditionally been
a hassle. The thematic plugin is intended to solve that problem, a hassle. The _thematic_ plugin is intended to solve that problem,
providing you flexibility and convenience. providing you flexibility and convenience.
GUI-based Vim users can complement a colorscheme with a particular GUI-based Vim users can complement a colorscheme with a particular
@@ -80,7 +79,7 @@ let g:thematic#themes = {
\ } \ }
``` ```
If you don't specify a `colorscheme`, thematic will attempt to load one If you don't specify a `colorscheme`, _thematic_ will attempt to load one
using your theme name. using your theme name.
You can also specify a dictionary of default values, to be shared by all You can also specify a dictionary of default values, to be shared by all
@@ -97,9 +96,9 @@ let g:thematic#defaults = {
Note that an explicit setting in a theme will take precedence over these Note that an explicit setting in a theme will take precedence over these
defaults. defaults.
Thematic stays out of your way, ignoring any settings that you aren't _thematic_ stays out of your way, ignoring any settings that you aren't
explicitly setting through your thematic configuration. For example, you explicitly setting through your _thematic_ configuration. For example, you
can `set guifont=` in your .gvimrc independent of thematic. can `set guifont=` in your .gvimrc independent of _thematic_.
GUI-based Vim users have additional options available in theming. For example, GUI-based Vim users have additional options available in theming. For example,
@@ -130,7 +129,7 @@ let g:thematic#themes = {
### Commands ### Commands
Running `:ThematicFirst` invokes thematic and chooses the first theme. Running `:ThematicFirst` invokes _thematic_ and chooses the first theme.
Note that your themes will be ordered alphabetically by name. Note that your themes will be ordered alphabetically by name.
```vim ```vim
@@ -142,7 +141,7 @@ Note that your themes will be ordered alphabetically by name.
:Thematic {theme_name} " load a theme by name (with tab completion) :Thematic {theme_name} " load a theme by name (with tab completion)
``` ```
thematic does not map any keys by default, but you can easily do so in _thematic_ does not map any keys by default, but you can easily do so in
your `.vimrc` file: your `.vimrc` file:
```vim ```vim
@@ -152,73 +151,83 @@ nnoremap <Leader>I :Thematic iawriter<CR>
## What theme properties can I set? ## What theme properties can I set?
Many properties are available for console-only and GUI-based Vim. Many properties are available for terminal-only and GUI-based Vim.
For console or GUI-based Vim: Note that you can set these properties in `g:thematic#defaults` and
`g:thematic#themes`, where a setting in the latter overrides a setting in
the former.
For terminal or GUI-based Vim:
* `laststatus` (0, 1, or 2) - controls the visibility of the status bar * `laststatus` (0, 1, or 2) - controls the visibility of the status bar
* `ruler` - as alternative to status bar, shows minimal position details * `ruler` (0 or 1) - as alternative to status bar, shows minimal position
in lower right details in lower right
* `colorscheme` - set the colors for all windows (optional if your theme * `colorscheme` ('pencil', e.g.) - set the colors for all windows
name is the same as the colorscheme name) (optional if your theme name is the same as the colorscheme name)
* `background` (dark or light) - some colorschemes can be further * `background` ('dark' or 'light') - colorschemes like solarized can be
configured via background further configured via background
* `airline-theme` - plugin for theming your status bar * `airline-theme` ('jellybeans', e.g.) - plugin for theming your status
* `sign-column-color-fix` - temporarily modifies colorscheme to force bar
gutter background to match Normal background * `sign-column-color-fix` (0 or 1) - temporarily modifies colorscheme to
* `diff-color-fix` - temporarily modifies colorscheme to force diff force gutter background to match Normal background
character color to a standard red/green/yellow * `diff-color-fix` (0 or 1) - temporarily modifies colorscheme to force
* `fold-column-color-mute` - temporarily modifies colorscheme to hide diff character color to a standard red/green/yellow/blue
indicators, matching Normal text background * `fold-column-color-mute` (0 or 1) - temporarily modifies colorscheme to
* `number-column-color-mute` - temporarily modifies colorscheme to hide hide indicators, matching Normal text background
numbers, matching Normal text background * `number-column-color-mute` (0 or 1) - temporarily modifies colorscheme
to hide numbers, matching Normal text background
The following options are for GUI-based Vim only (they will be ignored if The following options are for GUI-based Vim only (they will be ignored if
you're running a console-based Vim): you're running a terminal-based Vim):
Typography-related: Typography-related:
* `typeface` - name of font * `typeface` ('Source Code Pro ExtraLight', e.g.) - name of font
* `font-size` - point size of font * `font-size` (1+) - point size of font
* `linespace` (0+) - pixel spacing between lines to allow the type to breathe * `linespace` (0+) - pixel spacing between lines to allow the type to breathe
Screen-related: Screen-related:
* `fullscreen` - if 1, force a switch to fullscreen * `fullscreen` (0 or 1) - if 1, force a switch to fullscreen
* `fullscreen-background-color-fix` - optional change of color of the * `fullscreen-background-color-fix` (0 or 1) - optional change of color of
background (or border) to match Normal text background the background (or border) to match Normal text background
* `columns` and `lines` - youll mostly use these to manage the height * `columns` (1+) and `lines` (1+) - typically used to manage the height
and width the text area in `fullscreen` mode and width the text area in `fullscreen` mode
* `transparency` (0=opaque, 100=fully transparent) - view details of * `transparency` (0=opaque, 100=fully transparent) - view details of
window and desktop beneath Vim window and desktop beneath Vim
## GUI fullscreen capabilities ## GUI fullscreen capabilities
thematic supports fullscreen capabilities for GUI-based Vim, including _thematic_ supports fullscreen capabilities for GUI-based Vim, including
changing the fullscreen background to match the text background. changing the fullscreen background to match the text background.
Note that when installed, thematic will override your fullscreen settings, Note that when installed on a GUI-based Vim, _thematic_ will override the
specifically `fuoptions` to get better control over screen lines and fullscreen settings, specifically `fuoptions` to get better control over
columns and the fullscreen background. screen lines and columns and the fullscreen background.
## FAQ ## FAQ
### Q: I want to set `cursorline`, `wrap`, `textwidth`, `foldcolumn`, etc. in my themes. ### Q: I want to set `cursorline`, `wrap`, `textwidth`, `foldcolumn`, etc. in my themes.
thematic focuses exclusively on global settings. The settings above are _thematic_ focuses exclusively on global settings. The settings above are
not globally-scoped but are instead scoped to individual buffers and not globally-scoped but are instead scoped to individual buffers and
windows. These are best set using the `FileType` feature in Vim. windows. Those are best set using the `autocmd FileType` feature in Vim.
In addition, settings like `textwidth` will modify your documents, which In addition, settings like `textwidth` will modify your documents, which
this plugin strenuously avoids. this plugin strenuously avoids.
### Q: How can I configure Vim to emulate markdown editors like IAWriter? ### Q: How can I configure Vim to emulate markdown editors like IA Writer?
It works best with GUI Vim's fullscreen. A few steps are involved: It works best with fullscreen in a GUI-based Vim. A few steps are
involved:
(1) Install a couple of plugins: (1) Install a couple plugins and a suitable colorscheme:
* [vim-markdown](https://github.com/tpope/vim-markdown) - support for editing markdown * [vim-markdown](https://github.com/tpope/vim-markdown) - support for
* [vim-pencil](https://github.com/reedes/vim-pencil) - to configure for word processing editing markdown text
* [vim-pencil](https://github.com/reedes/vim-pencil) - to configure
buffers for word processing
* [vim-colors-pencil](https://github.com/reedes/vim-colors-pencil) - an
iAWriter-like colorscheme
(2) Edit your `.gvimrc` to disable the tool bar, etc. (2) Edit your `.gvimrc` to disable the tool bar, etc.
@@ -236,8 +245,7 @@ for MacVim:
```vim ```vim
let g:thematic#themes = { let g:thematic#themes = {
\ 'iawriter' :{ 'colorscheme': 'solarized', \ 'pencil' :{ 'background': 'light',
\ 'background': 'light',
\ 'columns': 75, \ 'columns': 75,
\ 'font-size': 20, \ 'font-size': 20,
\ 'fullscreen': 1, \ 'fullscreen': 1,
@@ -249,10 +257,10 @@ let g:thematic#themes = {
\ } \ }
``` ```
Without GUI-based Vim, console-based emulation is trickier, as there's Non-GUI terminal-based emulation is trickier, as there's no easy way to
no easy way to create generous left and right margins. You can create generous left and right margins. You can approximate it by
approximate it by switching from soft-wrap to hard line breaks with switching from soft-wrap to hard line breaks with `vim-pencil` and using
`vim-pencil` and using with a narrow `textwidth`: with a narrow `textwidth`:
```vim ```vim
autocmd FileType markdown set foldcolumn=12 textwidth=74 autocmd FileType markdown set foldcolumn=12 textwidth=74
@@ -260,14 +268,14 @@ autocmd FileType markdown set foldcolumn=12 textwidth=74
### Q: Using MacVim, the fullscreen background color isn't working as expected. How do I change its behavior? ### Q: Using MacVim, the fullscreen background color isn't working as expected. How do I change its behavior?
To have the fullscreen background's color set by thematic, enter the To have the fullscreen background's color set by _thematic_, enter the
following in OS X Terminal: following in OS X Terminal:
``` ```
$ defaults write org.vim.MacVim MMNativeFullScreen 0 $ defaults write org.vim.MacVim MMNativeFullScreen 0
``` ```
Or, if you prefer your fullscreen window to float against a standard Or, if you prefer that your fullscreen window float against a standard
background: background:
``` ```
@@ -276,8 +284,8 @@ $ defaults write org.vim.MacVim MMNativeFullScreen 1
## Monospaced fonts ## Monospaced fonts
Whether using console or GUI-based Vim, a good monospaced font can Whether using terminal or GUI-based Vim, a good monospaced font can
improve your editing experience. Many are available for free: improve your editing experience. Many are available to download for free:
* [Anonymous Pro](https://www.google.com/fonts/specimen/Anonymous+Pro) * [Anonymous Pro](https://www.google.com/fonts/specimen/Anonymous+Pro)
* [CosmicSansNeueMono](https://github.com/belluzj/cosmic-sans-neue) * [CosmicSansNeueMono](https://github.com/belluzj/cosmic-sans-neue)