yi-0.6.2.3: The Haskell-Scriptable EditorSource codeContentsIndex
Yi.Misc
Description
Various high-level functions to further classify.
Synopsis
getAppropriateFiles :: Maybe String -> String -> YiM (String, [String])
getFolder :: Maybe String -> IO String
matchingFileNames :: Maybe String -> String -> YiM [String]
adjBlock :: Int -> BufferM ()
adjIndent :: IndentBehaviour -> BufferM ()
promptFile :: String -> (String -> YiM ()) -> YiM ()
findFileHint :: String -> String -> YiM [String]
Documentation
getAppropriateFiles :: Maybe String -> String -> YiM (String, [String])Source
Given a possible starting path (which if not given defaults to the current directory) and a fragment of a path we find all files within the given (or current) directory which can complete the given path fragment. We return a pair of both directory plus the filenames on their own that is without their directories. The reason for this is that if we return all of the filenames then we get a hint which is way too long to be particularly useful.
getFolder :: Maybe String -> IO StringSource
Given a path, trim the file name bit if it exists. If no path given, return current directory.
matchingFileNames :: Maybe String -> String -> YiM [String]Source
Given a possible path and a prefix, return matching file names.
adjBlock :: Int -> BufferM ()Source
adjIndent :: IndentBehaviour -> BufferM ()Source
A simple wrapper to adjust the current indentation using the mode specific indentation function but according to the given indent behaviour.
promptFile :: String -> (String -> YiM ()) -> YiM ()Source
Generic emacs style prompt file action. Takes a prompt and a continuation act and prompts the user with file hints
findFileHint :: String -> String -> YiM [String]Source
For use as the hint when opening a file using the minibuffer. We essentially return all the files in the given directory which have the given prefix.
Produced by Haddock version 2.6.1