Skip to content

Commit

Permalink
Whitespace only
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuuzetsu committed Jan 14, 2014
1 parent 99edcb0 commit 0a9bad2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 28 deletions.
13 changes: 6 additions & 7 deletions yi/example-configs/yi-cua.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Yi
import Yi.Prelude
import Prelude ()

-- Import the desired UI as needed.
-- Import the desired UI as needed.
-- Some are not complied in, so we import none here.

-- import Yi.UI.Vty (start)
Expand All @@ -23,24 +23,23 @@ defaultUIConfig = configUI myConfig
main :: IO ()
main = yi $ myConfig
{

-- Keymap Configuration
defaultKm = defaultKm myConfig,

-- UI Configuration
-- Override the default UI as such:
-- 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 = ' '

configWindowFill = ' '
}
}

24 changes: 12 additions & 12 deletions yi/example-configs/yi-vim-snippets.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@ module Main where

import Yi
import Yi.Keymap
import Yi.Keymap.Vim
import Yi.Keymap.Vim
import Yi.Snippets

main :: IO ()
main = yi $ defaultVimConfig {
defaultKm = myVimKeymap

-- install update handler for dependent snippet regions
, bufferUpdateHandler = [updateUpdatedMarks]
, bufferUpdateHandler = [updateUpdatedMarks]
}

deleteSnippets = False

myVimKeymap = mkKeymap $ defKeymap `override` \super self -> super {
v_ins_char = (v_ins_char super ||> tabKeymap)
<|> (ctrlCh 's' ?>>! moveToNextBufferMark deleteSnippets)
myVimKeymap =
mkKeymap $ defKeymap `override` \super self -> super {
v_ins_char = (v_ins_char super ||> tabKeymap)
<|> (ctrlCh 's' ?>>! moveToNextBufferMark deleteSnippets)
, v_ex_cmds = myExCmds
}

myExCmds = exCmds [ ("sd", const $ withEditor showDepMarks, Nothing) ]
showDepMarks = withBuffer0 (getA bufferDynamicValueA >>=

showDepMarks = withBuffer0 (getA bufferDynamicValueA >>=
mapM markRegion . concat . marks) >>=
printMsg . show

Expand All @@ -44,26 +45,25 @@ testSnippet = snippet $
"if ( " & (cursorWith 1 "...") & " ) {\n" &
"\t" & (cursorWith 2 "/* code */") &
"\n}\n" & (cursor 3)

testSnippet2 :: SnippetCmd ()
testSnippet2 = snippet $
(cursorWith 2 "abcdef") & "\n" &
(dep 2) & "\ndef" &
(cursor 1)

testSnippet3 :: SnippetCmd ()
testSnippet3 = snippet $
testSnippet3 = snippet $
"for(int " & (cursorWith 2 "ab") & " = 0; " &
(dep 2) & " < " & (cursorWith 1 "arr") & ".length;" &
(dep 2) & "++) {\n" &
"\t" & (cursorWith 3 "/* code */") &
"\n}\n" & (cursor 4)

testSnippet4 :: SnippetCmd ()
testSnippet4 = snippet $
testSnippet4 = snippet $
"for(int " & (cursorWith 1 "ab") & " = 0; " &
(dep 1) & " < " & (cursorWith 2 "arr") & ".length;" &
(dep 1) & "++) {\n" &
"\t" & (cursorWith 3 "/* code */") &
"\n}\n" & (cursor 4)

4 changes: 2 additions & 2 deletions yi/example-configs/yi-vim2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ myKeymapSet = V2.mkKeymapSet $ V2.defVimConfig `override` \super this ->
let eval = V2.pureEval this
in super {
-- Here we can add custom bindings.
-- See Yi.Keymap.Vim2.Common for datatypes and
-- See Yi.Keymap.Vim2.Common for datatypes and
-- Yi.Keymap.Vim2.Utils for useful functions like mkStringBindingE

-- In case of conflict, that is if there exist multiple bindings
Expand Down Expand Up @@ -67,4 +67,4 @@ myModes = [
modePrettify = const $ return ()
, modeGetAnnotations = (const . const) []
}
]
]
13 changes: 6 additions & 7 deletions yi/example-configs/yi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Yi.Keymap.Emacs (keymap)
import Yi.Keymap.Cua (keymap)
import Yi.Keymap.Vim (keymapSet)

-- Import the desired UI as needed.
-- Import the desired UI as needed.
-- Some are not complied in, so we import none here.

-- import Yi.UI.Vty (start)
Expand All @@ -28,25 +28,24 @@ defaultUIConfig = configUI myConfig
main :: IO ()
main = yi $ myConfig
{

-- Keymap Configuration
defaultKm = defaultKm myConfig,

-- UI Configuration
-- Override the default UI as such:
-- 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 = ' '

configWindowFill = ' '
-- '~' -- Typical for Vim
}
}

0 comments on commit 0a9bad2

Please sign in to comment.