Now that yi has the workaround for accented characters, I'm ready to start 
using it in earnest. However, I'm having a little trouble getting the right 
configuration. I want to use the Cua keybindings, but add macro support. 
Here are my questions. Thank you in advance for any help.

1. I need a way to launch my macros. Could I bind a key to 
executeExtendedCommandE, or will that only work if I'm using an Emacs-based 
config? For example, suppose I've added a "helloWorld" function to my 
config, could I type the chosen key and then "helloWorld"?

2. I'm having trouble figuring out the syntax for adding key bindings to 
the configuration. I'm trying to adapt some of the examples, but since the 
examples are all Emacs or Vim, I'm a bit stuck. And I'm getting a bit lost 
in the Haddock documentation. Here's what I have. The error message is 
"/home/amy/.config/yi/yi.hs:13:16: parse error on input `''".

    import Yi

    -- Preamble
    import Yi.Prelude
    import Prelude ()

    myConfig = defaultCuaConfig

    defaultUIConfig = configUI myConfig

    extendedCuaKeymap = defKeymap `override` \super self -> super
        {
            metaCh 'x'           ?>>! executeExtendedCommandE
        }


    main :: IO ()
    main = yi $ myConfig
      {
       
       -- Keymap Configuration
       --   defaultKm = defaultKm myConfig,
       defaultKm = mkKeymap extendedCuaKeymap,

       -- UI Configuration
       -- Override the default UI as such: 
       startFrontEnd = startFrontEnd myConfig,
                        -- Yi.UI.Vty.start -- for Vty
       -- (can be overridden at the command line)
       -- Options:
       configUI = defaultUIConfig
         { 
           configFontSize = Nothing,
                            -- 'Just 10' for specifying the size.
           configTheme = configTheme defaultUIConfig,
                         -- darkBlueTheme  -- Change the color scheme here.
           
           configWindowFill = ' ' 
         }
      }

    helloWorld :: YiM ()
    helloWorld = do 
      withBuffer $ insertN "Hello, world!"

-- 
-- 
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
--- 
You received this message because you are subscribed to the Google Groups 
"yi.devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to yi-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to