Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
183 lines (127 sloc) 6.18 KB
*presets.txt* Presets -- Quickly switch between vim configurations
Author: Tom Link, micathom at gmail com
This plugins allows users to push presets (sets of |options|) onto a
configuration stack and remove them later on, i.e., it allows users to
quickly switch between pre-defined configurations (e.g. GUI-related
options).
In order to push a preset, use the |:Preset| command:
:Preset! NAME
-----------------------------------------------------------------------
Install~
Edit the vba file and type: >
:so %
See :help vimball for details.
Post-Install~
Check the values of the following variables and set them in your |vimrc|
file if necessary:
- |g:presets#font|
- |g:presets#font_sizes|
========================================================================
Contents~
g:presets_default .......... |g:presets_default|
:Preset .................... |:Preset|
:ListPresets ............... |:ListPresets|
g:presets#font ............. |g:presets#font|
presets#font_base_size ..... |presets#font_base_size|
g:presets#font_sizes ....... |g:presets#font_sizes|
g:presets#sets ............. |g:presets#sets|
presets#Restore ............ |presets#Restore()|
presets#Maximize ........... |presets#Maximize()|
presets#Push ............... |presets#Push()|
presets#Pop ................ |presets#Pop()|
presets#List ............... |presets#List()|
g:presets#pad#tw ........... |g:presets#pad#tw|
presets#pad#Pad ............ |presets#pad#Pad()|
presets#pad#Unpad .......... |presets#pad#Unpad()|
========================================================================
plugin/presets.vim~
*g:presets_default*
g:presets_default (default: '')
The preset to set after startup.
*:Preset*
:Preset[!] [PRESET]
Push the configuration of PRESET.
If no PRESET argument is given, list the presets on the configuration
stack.
With [!], pop previous presets from the configuration stack. This
happens before pushing new presets.
This command supports certain special names -- see |presets#Push()|
for details.
*:ListPresets*
:ListPresets
List the presets on the configuration stack.
========================================================================
autoload/presets.vim~
*g:presets#font*
g:presets#font (default: ...)
You might want to change this variable according to your
preferences.
*presets#font_base_size*
presets#font_base_size (default: 10)
You might want to change this variable according to your
preferences.
*g:presets#font_sizes*
g:presets#font_sizes (default: {...})
Relative font sizes based on the value of
|presets#font_base_size|.
The following font sizes are predefined: tiny, small, normal,
Normal, big, large, Large.
*g:presets#sets*
g:presets#sets (default: {})
A dictionary with the keys:
include ... A list of other presets
global ... A dictionary of global options
window ... A dictionary of window-local options
buffer ... A dictionary of buffer-local options
The option dictionaries keys usually are options names than should
be set to its value. If the key starts with a colon (:) though,
the value is an ex command.
If the key defines a ex command, the value can be either a string
or a list of two strings, where the second string is a command
that undoes the effect of the first string when |:execute|d. If
the value of a string begins with asterisk "*", the string is
evaluated first via |eval()| -- the result of the evaluation
should be the actual ex command.
Any keys can be prepended with a number that defines its priority.
Users should use |g:presets#sets_user| to append user-defined
presets.
Besides presets for font sizes (see |g:presets#font_sizes|), the
following presets are known:
ruler ... Hide the |statusline| and display a |ruler|
plain ... Remove window/frame decorations
plainer ... plain + ruler
full ... Maximize the window
screen ... Optimize the use of available screen estate
fullscreen ... Maximize the use of available screen estate
darkscreen ... Simulate darkscreen
darkscreen ... Simulate darkscreen
buffercol ... Center current buffer
Buffercol ... buffercol + plainer
darkcol ... Simulate darkscreen (center current buffer)
*presets#Restore()*
presets#Restore(lines, columns, x, y)
*presets#Maximize()*
presets#Maximize(fullscreen)
Maximize the window.
You might need to redefine it if it doesn't work for you.
*presets#Push()*
presets#Push(names)
Push the preset NAME onto the configuration stack.
The following special NAMEs are supported:
show ... list the names of the presets on the configuration stack
*presets#Pop()*
presets#Pop(?number = 1)
Pop the last preset from the configuration stack.
If number is -1, pop all presets.
*presets#List()*
presets#List(use_echom)
List the presets on the configuration stack.
========================================================================
autoload/presets/pad.vim~
*g:presets#pad#tw*
g:presets#pad#tw (default: 72)
*presets#pad#Pad()*
presets#pad#Pad(tw, ...)
*presets#pad#Unpad()*
presets#pad#Unpad()
vim:tw=78:fo=w2croql:isk=!-~,^*,^|,^":ts=8:ft=help:norl: