text-helper.vim


Ⅰ. 插件描述

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

Ⅱ. 基本信息

创建日期:  2013-10-09
使用用户:  1
Github星:  6
插件作者:  Edward Delaporte

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'edthedev/text-helper-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'edthedev/text-helper-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'edthedev/text-helper-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/edthedev/text-helper.vim

Ⅳ. 文档说明

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.

.. _Vim: http://vim.org/about.php
.. _Python: http://python.org
.. _Vundle: https://github.com/gmarik/vundle/blob/master/README.md

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.

添加新评论