|
1 | | -" Author: Mikolaj Machowski <mikmach@wp.pl> |
2 | | -" Version: 0.6 |
3 | | -" Description: Footnotes in Vim |
4 | | -" Installation: See below |
5 | | -" Last change: pon wrz 30 09:00 2002 C |
6 | | -" |
7 | | -" Help part: |
8 | | -" Inspired by Emmanuel Touzery tip: |
9 | | -" http://vim.sourceforge.net/tip_view.php?tip_id=332 |
10 | | -" and discussion below (thanks to Luc for pluginization hints) |
11 | | -" I added functions and turned it into vim script. |
12 | | -" |
13 | | -" Installation: Drop it to your plugin directory but you can declare your |
14 | | -" favorite types of footnotes in your ftplugins. |
| 1 | +" Maintainer: David Sanson <dsanson@gmail.com> |
| 2 | +" Description: Extended Markdown Footnotes in Vim |
| 3 | +" Version: 0.1 |
| 4 | +" URL: https://github.com/vim-pandoc/vim-markdownfootnotes |
15 | 5 | " |
| 6 | +" I've taken the original and modified the output to fit the widely |
| 7 | +" supported extended markdown format for footnotes.[^note] |
16 | 8 | " |
17 | | -" Commands: |
18 | | -" <Leader>f (in insert mode) - inserts footnotemark, opens at bottom window where |
19 | | -" footnotemark is also inserted and you are ready to type in your |
20 | | -" footnotetext. |
21 | | -" <Leader>r (in insert mode) - closes footnote window and returns to the text in |
22 | | -" proper place. |
| 9 | +" [^note]: Like this. |
23 | 10 | " |
24 | | -" You can change them by placing in your vimrc: |
25 | | -" imap your_map <Plug>AddVimFootnote |
26 | | -" imap your_map <Plug>ReturnFromFootnote |
| 11 | +" The original script either puts notes at the end, or before your |
| 12 | +" email sig line (i.e., if there is a line that consists of two dashes, |
| 13 | +" it puts the notes before that line). This version just puts them at |
| 14 | +" the end. |
27 | 15 | " |
| 16 | +" Based On: |
| 17 | +" VimFootnotes |
| 18 | +" Author: Mikolaj Machowski <mikmach@wp.pl> |
| 19 | +" Version: 0.6 |
| 20 | +" Description: Footnotes in Vim |
| 21 | +" Installation: See below |
| 22 | +" Last Change: pon wrz 30 09:00 2002 C |
| 23 | +" URL: http://www.vim.org/scripts/script.php?script_id=431 |
| 24 | +" Help Part: |
| 25 | +" Inspired by Emmanuel Touzery tip: |
| 26 | +" http://vim.sourceforge.net/tip_view.php?tip_id=332 |
| 27 | +" and discussion below (thanks to Luc for pluginization hints) |
| 28 | +" I added functions and turned it into vim script. |
28 | 29 | " |
29 | | -" Footnotes are placed at the end of the file but above signature delimiter |
30 | | -" (if one exists). |
| 30 | +" Installation: Drop it to your plugin directory but you can declare your |
| 31 | +" favorite types of footnotes in your ftplugins. |
31 | 32 | " |
32 | 33 | " Settings: |
33 | | -" b:vimfootnotetype - possible values: |
| 34 | +" |
| 35 | +" By default, footnote ids are arabic numerals. You can change this by |
| 36 | +" setting b:vimfootnotetype, |
| 37 | +" |
34 | 38 | " arabic (default) - [1] [2] [3] ... |
35 | 39 | " alpha - [a] [b] ... [z] [aa] [bb] ... [zz] [a] ... |
36 | 40 | " Alpha - as above but uppercase [A] ... |
37 | 41 | " roman - [i] [ii] [iii] displayed properly up to 89 |
38 | 42 | " Roman - as above but uppercase [I] ... |
39 | 43 | " star - [*] [**] [***] ... |
40 | 44 | " |
41 | | -" Additional commands: |
42 | | -" FootnoteNumber: |
43 | | -" You can change current footnote number (one obligatory argument) |
44 | | -" :FootnoteNumber 5 |
45 | | -" FootnoteNumberRestore: |
46 | | -" You can restore old footnote number |
47 | | -" :FootnoteNumberRestore |
48 | | -" FootnoteUndo: |
49 | | -" Decrease footnote counter by 1 |
50 | | -" :FootnoteUndo |
51 | | -" FootnoteMeta: |
52 | | -" Change type of the footnotes and restart counter (1, a, A, i, I, *) |
53 | | -" :FootnoteMeta |
| 45 | +" Commands: |
| 46 | +" |
| 47 | +" Those mappings correspond to two commands that you can use in your own |
| 48 | +" mappings: |
| 49 | +" |
| 50 | +" AddVimFootnote |
| 51 | +" ~ inserts footnotemark at cursor location, inserts footnotemark on new |
| 52 | +" line at end of file, opens a split window all ready for you to enter in |
| 53 | +" the footnote. |
| 54 | + |
| 55 | +" ReturnFromFootnote |
| 56 | +" ~ closes the split window and returns to the text in proper place. |
| 57 | +" |
| 58 | +" These are mapped to <Leader>f and <Leader>r respectively. |
| 59 | +" |
| 60 | +" FootnoteNumber |
| 61 | +" ~ Change the current footnote number (one obligatory argument) |
| 62 | +" :FootnoteNumber 5 |
| 63 | +" |
| 64 | +" FootnoteNumberRestore |
| 65 | +" ~ Restore old footnote number |
| 66 | + |
| 67 | +" FootnoteUndo |
| 68 | +" ~ Decrease footnote counter by 1 |
| 69 | +" |
| 70 | +" FootnoteMeta |
| 71 | +" ~ Change type of the footnotes and restart counter (1, a, A, i, I, *) |
| 72 | +" :FootnoteMeta |
54 | 73 | " If your previous footnote type was alpha, Alpha, roman, Roman or star |
55 | 74 | " new type will be arabic. |
56 | 75 | " If your previous footnote type was arabic new type will be alpha. |
57 | | -" :FootnoteMeta name_of_the_type |
| 76 | +" :FootnoteMeta name_of_the_type |
58 | 77 | " Change footnote type to name_of_the_type. If name_of_the_type is the |
59 | 78 | " same as your current footnote type nothing would be changed. |
60 | 79 | " You can change your default type of footnote before inserting first |
61 | 80 | " footnote. |
62 | | -" FootnoteRestore: |
63 | | -" Restore previous footnote type and counter. Unfortunately there is no easy |
64 | | -" way to sort footnotes at the end of file without handmade :!sort on marked |
65 | | -" lines (it doesn't work for 'star' type). |
66 | | -" :FootnoteRestore |
67 | | -" |
68 | | -" For easier work with this commands I would suggest place this lines in your |
69 | | -" vimrc (they offer very nice completion of Vim commands): |
70 | | -" set laststatus=2 |
71 | | -" set wildmode=longest,list |
72 | | -" set wildmenu |
73 | | -" |
74 | | -" And/or map :FootnoteComs for something you like. |
| 81 | +" |
| 82 | +" FootnoteRestore |
| 83 | +" ~ Restore previous footnote type and counter. Unfortunately there is no easy |
| 84 | +" way to sort footnotes at the end of file without handmade :!sort on marked |
| 85 | +" lines (it doesn't work for 'star' type). |
| 86 | +" :FootnoteRestore |
75 | 87 | " |
76 | 88 | """"""""""""""""""""""""""""""""""""""""""""""""""" |
77 | 89 |
|
|
0 commit comments