Re: [julia-users] Sublime-IJulia Official Debut

2014-02-07 Thread Jacob Quinn
Ok, I just pushed changes for this. The behavior, as now noted in the 
README is:

 Using Sublime-IJulia

 * Commands can be entered directly in the IJulia console view, pressing 
 `shift+enter` to execute. 

 * A newline can be entered without executing the command by typing `Enter` 
 for multi-line commands.

 * Pressing the `up` and `down` arrows in the console view will navigate 
 through command history (if any).

 * `escape` will clear the current command

 * All other regular sublime features should work as normal also in the 
 console view (multiple cursors, macros, etc.)



 From a julia file (extension .jl), you also have the ability to send 
 code to the console to be evaluated. 

 * `Shift+enter` without any code selected will send the current line to 
 the console to be executed

 * `Shift+enter` with code selected will send the selected text to the 
 console to be executed

 * `Ctrl+shift+enter` will send the entire file's contents to the console 
 to be executed


 
-Jacob




On Friday, February 7, 2014 1:20:31 AM UTC-5, Ismael VC wrote:

 I forgot to say CTRL+ENTER  for new line below, is the single most useful 
 and used command for me in all SublimeText.

 Wouldn't it be better to use SHIFT+ENTER, to run the cell, (as oposed to 
 ENTER)
 and  just ENTER for next line , (as oposed to CTRL+ENTER)

 as it is the way IJulia qtconsole works for now, I would apreciate the 
 consistency, besides, I dont see SHIFT+ENTER doing anything in SublimeText, 
 please consider the CTRL+ENTER shortcut override, thanks!

 Ismael VC



Re: [julia-users] Sublime-IJulia Official Debut

2014-02-07 Thread Ismael VC
That's great Jacob!

Ok maybe The more usefull command is debatable, but at least for me it is 
the most used shortcut, I so much hate to do END and then ENTER to go to a 
new line if the cursor is inside brackets/braces/parens, and not at the end 
of the line to just do ENTER.

Since I haven't coded for that long, I am barely getting used to typing 
symbols in my keyboard, that I had never used, before learning to programm. 
But I guess in the end it's a matter of muscle memory.

Ismael VC


Re: [julia-users] Sublime-IJulia Official Debut

2014-02-07 Thread Steven G. Johnson
It looks like Gadfly does not currently support writemime to any image 
backend:


https://github.com/dcjones/Gadfly.jl/blob/5554d3a1bcdc5fc6852cc8f1e469dd3a0f65f220/src/Gadfly.jl#L726-L744

But image/png writemime output be easy to add (maybe file an issue?) since 
Gadfly already supports export to PNG images via Cairo.   (The disconnect 
here is partly due to the fact that the writemime stuff was bolted on 
afterwards.)  For example, I think you can do:

p = plot(x=[1:10], y=rand(10), Geom.point)
draw(PNG(4inch,3inch), p)

Or you can use PyPlot.

On Friday, February 7, 2014 11:58:21 AM UTC-5, Jacob Quinn wrote:

 Steven,

 Thanks for the reply, I'd definitely like to get something working for 
 plots. I just did a quick test, but I wasn't able to see an image/png tag 
 in display_data when I ran the following:

 using Gadfly
 plot(x=[1:10], y=[1:10], Geom.point)



Re: [julia-users] Sublime-IJulia Official Debut

2014-02-06 Thread Ismael VC
Wow! Jacob I love it!

I just noticed that in:

ipython qtconsole --profile=julia

ENTER just goes to the next line until you run the cell code with 
SHIFT+ENTER.

But in Sublime-IJulia you use CTRL+ENTER to go to the next line, and ENTER 
to run the cell code, not to mention I lose the CTRL+ENTER functionality 
in Sublime (New line below) in all .jl files!

Whereas in:

ipython console --profile=julia

multiline statements don't work at all.

In the IJulia notebook, the cells work the same as in IPython notebook 
(CTRL+ENTER, SHIFT+ENTER).




Re: [julia-users] Sublime-IJulia Official Debut

2014-02-06 Thread Ismael VC
I forgot to say CTRL+ENTER  for new line below, is the single most useful 
and used command for me in all SublimeText.

Wouldn't it be better to use SHIFT+ENTER, to run the cell, (as oposed to 
ENTER)
and  just ENTER for next line , (as oposed to CTRL+ENTER)

as it is the way IJulia qtconsole works for now, I would apreciate the 
consistency, besides, I dont see SHIFT+ENTER doing anything in SublimeText, 
please consider the CTRL+ENTER shortcut override, thanks!

Ismael VC