yi-core-0.19.4: Yi editor core library

Safe Haskell | None
Language | Haskell2010

Yi.PersistentState

Description

This module implements persistence across different Yi runs. It includes minibuffer command history, marks etc. Warning: Current version will _not_ check whether two or more instances of Yi are run at the same time.

Synopsis

- loadPersistentState :: YiM ()
- savePersistentState :: YiM ()
- maxHistoryEntries :: Field Int
- persistentSearch :: Field Bool

# Documentation

loadPersistentState :: YiM () Source #

Loads a persistent state, and sets Yi state variables accordingly.

savePersistentState :: YiM () Source #

Here is a persistent history saving part. We assume each command is a single line. To add new components, one has to:

- add new field in `PersistentState` structure,
- add write and read parts in `loadPersistentState`/`savePersistentState`,
- add a trimming code in `savePersistentState` to prevent blowing up of save file.

maxHistoryEntries :: Field Int Source #

persistentSearch :: Field Bool Source #