yi-0.6.2.4: The Haskell-Scriptable Editor

Yi.File

Contents

Synopsis

File-based actions

viWrite :: YiM ()Source

Try to write a file in the manner of vi/vim Need to catch any exception to avoid losing bindings

viWriteTo :: String -> YiM ()Source

Try to write to a named file in the manner of vi/vim

viSafeWriteTo :: String -> YiM ()Source

Try to write to a named file if it doesn't exist. Error out if it does.

fwriteE :: YiM ()Source

Write current buffer to disk, if this buffer is associated with a file

fwriteBufferE :: BufferRef -> YiM ()Source

Write a given buffer to disk if it is associated with a file.

fwriteAllE :: YiM ()Source

Write all open buffers

fwriteToE :: String -> YiM ()Source

Write current buffer to disk as f. The file is also set to f

backupE :: FilePath -> YiM ()Source

Make a backup copy of file

revertE :: YiM ()Source

Revert to the contents of the file on disk

Helper functions

setFileName :: BufferRef -> FilePath -> YiM ()Source

Associate buffer with file; canonicalize the given path name.