searchBinding :: VimBinding
searchBinding = VimBindingE (f . T.unpack . _unEv)
    where f evs (VimState { vsMode = Normal }) | evs `elem` group ['/', '?']
            = WholeMatch $ do
                  state <- fmap vsMode getEditorDyn
                  let dir = if evs == "/" then Forward else Backward
                  switchModeE $ Search state dir
                  isearchInitE dir
                  historyStart
                  historyPrefixSet T.empty
                  return Continue
          f _ _ = NoMatch
searchBinding :: VimBinding
searchBinding = VimBindingE (f . T.unpack . _unEv)
    where f evs (VimState { vsMode = Normal }) | evs `elem` group ['/', '?']
            = WholeMatch $ do
                  state <- fmap vsMode getEditorDyn
                  let dir = if evs == "/" then Forward else Backward
                  switchModeE $ Search state dir
                  isearchInitE dir
                  historyStart
                  historyPrefixSet T.empty
                  return Continue
          f _ _ = NoMatch
searchBinding = VimBindingE (f . T.unpack . _unEv)
    where f evs (VimState { vsMode = Normal }) | evs `elem` group ['/', '?']
            = WholeMatch $ do
                  state <- fmap vsMode getEditorDyn
                  let dir = if evs == "/" then Forward else Backward
                  switchModeE $ Search state dir
                  isearchInitE dir
                  historyStart
                  historyPrefixSet T.empty
                  return Continue
          f _ _ = NoMatch