Use :file: for file references in the docs

This commit is contained in:
Kim Silkebækken 2012-12-20 16:19:20 +01:00
parent 9cc1233307
commit 9f60daaf78
4 changed files with 23 additions and 22 deletions

View File

@ -9,16 +9,16 @@ written in Python.
Powerline provides default configurations in the following locations:
`Main configuration`_
``powerline/config.json``
:file:`powerline/config.json`
`Colorschemes`_
``powerline/colorschemes/default.json``
:file:`powerline/colorschemes/default.json`
`Themes`_
``powerline/themes/{extension}/default.json``
:file:`powerline/themes/{extension}/default.json`
The default configuration files are stored in the main package. User
configuration files are stored in ``$XDG_CONFIG_HOME/powerline`` for Linux
users, and in ``~/.config/powerline`` for OS X users. This usually
corresponds to ``~/.config/powerline`` on both platforms.
configuration files are stored in :file:`$XDG_CONFIG_HOME/powerline` for
Linux users, and in :file:`~/.config/powerline` for OS X users. This usually
corresponds to :file:`~/.config/powerline` on both platforms.
The easiest way of creating your own version of any configuration file is to
copy the configuration file from the main package to the corresponding path
@ -39,7 +39,7 @@ file. Example:
Main configuration
------------------
:Location: ``powerline/config.json``
:Location: :file:`powerline/config.json`
The main configuration file defines some common options that applies to all
extensions, as well as some extension-specific options like themes and
@ -73,7 +73,7 @@ Extension-specific configuration
Colorschemes
------------
:Location: ``powerline/colorschemes/{name}.json``
:Location: :file:`powerline/colorschemes/{name}.json`
``name``
Name of the colorscheme.
@ -128,7 +128,7 @@ Colorschemes
Themes
------
:Location: ``powerline/themes/{extension}/{name}.json``
:Location: :file:`powerline/themes/{extension}/{name}.json`
``name``
Name of the theme.
@ -227,9 +227,10 @@ Segments
--------
Segments are written in Python, and the default segments provided with
Powerline are located in ``powerline/ext/{extension}/segments/{module}.py``.
User-defined segments can be defined in the corresponding path in the user's
config directory.
Powerline are located in
:file:`powerline/ext/{extension}/segments/{module}.py`. User-defined
segments can be defined in the corresponding path in the user's config
directory.
Segments are regular Python functions, and they may accept arguments. All
arguments should have a default value which will be used for themes that

View File

@ -41,8 +41,8 @@ Code point Glyph Description
Usage
-----
The font patcher is located at ``powerline/fontpatcher/fontpatcher.py``. It
requires Python 2.7 and FontForge compiled with Python bindings to work.
The font patcher is located at :file:`powerline/fontpatcher/fontpatcher.py`.
It requires Python 2.7 and FontForge compiled with Python bindings to work.
Patched fonts are renamed by default (" for Powerline" is added to the font
name) so they don't conflict with existing fonts. Use the ``--no-rename``
@ -65,7 +65,7 @@ Linux
$ /path/to/fontpatcher.py MyFontFile.ttf
3. Copy the font file into ``~/.fonts`` (or another X font directory)::
3. Copy the font file into :file:`~/.fonts` (or another X font directory)::
$ cp "MyFontFile for Powerline.otf" ~/.fonts
@ -76,7 +76,7 @@ Linux
If you're using vim in a terminal you may need to close all open terminal
windows after updating the font cache.
5. **Gvim users:** Update the GUI font in your ``vimrc`` file::
5. **Gvim users:** Update the GUI font in your :file:`vimrc` file::
set guifont=MyFont\ for\ Powerline
@ -124,7 +124,7 @@ OS X
5. Install the font by double-clicking the font file in Finder and click
"Install this font" from the preview window.
6. **Gvim users:** Update the GUI font in your ``vimrc`` file::
6. **Gvim users:** Update the GUI font in your :file:`vimrc` file::
set guifont=MyFont\ for\ Powerline

View File

@ -61,4 +61,4 @@ Feature highlights
are now written in JSON, with a much cleaner syntax that's easier to learn
and work with. Themes and colorschemes are also much more configurable,
and it's easy to write your own and store them in your home config
directory (usually ``~/.config/powerline``).
directory.

View File

@ -37,7 +37,7 @@ The colors are weird in the default OS X Terminal app!
I'm using tmux and Powerline looks like crap, what's wrong?
You need to tell tmux that it has 256-color capabilities. Add this to
your ``.tmux.conf`` to solve this issue::
your :file:`.tmux.conf` to solve this issue::
set -g default-terminal "screen-256color"
@ -48,14 +48,14 @@ Vim-specific issues
-------------------
The statusline has strange characters like ``^B`` in it!
Please add ``set encoding=utf-8`` to your ``vimrc``.
Please add ``set encoding=utf-8`` to your :file:`vimrc`.
The statusline has a lot of ``^`` or underline characters in it!
You need to configure the ``fillchars`` setting to disable statusline
fillchars (see ``:h fillchars`` for details). Add this to your
``vimrc`` to solve this issue::
:file:`vimrc` to solve this issue::
set fillchars+=stl:\ ,stlnc:\
The statusline is hidden/only appears in split windows!
Make sure that you have ``set laststatus=2`` in your ``vimrc``.
Make sure that you have ``set laststatus=2`` in your :file:`vimrc`.