2022-12-15 04:00:54 +00:00
|
|
|
---
|
2023-08-26 15:30:51 +00:00
|
|
|
title: Module hilbish.editor
|
2022-12-15 04:00:54 +00:00
|
|
|
description: interactions for Hilbish's line reader
|
|
|
|
layout: doc
|
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: "API"
|
|
|
|
---
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
The hilbish.editor interface provides functions to
|
|
|
|
directly interact with the line editor in use.
|
|
|
|
|
|
|
|
## Functions
|
2023-09-02 18:18:40 +00:00
|
|
|
|||
|
|
|
|
|----|----|
|
|
|
|
|<a href="#editor.getLine">getLine() -> string</a>|Returns the current input line.|
|
|
|
|
|<a href="#editor.getVimRegister">getVimRegister(register) -> string</a>|Returns the text that is at the register.|
|
|
|
|
|<a href="#editor.insert">insert(text)</a>|Inserts text into the line.|
|
|
|
|
|<a href="#editor.setVimRegister">setVimRegister(register, text)</a>|Sets the vim register at `register` to hold the passed text.|
|
|
|
|
|
|
|
|
<hr><div id='editor.getLine'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.editor.getLine() -> string
|
|
|
|
<a href="#editor.getLine" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
|
2022-12-15 04:00:54 +00:00
|
|
|
Returns the current input line.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div><hr><div id='editor.getVimRegister'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.editor.getVimRegister(register) -> string
|
|
|
|
<a href="#editor.getVimRegister" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
2022-12-15 04:00:54 +00:00
|
|
|
|
|
|
|
Returns the text that is at the register.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div><hr><div id='editor.insert'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.editor.insert(text)
|
|
|
|
<a href="#editor.insert" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
2022-12-15 04:00:54 +00:00
|
|
|
|
|
|
|
Inserts text into the line.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div><hr><div id='editor.setVimRegister'>
|
|
|
|
<h4 class='heading'>
|
|
|
|
hilbish.editor.setVimRegister(register, text)
|
|
|
|
<a href="#editor.setVimRegister" class='heading-link'>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
</a>
|
|
|
|
</h4>
|
2022-12-15 04:00:54 +00:00
|
|
|
|
|
|
|
Sets the vim register at `register` to hold the passed text.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2023-09-02 18:18:40 +00:00
|
|
|
</div>
|