vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

merging in vimfootnotes.vim #27

Closed dsanson closed 12 years ago

dsanson commented 13 years ago

The venerable vimfootnotes is a nice little script that provides a mapping (by default, f) for a command that inserts a footnote, automatically providing a number, and opening a little split window at the bottom. (Sort of like Microsoft Word.) When you are done writing the footnote, another mapping (by default, r) closes the split and puts you back where you started.

I've tweaked it so that it produces extended markdown footnotes. Its usable as is alongside vim-pandoc: it installs as a plugin, not a ftplugin, so it just makes itself available everywhere.

It strikes me that this is useful enough to maintain as a separate plugin: lots of extended markdown implementations support this footnote format, not just pandoc. But it also seems like something that would be nice to roll into vim-pandoc eventually.

fmoralesc commented 13 years ago

We could fork it as a subproject of vim-pandoc, as vim-pandoc/vimfootnotes.

Last update was in 2002, so I don't think there would me any problem with it.

fmoralesc commented 13 years ago

Forget what I said, I hand't seen the fork yet.

I think we should keep the plugins separate. I'm not sure if we can use the submodules support in git to turn vim-markdownfootnotes into a submodule of vim-pandoc, but that would be nice. I imagine we could create a vim-pandoc/modules folder to place it under, and then soft link it in the proper folders.

dsanson commented 13 years ago

Yes, I think for now it should definitely be kept separate.

The actual script is perhaps not the most elegant implementation, but it works well enough to be useful. (One example: r will close any window, not just the footnote window spawned by f.) If at some point I get around to spiffying it up and ironing out the bumps, it might make sense to include it.

But it would not be hard to extend it to cover other plaintext footnote formats, like textile, rst, and the like. Not that I think we should tackle this, but it is a reason to keep the plugin separate. One could develop it into a general footnote plugin for vim, in the same way that VOoM is a general outliner for vim.

Independent of this, making vim-pandoc more modular seems like a reasonable long term goal.