# VimState

Source: /tuil/docs/reference/packages/editor/api/vim-state
Locale: en

interface exported by @mwillbanks/tuil-editor.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-editor`.

```ts
export interface VimState {
  readonly mode: VimMode;
  readonly count: number;
  readonly pendingOperator?: "delete" | "change" | "yank";
  readonly commandLine: string;
  readonly registers: Readonly<Record<string, string>>;
  readonly marks: Readonly<Record<string, EditorPosition>>;
}
```

## Members [#members]

| Member            | Type                                          | Required | Description                                                                                   | Related types                                                           |
| ----------------- | --------------------------------------------- | -------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `mode`            | `VimMode`                                     | Yes      | The `mode` member uses the `VimMode` contract.                                                | [`VimMode`](/tuil/docs/reference/packages/editor/api/vim-mode)               |
| `count`           | `number`                                      | Yes      | The `count` member uses the `number` contract.                                                | —                                                                       |
| `pendingOperator` | `"delete" \| "change" \| "yank" \| undefined` | No       | The `pendingOperator` member uses the `"delete" \| "change" \| "yank" \| undefined` contract. | —                                                                       |
| `commandLine`     | `string`                                      | Yes      | The `commandLine` member uses the `string` contract.                                          | —                                                                       |
| `registers`       | `Readonly<Record<string, string>>`            | Yes      | The `registers` member uses the `Readonly<Record<string, string>>` contract.                  | —                                                                       |
| `marks`           | `Readonly<Record<string, EditorPosition>>`    | Yes      | The `marks` member uses the `Readonly<Record<string, EditorPosition>>` contract.              | [`EditorPosition`](/tuil/docs/reference/packages/editor/api/editor-position) |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`EditorPosition`](/tuil/docs/reference/packages/editor/api/editor-position)
* [`VimMode`](/tuil/docs/reference/packages/editor/api/vim-mode)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/editor/src/vim.ts)

## Package [#package]

[@mwillbanks/tuil-editor](/tuil/docs/reference/packages/editor)
