Metadata-Version: 2.0
Name: headlessvim
Version: 0.0.4
Summary: programmable Vim, no need of +clientserver!
Home-page: https://github.com/manicmaniac/headlessvim
Author: Ryosuke Ito
Author-email: rito.0305@gmail.com
License: MIT
Keywords: vim test
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: pyte (>=0.4.10)
Requires-Dist: six (>=1.9.0)

headlessvim
===========

.. image:: https://img.shields.io/travis/manicmaniac/headlessvim.svg
    :target: https://travis-ci.org/manicmaniac/headlessvim

.. image:: https://img.shields.io/coveralls/manicmaniac/headlessvim.svg
    :target: https://coveralls.io/github/manicmaniac/headlessvim?branch=master

.. image:: https://img.shields.io/codeclimate/github/manicmaniac/headlessvim.svg
    :target: https://codeclimate.com/github/manicmaniac/headlessvim
    :alt: Code Climate

.. image:: https://img.shields.io/pypi/v/headlessvim.svg
    :target: https://pypi.python.org/pypi/headlessvim
    :alt: PyPI Version

.. image:: https://img.shields.io/pypi/pyversions/headlessvim.svg
    :target: https://pypi.python.org/pypi/headlessvim
    :alt: Python Versions

Introduction
------------

``headlessvim`` makes Vim programmable to support developping Vim plugins.

The most distinctive characteristic is,
``headlessvim`` NEVER needs ``+clientserver`` feature.

Install
-------

Using ``pip`` (recommended)

.. code:: sh

    pip install headlessvim

The good old ``setup.py``

.. code:: sh

    python setup.py install

Usage
-----

A simple example is here:

.. code:: python

    >>> import headlessvim
    >>> with headlessvim.open() as vim:
    ...    vim.echo('"spam"') # make sure to quote bare words
    ...
    'spam'
    >>> import os
    >>> env = dict(os.environ, LANG='C')
    >>> with headlessvim.open(executable='/usr/bin/vim', args='-N -u /etc/vim/vimrc', env=env):
    ...    vim.send_keys('iham\033')
    ...    vim.display_lines()[0].strip()
    ...
    'ham'

Integrating to ``unittest``:

.. code:: python

    import unittest
    import headlessvim

    class TestVimPlugin(unittest.TestCase):
        def setUp(self):
            self.vim = headlessvim.open()

        def tearDown(self):
            self.vim.close()

        def testSomeFeature(self):
            res = self.vim.echo('"ham egg"')
            self.assertEqual(res, 'ham egg')

Documentation
-------------

See `the online document <http://pythonhosted.org/headlessvim/>`_ for more information.

Testing
-------

Execute:

.. code:: sh

    python setup.py test


License
-------

The MIT License.

See `LICENSE.txt <LICENSE.txt>`_ for more information.


