summaryrefslogtreecommitdiff
path: root/vim/extline/doc/extline.txt
blob: 2ff2c7063711cbe96d779634cf4a344a6aa5856c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
*extline.txt*      Plugin for extending lines (e.g., underlined titles)
*extline*          Version 0.2.0

==============================================================================
1.  Introduction                                    |extline-intro|
2.  Installation                                    |extline-installation|
3.  Usage                                           |extline-usage|
4.  Customization                                   |extline-customization|
5.  ChangeLog                                       |extline-changelog|
6.  Credits                                         |extline-credits|

==============================================================================
1.  Introduction                                    *extline-intro*

When writing titles in a plain text document, a common convention is to use
repeated punctuation characters to draw lines under (and sometimes over) the
title text.  This plugin helps maintain those title lines more easily, and
it provides support for standalone horizontal lines as well.

Titles are marked up in a manner compatible with reStructuredText[1], and the
various heading levels are chosen to coincide with the Sphinx[2] project's
conventions as follows:

    ##############
    Part (level 9)
    ##############

    *****************
    Chapter (level 0)
    *****************

    Section (level 1)
    =================

    Subsection (level 2)
    --------------------

    Subsubsection (level 3)
    ^^^^^^^^^^^^^^^^^^^^^^^

    Paragraph (level 4)
    """""""""""""""""""

    Level-5 heading
    '''''''''''''''

Extline provides methods for adding these lines, adjusting them to fit as the
section names changes, and for converting one level to another.

[1]: http://docutils.sourceforge.net/rst.html
[2]: http://sphinx-doc.org/

===============================================================================
2.  Installation                                    *extline-installation*

Unzip the downloaded file in your personal |vimfiles| directory (~/.vim under
unix or %HOMEPATH%\vimfiles under windows).  The following files will
be unpacked: >

  doc/extline.txt
  plugin/extline.vim

Finally, re-generate your help tags with the |:helptags| command, e.g.: >

  :helptags ~/.vim/doc

==============================================================================
3.  Usage                                           *extline-usage*

The following mappings apply in Visual and Insert modes (but, notably, NOT in
Normal mode):

CTRL-L CTRL-L     Auto-line update
CTRL-L CTRL-H     Horizontal line update
CTRL-L CTRL-U     Change to underlined title
CTRL-L CTRL-O     Change to overlined title
CTRL-L CTRL-I     Change to underlined and overlined title

CTRL-L =          Force Section heading (level 1)
CTRL-L 1
CTRL-L -          Force Subsection heading (level 2)
CTRL-L 2
CTRL-L ^          Force Subsubsection heading (level 3)
CTRL-L 3
CTRL-L "          Force Paragraph heading (level 4)
CTRL-L 4
CTRL-L '          Force level 5 heading (level 5)
CTRL-L 5

To insert a literal CTRL-L in Insert mode, use CTRL-V CTRL-L (or CTRL-Q CTRL-L
if CTRL-V has been remapped as happens on Windows by default).

Because Normal-mode CTRL-L already serves a useful function (redrawing the
screen), extline does not create Normal-mode mappings.  To invoke from Normal
mode, it's convenient to first enter blockwise Visual mode via CTRL-V (or
CTRL-Q on Windows), then press CTRL-L CTRL-L (for example) to invoke the
desired mapping from Visual mode.

Each of the "change to xxx title" commands will convert an existing title to
the desired format.

The "horizontal line update" command will update an existing horizontal line
of punctuation characters to reach column 78.

The "auto-line update" command will update an existing title or horizontal.

If a title has no pre-existing underline or overline, by default a Section
heading will be used with a row of equals signs as an underline.

===============================================================================
4.  Customization                                   *extline-customization*

At present, nothing is conveniently customizable.

===============================================================================
5.  ChangeLog                                       |extline-changelog|

Version 0.2.0    Date    2013-10-03                 *extline-changelog-0.2.0*

  - Partition into plugin and autoload components.

  - Reorganize documentation.

  - First public release.

===============================================================================
6.  Credits                                         *extline-credits*

Developed by Michael Henry (vim at drmikehenry.com).

Distributed under Vim's |license|.

Git repository:       https://github.com/drmikehenry/vim-extline

===============================================================================
vim:sts=2:et:ai:tw=78:fo=tcq2:ft=help:spell: