I'm using CUA mode, and I want to make PageUp and PageDown work as 
expected. There's no TextUnit for "Page", so it seems I can't do it using 
maybeMoveB. Is there another way to do it?

Here's my config:

{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-} -- is this needed?
import Yi
import Yi.Keymap.Cua


myConfig :: Config
myConfig = defaultCuaConfig

defaultUIConfig :: UIConfig
defaultUIConfig = configUI myConfig

extendedCuaKeymapSet :: KeymapSet
extendedCuaKeymapSet = customizedCuaKeymapSet $
  choice [ metaCh 'x' ?>>! helloWorld
         , metaCh 's' ?>>! promptFile "Write file:" fwriteToE
         , spec KPageUp ?>>! maybeMoveB ??? Backward
         , spec KPageDown ?>>! maybeMoveB ??? Forward ]

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

main :: IO ()
main = yi $ myConfig
  {

   -- Keymap Configuration
   defaultKm = extendedCuaKeymapSet,

   -- UI Configuration
   -- Override the default UI as such:
   startFrontEnd = startFrontEnd myConfig,

   configUI = defaultUIConfig
     {
       configFontSize = Nothing,
                        -- 'Just 10' for specifying the size.
       configTheme = configTheme defaultUIConfig,
                     -- darkBlueTheme  -- Change the color scheme here.

       configWindowFill = ' '
     }
  }



-- 
-- 
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/d/optout.

Reply via email to