Sat Apr 24 22:04:53 CEST 2010 [email protected]
* Changed style of importing keywords in Haskell, GNUMake, Python,
Perl to importStyle.
Sun Apr 25 12:35:43 CEST 2010 [email protected]
* Add withReverse style function alike to withFg, withBg, withBd.
This is another tiny patch to "catch up" with Vim functionality.
New patches:
[Vim support for :!, :make and :only.
[email protected]**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.
[email protected]**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 }
[Add withReverse style function alike to withFg, withBg, withBd.
[email protected]**20100425103543
Ignore-this: 899152334bdbb4757646646d6d31943
This is another tiny patch to "catch up" with Vim functionality.
] hunk ./src/Yi/Style.hs 91
withItlc c = Endo $ \s -> s { italic = c }
-- | A style that sets the style to underlined
withUnderline c = Endo $ \s -> s { underline = c }
+-- | A style that sets the style to underlined
+withReverse c = Endo $ \s -> s { reverseAttr = c }
-- | The identity transform.
defaultStyle :: StyleName
Context:
[Update C lexer for special comments (e.g. "/**")
[email protected]**20100423061210
Ignore-this: 281958beb016887d106e1697e1ac5333
I suspect there's a better way to do thos. What is it?
]
[added my config file to Users
[email protected]**20100422194545
Ignore-this: 79eddfaf6526c4158084aeaf44bb8d80
]
[Export some CUA functions and fix Gtk imports issue
Hamish Mackenzie <[email protected]>**20100412063404
Ignore-this: ca47d5d9e15e04b98b40d2f0075529db
]
[More progress on Yi.UI.Pango.Control
Hamish Mackenzie <[email protected]>**20100404103555
Ignore-this: 212c8aec438a6a0742f2690242f352a4
]
[IReader.hs: switch M-Del to M-0
[email protected]**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
[email protected]**20100326043211
Ignore-this: 714d6df1f570a4de23fb052b04e93944
]
[Significant cleanup, -Wall to Yi.Syntax.Tree
[email protected]**20100325075221
Ignore-this: a106e842ae56b004edab83cf7dea5f0f
]
[Cleanup Yi.Syntax.Tree (replace local function with Control.Arrow's
`first`)
[email protected]**20100325063218
Ignore-this: 1819a1e305d5d52b0fef28b048141dfb
]
[Fix documentation formatting (remove broken linkification)
[email protected]**20100325063013
Ignore-this: 7bcc3f61408f4c6df696f76445aaeee3
]
[-Wall (RecursiveDo -> DoRec, requires 6.12)
[email protected]**20100325053035
Ignore-this: 36c0c99feadf155016ce86219f5f5580
]
[Display errors in configuration in both cold boot and reload
[email protected]**20100325031845
Ignore-this: 11b26dd4e1ab79736610723afe8b2cb0
]
[TAG 0.6.2.2
[email protected]**20100324171312
Ignore-this: 729a069566b7090ea9de3d2a9038f4c7
]
Patch bundle hash:
6993b8b354b99cd7fcef5cc9849dec1165a14a28
--
Yi development mailing list
[email protected]
http://groups.google.com/group/yi-devel