Sat Apr 24 21:04:01 CEST 2010 mjga...@gmail.com * Vim support for :!, :make and :only. This patch adds common Vim commands: :only - which is the same as CTRL-W o (close other windows.) :make, :! - which run make or shell command with parameters given in command line.
Sat Apr 24 22:04:53 CEST 2010 mjga...@gmail.com * Changed style of importing keywords in Haskell, GNUMake, Python, Perl to importStyle.
-- Yi development mailing list yi-devel@googlegroups.com http://groups.google.com/group/yi-devel
New patches: [Vim support for :!, :make and :only. mjga...@gmail.com**20100424190401 Ignore-this: c8e94e324b2590e3deffd30764d795fd This patch adds common Vim commands: :only - which is the same as CTRL-W o (close other windows.) :make, :! - which run make or shell command with parameters given in command line. ] hunk ./src/Yi/Command.hs 41 strFun = withBuffer . putA identA . Left ---------------------------- --- | shell-command +-- | shell-command with argument prompt shellCommandE :: YiM () shellCommandE = do hunk ./src/Yi/Command.hs 44 - withMinibufferFree "Shell command:" $ \cmd -> do + withMinibufferFree "Shell command:" shellCommandV + +---------------------------- +-- | shell-command with a known argument +shellCommandV :: String -> YiM () +shellCommandV cmd = do (cmdOut,cmdErr,exitCode) <- liftIO $ runShellCommand cmd case exitCode of ExitSuccess -> withEditor $ newBufferE (Left "Shell Command Output") (R.fromString cmdOut) >> return () hunk ./src/Yi/Keymap/Vim.hs 64 import Control.Arrow hiding (left, right) import {-# source #-} Yi.Boot -import Yi.Command (cabalRun) +import Yi.Command (cabalRun, makeBuild, shellCommandV) import Yi.Core import Yi.Dired import Yi.Eval (execEditorAction, getAllNamesInScope) hunk ./src/Yi/Keymap/Vim.hs 1520 fn "u" = withBuffer' undoB fn "undo" = withBuffer' undoB + fn "only" = withEditor closeOtherE fn "red" = withBuffer' redoB fn "redo" = withBuffer' redoB hunk ./src/Yi/Keymap/Vim.hs 1533 fn "stop" = suspendEditor fn ('c':'a':'b':'a':'l':' ':s) = cabalRun s1 (const $ return ()) (CommandArguments $ words $ drop 1 s2) where (s1, s2) = break (==' ') s + fn "make" = makeBuild $ CommandArguments [] + fn ('m':'a':'k':'e':' ':s) = makeBuild (CommandArguments $ words s) + fn ('!':s) = shellCommandV s fn ('y':'i':' ':s) = execEditorAction $ dropSpace s fn "hoogle-word" = hoogle >> return () [Changed style of importing keywords in Haskell, GNUMake, Python, Perl to importStyle. mjga...@gmail.com**20100424200453 Ignore-this: 3f02865a68a21da429b36d1a03705952 ] hunk ./src/Yi/Lexer/GNUMake.x 35 $varChar = $printable # [\: \# \= \ \{ \} \( \)] @directives = - include + include | if | export | unexport hunk ./src/Yi/Lexer/GNUMake.x 71 -- One preceeded by a "-" -- Another not preceeded by a "-" \-?"include" - { m (const IncludeDirective) Style.keywordStyle } + { m (const IncludeDirective) Style.importStyle } -- A variable expansion outside of a prerequisite can occur in three different forms. -- Inside a prerequisite they can occur in four different forms. hunk ./src/Yi/Lexer/Haskell.x 178 tokenToStyle :: Token -> StyleName tokenToStyle tok = case tok of - CppDirective -> preprocessorStyle - Number -> numberStyle - CharTok -> stringStyle - StringTok -> stringStyle - VarIdent -> variableStyle - ConsIdent -> typeStyle - ReservedOp _ -> operatorStyle - Reserved _ -> keywordStyle - Special _ -> defaultStyle - ConsOperator _ -> operatorStyle - Operator _ -> operatorStyle - Comment _ -> commentStyle - THQuote -> quoteStyle - Unrecognized -> errorStyle + CppDirective -> preprocessorStyle + Number -> numberStyle + CharTok -> stringStyle + StringTok -> stringStyle + VarIdent -> variableStyle + ConsIdent -> typeStyle + ReservedOp _ -> operatorStyle + Reserved Import -> importStyle + Reserved Qualified -> importStyle + Reserved _ -> keywordStyle + Special _ -> defaultStyle + ConsOperator _ -> operatorStyle + Operator _ -> operatorStyle + Comment _ -> commentStyle + THQuote -> quoteStyle + Unrecognized -> errorStyle tokenToText :: Token -> Maybe String tokenToText (ReservedOp BackSlash) = Just "λ" hunk ./src/Yi/Lexer/Perl.x 40 $idchar = [$alpha $ascdigit] $nl = [\n\r] +...@importid = + use + | require + @reservedId = if | while hunk ./src/Yi/Lexer/Perl.x 63 | else | sub | package - | use - | require | our | my | defined hunk ./src/Yi/Lexer/Perl.x 146 [^smqrty]^"#"[^\n]* { c commentStyle } ^"#"[^\n]* { c commentStyle } - @seperator @reservedId / @seperator { c keywordStyle } - ^ @reservedId / @seperator { c keywordStyle } + @seperator @reservedId / @seperator { c importStyle } + @seperator @importId / @seperator { c keywordStyle } + ^ @reservedId / @seperator { c importStyle } + ^ @importId / @seperator { c keywordStyle } @varTypeOp { m (\s -> HlInVariable 0 s) (const $ withFg darkcyan) } hunk ./src/Yi/Lexer/Python.x 50 | None | True +...@importst = import + @reservedid = @builtins | and hunk ./src/Yi/Lexer/Python.x 71 | from | global | if - | import | in | is | lambda hunk ./src/Yi/Lexer/Python.x 132 $special { c defaultStyle } + @importst { c importStyle } + @reservedid { c keywordStyle } @varid { c defaultStyle } Context: [Update C lexer for special comments (e.g. "/**") jeffwhee...@gmail.com**20100423061210 Ignore-this: 281958beb016887d106e1697e1ac5333 I suspect there's a better way to do thos. What is it? ] [added my config file to Users anders...@gmail.com**20100422194545 Ignore-this: 79eddfaf6526c4158084aeaf44bb8d80 ] [Export some CUA functions and fix Gtk imports issue Hamish Mackenzie <hamish.k.macken...@googlemail.com>**20100412063404 Ignore-this: ca47d5d9e15e04b98b40d2f0075529db ] [More progress on Yi.UI.Pango.Control Hamish Mackenzie <hamish.k.macken...@googlemail.com>**20100404103555 Ignore-this: 212c8aec438a6a0742f2690242f352a4 ] [IReader.hs: switch M-Del to M-0 gwe...@gmail.com**20100325154110 Ignore-this: 8a220d97977e5db509d7b6b344611ea M-Del doesn't work with urxvt, it seems, and I am doubtful it works in general. But M-0 will work or fail with the other bindings. ] [Cleanup syntax files jeffwhee...@gmail.com**20100326043211 Ignore-this: 714d6df1f570a4de23fb052b04e93944 ] [Significant cleanup, -Wall to Yi.Syntax.Tree jeffwhee...@gmail.com**20100325075221 Ignore-this: a106e842ae56b004edab83cf7dea5f0f ] [Cleanup Yi.Syntax.Tree (replace local function with Control.Arrow's `first`) jeffwhee...@gmail.com**20100325063218 Ignore-this: 1819a1e305d5d52b0fef28b048141dfb ] [Fix documentation formatting (remove broken linkification) jeffwhee...@gmail.com**20100325063013 Ignore-this: 7bcc3f61408f4c6df696f76445aaeee3 ] [-Wall (RecursiveDo -> DoRec, requires 6.12) jeffwhee...@gmail.com**20100325053035 Ignore-this: 36c0c99feadf155016ce86219f5f5580 ] [Display errors in configuration in both cold boot and reload jeffwhee...@gmail.com**20100325031845 Ignore-this: 11b26dd4e1ab79736610723afe8b2cb0 ] [TAG 0.6.2.2 jeffwhee...@gmail.com**20100324171312 Ignore-this: 729a069566b7090ea9de3d2a9038f4c7 ] Patch bundle hash: 5f9a33bb7ecc23a3fa142fabaf1d77cb6d5e57aa