register

package
v0.4.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package register implements the editor register store

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registers

type Registers map[rune][]string

Registers maps register names to value lists. '_' is the black hole, whose reads return empty and whose writes are discarded, and '"' is the default yank register

func New

func New() Registers

New returns an empty Registers

func (Registers) Clear

func (r Registers) Clear(name rune)

Clear removes all values stored under name

func (Registers) ClearAll

func (r Registers) ClearAll()

ClearAll removes all register values

func (Registers) First

func (r Registers) First(name rune) (string, bool)

First returns the first value stored under name, or ("", false)

func (Registers) Read

func (r Registers) Read(name rune) []string

Read returns the values stored under name, in insertion order. Returns nil if the register is empty or unset

func (Registers) Set

func (r Registers) Set(name rune, value string)

Set stores a single string value under name

func (Registers) Write

func (r Registers) Write(name rune, values []string)

Write stores values under name. For the black-hole register ('_') the write is silently discarded

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL