Package-level declarations

Types

Link copied to clipboard
data class ActionArgs(var repeat: Int = 1, var forward: Boolean? = null, var head: LinePos? = null, var position: String? = null, var backtrack: Boolean? = null, var increase: Boolean? = null, var repeatIsExplicit: Boolean? = null, var indentRight: Boolean? = null, var selectedCharacter: String? = null, var after: Boolean? = null, var matchIndent: Boolean? = null, var registerName: String? = null, var isEdit: Boolean? = null, var linewise: Boolean? = null, var insertAt: String? = null, var blockwise: Boolean? = null, var keepSpaces: Boolean? = null, var replace: Boolean? = null, var keepCursor: Boolean? = null)
Link copied to clipboard
typealias ExFn = (cm: VimEditor, params: ExParams) -> Unit

Callback type for a custom ex command registered via Vim.defineEx.

Link copied to clipboard
data class ExParams(var commandName: String = "", var argString: String = "", var input: String = "", var args: MutableList<String>? = null, var line: Int = 0, var lineEnd: Int? = null, var hasLineRange: Boolean = false, var selectionLine: Int = 0, var selectionLineEnd: Int? = null, var setCfg: MutableMap<String, String>? = null, var callback: () -> Unit? = null)

Parameters passed to a custom ex command handler registered via Vim.defineEx.

Link copied to clipboard
data class InsertModeKey(val keyName: String)
Link copied to clipboard
data class LastSelection(val head: LinePos, val anchor: LinePos, val visualLine: Boolean, val visualBlock: Boolean)
Link copied to clipboard
interface LineHandle

A line handle reference.

Link copied to clipboard
data class LinePos(val line: Int, val ch: Int, val sticky: String? = null) : Comparable<LinePos>

A position in the editor, using 0-based line numbers and character offsets. This mirrors CM5's LinePos(line, ch) used throughout the vim engine.

Link copied to clipboard
data class LinePosRange(var anchor: LinePos, var head: LinePos)

A selection range with anchor and head, using LinePos coordinates.

Link copied to clipboard
interface Marker

A bookmark marker that tracks a position through document changes.

Link copied to clipboard
data class MotionArgs(var repeat: Int = 1, var forward: Boolean? = null, var selectedCharacter: String? = null, var linewise: Boolean? = null, var textObjectInner: Boolean? = null, var sameLine: Boolean? = null, var repeatOffset: Int? = null, var toJumplist: Boolean? = null, var inclusive: Boolean? = null, var wordEnd: Boolean? = null, var toFirstChar: Boolean? = null, var explicitRepeat: Boolean? = null, var bigWord: Boolean? = null, var repeatIsExplicit: Boolean? = null, var noRepeat: Boolean? = null)
Link copied to clipboard
sealed class MotionResult

Result of a motion: either a single position or a pair (anchor, head).

Link copied to clipboard
data class OperatorArgs(var repeat: Int = 0, var forward: Boolean? = null, var linewise: Boolean? = null, var fullLine: Boolean? = null, var registerName: String? = null, var indentRight: Boolean? = null, var toLower: Boolean? = null, var shouldMoveCursor: Boolean? = null, var selectedCharacter: String? = null, var lastSel: LastSelection? = null, var keepCursor: Boolean? = null)
Link copied to clipboard
data class SearchArgs(val forward: Boolean? = null, val toJumplist: Boolean? = null, val wholeWordOnly: Boolean? = null, val querySrc: String? = null)
Link copied to clipboard
data class SearchOverlay(val query: Regex)
Link copied to clipboard
Link copied to clipboard
class VimEditor(val session: EditorSession)

Properties

Link copied to clipboard

A StateField that tracks the current vim mode as a string.

Link copied to clipboard

A StateField that tracks the current vim status string (pending key sequence or command output shown in the status bar).

Functions

Link copied to clipboard
fun LinePos.copy(line: Int = this.line, ch: Int = this.ch): LinePos

Copy a LinePos, optionally overriding line or ch.

Link copied to clipboard
Link copied to clipboard

Get the VimEditor associated with an EditorSession, or null if vim mode is not active.

Link copied to clipboard
Link copied to clipboard
fun vim(status: Boolean = false): Extension

Create a vim mode extension for the editor.