@@ -33,103 +33,70 @@ The script defines two mappings,
3333<Leader>r Return from footnote
3434~~~
3535
36- To insert a footnote, type ` <Leader>f ` . A footnote reference will be
37- inserted after the cursor. A matching footnote reference will be
38- inserted at the end of the file. A new buffer will open in a split
39- window at the bottom of your screen, ready to edit the new footnote.
40- When you are done, type ` <Leader>r ` to close the split and return to
41- the main text.
36+ To insert a footnote, type ` <Leader>f ` . A footnote mark will be inserted
37+ after the cursor. A matching footnote mark will be inserted at the end
38+ of the file. A new buffer will open in a split window at the bottom of
39+ your screen, ready to edit the new footnote. When you are done, type
40+ ` <Leader>r ` to close the split and return to the main text.
4241
4342![ Screenshot] ( https://raw.github.com/vim-pandoc/vim-markdownfootnotes/master/footnotes.png )
4443
45- * * * * *
46- ~~~
47- " Maintainer: David Sanson <dsanson@gmail.com>
48- " Description: Extended Markdown Footnotes in Vim
49- " Version: 0.1
50- " URL: https://github.com/vim-pandoc/vim-markdownfootnotes
51- "
52- " I've taken the original and modified the output to fit the widely
53- " supported extended markdown format for footnotes.[^note]
54- "
55- " [^note]: Like this.
56- "
57- " The original script either puts notes at the end, or before your
58- " email sig line (i.e., if there is a line that consists of two dashes,
59- " it puts the notes before that line). This version just puts them at
60- " the end.
61- "
62- " Based On:
63- " VimFootnotes
64- " Author: Mikolaj Machowski <mikmach@wp.pl>
65- " Version: 0.6
66- " Description: Footnotes in Vim
67- " Installation: See below
68- " Last Change: pon wrz 30 09:00 2002 C
69- " URL: http://www.vim.org/scripts/script.php?script_id=431
70- " Help Part:
71- " Inspired by Emmanuel Touzery tip:
72- " http://vim.sourceforge.net/tip_view.php?tip_id=332
73- " and discussion below (thanks to Luc for pluginization hints)
74- " I added functions and turned it into vim script.
75- "
76- " Installation: Drop it to your plugin directory but you can declare your
77- " favorite types of footnotes in your ftplugins.
78- "
79- " Settings:
80- "
81- " By default, footnote ids are arabic numerals. You can change this by
82- " setting b:vimfootnotetype,
83- "
84- " arabic (default) - [1] [2] [3] ...
85- " alpha - [a] [b] ... [z] [aa] [bb] ... [zz] [a] ...
86- " Alpha - as above but uppercase [A] ...
87- " roman - [i] [ii] [iii] displayed properly up to 89
88- " Roman - as above but uppercase [I] ...
89- " star - [*] [**] [***] ...
90- "
91- " Commands:
92- "
93- " Those mappings correspond to two commands that you can use in your own
94- " mappings:
95- "
96- " AddVimFootnote
97- " ~ inserts footnotemark at cursor location, inserts footnotemark on new
98- " line at end of file, opens a split window all ready for you to enter in
99- " the footnote.
100-
101- " ReturnFromFootnote
102- " ~ closes the split window and returns to the text in proper place.
103- "
104- " These are mapped to <Leader>f and <Leader>r respectively.
105- "
106- " FootnoteNumber
107- " ~ Change the current footnote number (one obligatory argument)
108- " :FootnoteNumber 5
109- "
110- " FootnoteNumberRestore
111- " ~ Restore old footnote number
112-
113- " FootnoteUndo
114- " ~ Decrease footnote counter by 1
115- "
116- " FootnoteMeta
117- " ~ Change type of the footnotes and restart counter (1, a, A, i, I, *)
118- " :FootnoteMeta
119- " If your previous footnote type was alpha, Alpha, roman, Roman or star
120- " new type will be arabic.
121- " If your previous footnote type was arabic new type will be alpha.
122- " :FootnoteMeta name_of_the_type
123- " Change footnote type to name_of_the_type. If name_of_the_type is the
124- " same as your current footnote type nothing would be changed.
125- " You can change your default type of footnote before inserting first
126- " footnote.
127- "
128- " FootnoteRestore
129- " ~ Restore previous footnote type and counter. Unfortunately there is no easy
130- " way to sort footnotes at the end of file without handmade :!sort on marked
131- " lines (it doesn't work for 'star' type).
132- " :FootnoteRestore
133- "
134- """""""""""""""""""""""""""""""""""""""""""""""""""
44+ ## Installation
45+
46+ Drop ` markdownfootnotes.vim ` in your plugin directory.
47+
48+ Or use [ Pathogen] ( https://github.com/tpope/vim-pathogen ) .
49+
50+ ## Settings
51+
52+ By default, footnote ids are arabic numerals. You can change this by
53+ setting ` b:vimfootnotetype ` :
54+
55+ + ` arabic ` : 1, 2, 3...
56+ + ` alpha ` : a, b, c, aa, bb..., zz, a...
57+ + ` Alpha ` : A, B, C, AA, BB..., ZZ, A...
58+ + ` roman ` : i, ii, iii... (displayed properly up to 89)
59+ + ` Roman ` : I, II, III...
60+ + ` star ` : \* , \*\* , \*\*\* ...
61+
62+ ## Commands
63+
64+ ` AddVimFootnote `
65+ : inserts footnotemark at cursor location, inserts footnotemark on new
66+ line at end of file, opens a split window all ready for you to enter in
67+ the footnote.
68+
69+ ` ReturnFromFootnote `
70+ : closes the split window and returns to the text in proper place.
71+
72+ These are mapped to ``<Leader >f` and ` <Leader >r` respectively.
73+
74+ ` FootnoteNumber `
75+ : Change the current footnote number (one obligatory argument)
76+ : FootnoteNumber 5
77+
78+ ` FootnoteNumberRestore `
79+ : Restore old footnote number
80+
81+ ` FootnoteUndo `
82+ : Decrease footnote counter by 1
83+
84+ ` FootnoteMeta [<footnotetype>] `
85+ : Change type of the footnotes and restart counter (1, a, A, i, I, * )
86+
87+ The ` <footnotetype> ` argument is optional. If omitted, and your previous
88+ footnote type was alpha, Alpha, roman, Roman or star, the new type will
89+ be arabic; if your previous footnote type was arabic, new type will be
90+ alpha.
91+
92+ ` FootnoteRestore `
93+ : Restore previous footnote type and counter.
94+
95+ ## Todo
96+
97+ 1 . It would not be hard to add support for other plaintext footnote
98+ formats, triggered by filetype.
99+ 2 . I have not really looked very carefully at how the script is
100+ implemented. I suspect there are ways in which it could be
101+ refactored and streamlined.
135102
0 commit comments