License | GPL-2 |
---|---|
Maintainer | yi-devel@googlegroups.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Extensions |
|
- editFile :: FilePath -> YiM (Either Text BufferRef)
- openingNewFile :: FilePath -> BufferM a -> YiM ()
- openNewFile :: FilePath -> YiM ()
- viWrite :: YiM ()
- viWriteTo :: Text -> YiM ()
- viSafeWriteTo :: Text -> YiM ()
- fwriteE :: YiM Bool
- fwriteBufferE :: BufferRef -> YiM Bool
- fwriteAllY :: YiM Bool
- fwriteToE :: Text -> YiM Bool
- backupE :: FilePath -> YiM ()
- revertE :: YiM ()
- setFileName :: BufferRef -> FilePath -> YiM ()
- deservesSave :: FBuffer -> YiM Bool
- preSaveHooks :: Field [Action]
File-based actions
editFile :: FilePath -> YiM (Either Text BufferRef) Source
If file exists, read contents of file into a new buffer, otherwise creating a new empty buffer. Replace the current window with a new window onto the new buffer.
If the file is already open, just switch to the corresponding buffer.
Need to clean up semantics for when buffers exist, and how to attach windows to buffers.
Yi.File
module re-exports this, you probably want to import that
instead.
In case of a decoding failure, failure message is returned instead
of the BufferRef
.
openingNewFile :: FilePath -> BufferM a -> YiM () Source
openNewFile :: FilePath -> YiM () Source
Same as openingNewFile
with no action to run after.
Try to write a file in the manner of vi/vim Need to catch any exception to avoid losing bindings
viSafeWriteTo :: Text -> YiM () Source
Try to write to a named file if it doesn't exist. Error out if it does.
fwriteBufferE :: BufferRef -> YiM Bool Source
Write a given buffer to disk if it is associated with a file.
fwriteAllY :: YiM Bool Source
Write all open buffers
Helper functions
setFileName :: BufferRef -> FilePath -> YiM () Source
Associate buffer with file; canonicalize the given path name.
deservesSave :: FBuffer -> YiM Bool Source
Checks if the given buffer deserves a save: whether it's a file buffer and whether it's pointing at a file rather than a directory.
Configuration
preSaveHooks :: Field [Action] Source