PHPackages                             mheap/vimrunner-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mheap/vimrunner-php

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

mheap/vimrunner-php
===================

Control Vim using PHP

0.0.1(10y ago)118MITPHP

Since Feb 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mheap/vimrunner-php)[ Packagist](https://packagist.org/packages/mheap/vimrunner-php)[ RSS](/packages/mheap-vimrunner-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

vimrunner-php
=============

[](#vimrunner-php)

This is a hugely untested library for sending commands to a remote Vim instance. For an example of how to use it, look at [example.php](example.php)

### Creating a client

[](#creating-a-client)

Make sure that your `vim` is compiled with `+clientserver` with `vim --version | grep clientserver`. If it starts with a + it supports it. If it starts with a - it doesn't. `gvim` and `macvim` tend to come with it enabled.

Start vim with `vim --servername FOO` to start it with the remote server enabled.

In your script, create a new client like so:

```
$c = new Vimrunner\Client("FOO");
```

All of the available commands so far are in `src/Vimrunner/Client.php`.

### Available commands

[](#available-commands)

The most common command will be `writeLine`.

```
// Will type "Hello World", with 0.1 seconds between each key press
// and add a new line "\n" at the end
$c->writeLine("Hello World", 1);

// You can also decide how you enter insert mode
// e.g. enter in append mode
$c->writeLine("Hello World", 1, "a");

```

`writeLine` will put you in normal mode once they're done typing.

Other useful methods:

```
// Make sure we're in normal mode
$c->ensureInNormalMode();

// Send a string of key presses in normal mode
// e.g. Reformat the entire file
$c->normal("gg=G");

// Send a command
// e.g. :w
$c->command("w");

// Open a file for editing
$c->editFile("/tmp/example");

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3778d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dfa28bbbb71524c79c7d87ad762c23e7a35dfc7216436a3ed6362cbdeda04299?d=identicon)[mheap](/maintainers/mheap)

---

Top Contributors

[![mheap](https://avatars.githubusercontent.com/u/59130?v=4)](https://github.com/mheap "mheap (1 commits)")

### Embed Badge

![Health badge](/badges/mheap-vimrunner-php/health.svg)

```
[![Health](https://phpackages.com/badges/mheap-vimrunner-php/health.svg)](https://phpackages.com/packages/mheap-vimrunner-php)
```

###  Alternatives

[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k7.9M105](/packages/deptrac-deptrac)[akaunting/laravel-menu

Menu and sidebar management package for Laravel

38248.3k](/packages/akaunting-laravel-menu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
