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
* 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
* No predefined key mappings to interfere with your other mappings
* Integrates with [airline](https://github.com/bling/vim-airline)
* Support for GUI-based Vim includes: font, linespace, fullscreen,
transparency, and screen columns/lines
## Why thematic?
## Why _thematic_?
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
@@ -32,7 +31,7 @@ want the screen stripped of all extraneous detail, with a traditional
font and generous left and right margins.
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.
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.
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
defaults.
Thematic stays out of your way, ignoring any settings that you aren't
explicitly setting through your thematic configuration. For example, you
can `set guifont=` in your .gvimrc independent of thematic.
_thematic_ stays out of your way, ignoring any settings that you aren't
explicitly setting through your _thematic_ configuration. For example, you
can `set guifont=` in your .gvimrc independent of _thematic_.
GUI-based Vim users have additional options available in theming. For example,
@@ -130,7 +129,7 @@ let g:thematic#themes = {
### 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.
```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 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:
```vim
@@ -152,73 +151,83 @@ nnoremap <Leader>I :Thematic iawriter<CR>
## 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
* `ruler` - as alternative to status bar, shows minimal position details
in lower right
* `colorscheme` - set the colors for all windows (optional if your theme
name is the same as the colorscheme name)
* `background` (dark or light) - some colorschemes can be further
configured via background
* `airline-theme` - plugin for theming your status bar
* `sign-column-color-fix` - temporarily modifies colorscheme to force
gutter background to match Normal background
* `diff-color-fix` - temporarily modifies colorscheme to force diff
character color to a standard red/green/yellow
* `fold-column-color-mute` - temporarily modifies colorscheme to hide
indicators, matching Normal text background
* `number-column-color-mute` - temporarily modifies colorscheme to hide
numbers, matching Normal text background
* `ruler` (0 or 1) - as alternative to status bar, shows minimal position
details in lower right
* `colorscheme` ('pencil', e.g.) - set the colors for all windows
(optional if your theme name is the same as the colorscheme name)
* `background` ('dark' or 'light') - colorschemes like solarized can be
further configured via background
* `airline-theme` ('jellybeans', e.g.) - plugin for theming your status
bar
* `sign-column-color-fix` (0 or 1) - temporarily modifies colorscheme to
force gutter background to match Normal background
* `diff-color-fix` (0 or 1) - temporarily modifies colorscheme to force
diff character color to a standard red/green/yellow/blue
* `fold-column-color-mute` (0 or 1) - temporarily modifies colorscheme to
hide indicators, 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
you're running a console-based Vim):
you're running a terminal-based Vim):
Typography-related:
* `typeface` - name of font
* `font-size` - point size of font
* `typeface` ('Source Code Pro ExtraLight', e.g.) - name of font
* `font-size` (1+) - point size of font
* `linespace` (0+) - pixel spacing between lines to allow the type to breathe
Screen-related:
* `fullscreen` - if 1, force a switch to fullscreen
* `fullscreen-background-color-fix` - optional change of color of the
background (or border) to match Normal text background
* `columns` and `lines` - youll mostly use these to manage the height
* `fullscreen` (0 or 1) - if 1, force a switch to fullscreen
* `fullscreen-background-color-fix` (0 or 1) - optional change of color of
the background (or border) to match Normal text background
* `columns` (1+) and `lines` (1+) - typically used to manage the height
and width the text area in `fullscreen` mode
* `transparency` (0=opaque, 100=fully transparent) - view details of
window and desktop beneath Vim
## 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.
Note that when installed, thematic will override your fullscreen settings,
specifically `fuoptions` to get better control over screen lines and
columns and the fullscreen background.
Note that when installed on a GUI-based Vim, _thematic_ will override the
fullscreen settings, specifically `fuoptions` to get better control over
screen lines and columns and the fullscreen background.
## FAQ
### 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
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
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-pencil](https://github.com/reedes/vim-pencil) - to configure for word processing
* [vim-markdown](https://github.com/tpope/vim-markdown) - support for
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.
@@ -236,8 +245,7 @@ for MacVim:
```vim
let g:thematic#themes = {
\ 'iawriter' :{ 'colorscheme': 'solarized',
\ 'background': 'light',
\ 'pencil' :{ 'background': 'light',
\ 'columns': 75,
\ 'font-size': 20,
\ 'fullscreen': 1,
@@ -249,10 +257,10 @@ let g:thematic#themes = {
\ }
```
Without GUI-based Vim, console-based emulation is trickier, as there's
no easy way to create generous left and right margins. You can
approximate it by switching from soft-wrap to hard line breaks with
`vim-pencil` and using with a narrow `textwidth`:
Non-GUI terminal-based emulation is trickier, as there's no easy way to
create generous left and right margins. You can approximate it by
switching from soft-wrap to hard line breaks with `vim-pencil` and using
with a narrow `textwidth`:
```vim
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?
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:
```
$ 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:
```
@@ -276,8 +284,8 @@ $ defaults write org.vim.MacVim MMNativeFullScreen 1
## Monospaced fonts
Whether using console or GUI-based Vim, a good monospaced font can
improve your editing experience. Many are available for free:
Whether using terminal or GUI-based Vim, a good monospaced font can
improve your editing experience. Many are available to download for free:
* [Anonymous Pro](https://www.google.com/fonts/specimen/Anonymous+Pro)
* [CosmicSansNeueMono](https://github.com/belluzj/cosmic-sans-neue)