Skip to main content

programmable Vim, no need of +clientserver!

Project description

Travis CI Coveralls Code Climate PyPI Version Python Versions


headlessvim makes Vim programmable to support developping Vim plugins.

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


Using pip (recommended)

pip install headlessvim

The good old

python install


A simple example is here:

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

Integrating to unittest:

import unittest
import headlessvim

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

    def tearDown(self):

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


See the online document for more information.



python test


The MIT License.

See LICENSE.txt for more information.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for headlessvim, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size headlessvim-0.0.5-py2-none-any.whl (10.2 kB) File type Wheel Python version 2.6 Upload date Hashes View hashes
Filename, size headlessvim-0.0.5.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page