# cm-inline-complete

> Inline autocomplete for CodeMirror based on Chrome devtools

Latest version **1.1.3** (published 2018-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install cm-inline-complete
pnpm add cm-inline-complete
yarn add cm-inline-complete
bun add cm-inline-complete
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2018-07-26 |
| First published | 2018-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Remy Sharp |
| Maintainers | remy |
| Keywords | codemirror, autocomplete |

## Links

- npm: https://www.npmjs.com/package/cm-inline-complete
- Repository: https://github.com/remy/inline-complete
- Homepage: https://github.com/remy/inline-complete#readme
- Issues: https://github.com/remy/inline-complete/issues
- npm.io page: https://npm.io/package/cm-inline-complete

## Recent versions

- 1.1.3 (latest) — 2018-07-26
- 1.1.2 — 2018-07-26
- 1.1.1 — 2018-02-21
- 1.1.0 — 2018-01-23
- 1.0.2 — 2018-01-22
- 1.0.1 — 2018-01-22
- 1.0.0 — 2018-01-22

## README

# cm-inline-complete: A CodeMirror autocomplete plugin

Inspired by Chrome's devtools (and I read their source code to solve some of this), an inline, as-you-type, autocomplete for CodeMirror.

## Usage

Include this plugin using a `script` tag, `require` or `import` statement, then pass `autocomplete: true` to the CodeMirror creation method:

```js
const el = document.querySelector('textarea');
const cm = CodeMirror.fromTextArea(el, {
  mode: 'html',
  autocomplete: true,
});
```

The plugin provides HTML, CSS and JavaScript autocompletion by default. If you select a different language mode, you will need to provide your own `keywords` - an array of terms:

```js
const el = document.querySelector('textarea');
const cm = CodeMirror.fromTextArea(el, {
  mode: 'php',
  autocomplete: true,
  keywords: CodeMirror.hintWords.php,
});
```

Tip: most language mode plugins include the full set of keywords somewhere in their code. It's not always the same place, but in the above example you can see we're able to benefit from a helper exposing the PHP keywords.

## License

- MIT / https://rem.mit-licence.org

---
_Source: https://npm.io/package/cm-inline-complete · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
