yi-0.12.0: The Haskell-Scriptable Editor

LicenseGPL-2
Maintaineryi-devel@googlegroups.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010
Extensions
  • OverloadedStrings
  • PackageImports
  • NondecreasingIndentation

Yi.Modes

Description

Definitions for the bulk of modes shipped with Yi.

Synopsis

Documentation

type TokenBasedMode tok = Mode (Tree (Tok tok)) Source

cMode :: StyleBasedMode Source

objectiveCMode :: StyleBasedMode Source

cppMode :: StyleBasedMode Source

cabalMode :: StyleBasedMode Source

clojureMode :: StyleBasedMode Source

srmcMode :: StyleBasedMode Source

ottMode :: StyleBasedMode Source

gnuMakeMode :: StyleBasedMode Source

perlMode :: StyleBasedMode Source

pythonMode :: StyleBasedMode Source

javaMode :: StyleBasedMode Source

jsonMode :: StyleBasedMode Source

anyExtension Source

Arguments

:: [String]

List of extensions

-> FilePath

Path to compare against

-> a

File contents. Currently unused but see extensionOrContentsMatch.

-> Bool 

When applied to an extensions list, creates a modeApplies function.

extensionOrContentsMatch :: [String] -> String -> FilePath -> YiString -> Bool Source

When applied to an extensions list and regular expression pattern, creates a modeApplies function.

linearSyntaxMode Source

Arguments

:: Show s 
=> s

Starting state

-> TokenLexer AlexState s (Tok t) AlexInput 
-> (t -> StyleName) 
-> TokenBasedMode t 

Specialised version of linearSyntaxMode' for the common case, wrapping up into a Lexer with commonLexer.

svnCommitMode :: StyleBasedMode Source

hookModes :: (AnyMode -> Bool) -> BufferM () -> [AnyMode] -> [AnyMode] Source

Adds a hook to all matching hooks in a list

applyModeHooks :: [(AnyMode -> Bool, BufferM ())] -> [AnyMode] -> [AnyMode] Source

Apply a list of mode hooks to a list of AnyModes

lookupMode :: AnyMode -> YiM AnyMode Source

Check whether a mode of the same name is already in modeTable and returns the original mode, if it isn't the case.

whitespaceMode :: StyleBasedMode Source

rubyMode :: StyleBasedMode Source

styleMode :: Show (l s) => StyleLexer l s t i -> TokenBasedMode t Source