Skip to content

edthedev/text-helper.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-rst

Vim bindings and Python scripts that make editing ReStructuredText files faster.

Installation

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

Requires

Python 2.6 or later and the simplejson Python library.:

sudo apt-get install python
sudo pip install simplejson

ReStructured Text Examples

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.

Vim Examples

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
" --------

Keyboard Shortcuts

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.

Additional Formats

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.

Philosophy

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.

About

Vim bindings and Python scripts that make editing ReStructuredText files faster.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published