Overview of Yi Contrib User Configs

Posted on June 1, 2014 by richardgoulter
Tags: , ,

The Yi editor repository on GitHub has a yi-contrib folder with some sample configurations of Yi, which contains about a dozen Haskell files which are hopefully useful to new Yi users.

See https://github.com/yi-editor/yi/tree/master/yi-contrib/src/Yi

FuzzyOpen.hs”aims to provide (the essential subset of) the same functionality that vim plugins ctrlp and command-t provide.” It’s written as a module, so that configurations can import the module and add the functionality with a statement like:

(ctrlCh ‘p’ ?>>! fuzzyOpen)

Template.hs isn’t as “well commented” as FuzzyOpen, but seems to be a module for … inserting templates. (It looks like the templates are embedded in the Haskell code).

Style/Misc.hs contains some code which is a module for two custom colour schemes. (Related, Yi/Style/Library.hs of the main codebase has two color schemes, default and darkBlueTheme).

Config/Users The configs below appear to all be written as Haskell modules. My understanding is this allows them to be used from yi-contrib package from Haddock, but a yi.hs config file adapted from these would look largely the same.

Amy.hs shows a module using the CUA keymap, which adds a keymap with a “helloworld” which inserts the text “helloworld”. (The same “helloworld” as from what shows up in a Google search for “Yi tutorial”, from nobugs.org).

Anders.hs prefers the Emacs keymap; the config adds an “increase indent” functionality, as well as some Haskell mode hooks are added to Precise Haskell mode.

Cmcq.hs which configures: “If Yi is called with parameter”–type”, it will insert 500 characters and exit. With “–open”, it will open a buffer, type, and kill the buffer, 50 times. Pango and Vty frontends are supported.”

Corey.hs a typical yi.hs “that uses the Vim keymap with these additions: - Always uses the VTY UI by default. - The color style is darkBlueTheme - The insert mode of the Vim keymap has been extended with a few additions I find useful.”

Ertai.hs I have no idea what this does; I don’t know what to highlight. Some things about mode tables and hooks, Greek letters / symbol insertion.. deleting soft-tab spaces as if they were hard-tabs..

Gwern.hs adds a “go to line” to the Emacs keymap, and has a “best Haskell mode” (which is what the others call haskellModeHooks). A relatively short config.

JP.hs has a bunch of good things. More than Ertai.hs.

Jeff.hs fine tunes the Vim keymap and Vim (Haskell) snippets.

Michal.hs heavily configures things, with a custom colour theme, and a “Diary mode”.

Reiner.hs has some cool custom functionality like compileLatex, global keybindings, and a function to insert fancy section comments.

(There’s also JP’s Experimental keymap).


Newer post Older post