Documentation ¶
Index ¶
- Constants
- type Sources
- func (s *Sources) LoadLiveVim() *Sources
- func (s *Sources) LoadLiveVimAgain() *Sources
- func (s *Sources) LoadStaticVim() *Sources
- func (s *Sources) LoadStaticX11() *Sources
- func (s *Sources) LoadUnicode() *Sources
- func (s *Sources) LoadUnicodeBlocks() *Sources
- func (s *Sources) LoadUnicodeSearch() *Sources
- type VimData
- type VimDigraph
- type X11Data
Constants ¶
const X11Locale string = "en_US.UTF-8"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sources ¶
Sources encapsulates all the sources of data we use for various lookups.
func NewAll ¶
func NewAll() *Sources
NewAll gives us a Sources item which has had loaded all the data sources that we know about.
func NewFast ¶ added in v0.0.3
func NewFast() *Sources
NewFast gives us a Sources item which has the fast data; no search, no live vim
func (*Sources) LoadLiveVim ¶ added in v0.0.3
LoadLiveVim gives us dynamically-loaded data about vim digraphs, retrieved by invoking vim. Will handle vim not being installed (but will print errors; we'll probably change this in the future).
func (*Sources) LoadLiveVimAgain ¶ added in v0.0.3
LoadLiveVimAgain avoids the cache so that data is loaded from Vim again
func (*Sources) LoadStaticVim ¶ added in v0.0.3
LoadStaticVim gives us vim digraphs built into character, based upon shipping digraphs as of some unspecified version of vim.
func (*Sources) LoadStaticX11 ¶ added in v0.6.1
LoadStaticX11 gives us the X11 compose sequences built into character.
func (*Sources) LoadUnicode ¶
LoadUnicode gives us static information about Unicode data sources.
func (*Sources) LoadUnicodeBlocks ¶ added in v0.6.1
LoadUnicodeBlocks makes available Unicode block information
func (*Sources) LoadUnicodeSearch ¶ added in v0.0.3
LoadUnicodeSearch gives us static information about Unicode data sources, but also gives us substring search capabilities.
type VimData ¶
type VimData struct {
DigraphByRune map[rune][]VimDigraph
}
VimData is the set of all data we have retrieved about characters from vim.
func (VimData) DigraphsFor ¶
DigraphsFor retrieves a string which is a space-separated list of the known digraph sequences which will produce a given rune.
func (VimData) DigraphsSliceFor ¶ added in v0.6.1
DigraphsSliceFor returns the same as DigraphsFor but without space-joining. Just in case someone uses a space as part of a digraph sequence, we don't split on space for the one case where we want this.
type VimDigraph ¶
VimDigraph encapsulates a vim digraph sequence, which is an input tuple of keypresses which together result in a rune. After typing "Ctrl-K", you might enter "Pd" to get "£".
type X11Data ¶ added in v0.6.1
type X11Data struct { // The string is a space-separated list of input sequences. // An ASCII SPACE 0x20 will not appear, as we encode it as `␠` 0x2420. DigraphsByRune map[rune]string }
X11Data is the set of all data we have about X11 keyboard sequences. Note: we only have static compile-time data, we don't (at this time?) support ~/.XCompose TODO: support ~/.XCompose using the same liveness flag as for vim? New flag?
func (X11Data) DigraphsFor ¶ added in v0.6.1
DigraphsFor retrieves a string which is a space-separated list of the known digraph sequences which will produce a given rune. Note that we use `␠` in place of space in our representation.
func (X11Data) DigraphsSliceFor ¶ added in v0.6.1
DigraphsSliceFor returns a list of input sequences which emit the given rune. We take firm advantage of our ␠ usage here.