Vim bindings and Python scripts that make editing ReStructuredText files faster.
This plugin is packaged for use with Vundle. This plugin requires Vim to be compiled with Python support.
Install Vundle and then add 'edthedev/vim-rst' to your .vimrc.:
Bundle 'edthedev/vim-rst'
Then, from within Vim, run BundleInstall.:
:BundleInstall
Python 2.6 or later and the simplejson Python library.:
sudo apt-get install python sudo pip install simplejson
Pressing <Leader>img
will convert:
images/snake-in-a-top-hat.png
Into:
.. image:: images/snake-in-a-top-hat.png :alt: images/snake-in-a-top-hat.png
Pressing <Leader>h2
will convert:
Examples
Into:
Examples --------
New! Pressing <Leader>b
with the word 'bold' selected will convert:
Format this bold text.
Into:
Format this *bold* text.
This plugin also does headers for .vim files and the .vimrc file.
Pressing <Leader>h1
in a vim file will convert:
Example
Into:
" -------- " " Example " " --------
Similarly, pressing <Leader>h2
would have resulted in:
" ======== " Example " ========
And, pressing <Leader>h3
would have resulted in:
" Example " --------
Shortcuts are:
<Leader>d - Insert the current date. <Leader>i - Add a refernce to an image. <Leader>h1 - Convert the current line to a top header line. <Leader>h2 - Convert the current line to a secondary header line. <Leader>s - Add a 'SCRATCH NOTES BELOW THIS POINT' header.
Additional header levels are left as the world's least surprising easter eggs, or as excercises for the reader, depending on the markup language.
Also supports the same operations for HTML files, Confluence Wiki markup, and Markdown. I don't use these as much, so if you have any issue using them, drop me a note.
The core purpose of this plugin is to remember miscellaneous trivia markup languages so you don't have to. The secondary purpose is to save keystrokes.
Where possible, this plugin sacrifices elegance in favor of clarity, in the hopes that others will be able to quickly fork and improve it.