[julia-users] Re: Customize REPL autocomplete

2014-10-29 Thread Ivar Nesje
That would be cool! Currently there isn't any hooks you can use for that purpose (I believe), but as most of Julia is written in Julia, it should be a reasonable project to include the required functionality in /base/REPLCompletions.jl

[julia-users] Re: Customize REPL autocomplete

2014-10-29 Thread xiongjieyi
I get it work ^ ^ Haha!! Thank you for your information! First, insert below code in the beginning of "completions" function in /base/REPLCompletions.jl : try if isdefined(Main, :CUSTOM_AUTOCOMPLETION_HOOK)

[julia-users] Re: Customize REPL autocomplete

2014-10-29 Thread Ivar Nesje
Nice. What do people think about adding this functionality to Base? If anyone likes to read code in a gist, rather than in an email, I made a link Regards Ivar kl. 21:07:45 UTC+1 onsdag 29. oktober 2014 skrev xiong...@gmail.com følgende: >

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-29 Thread Elliot Saba
I really like the concept; I can't tell you how many times I've tried to tab-complete dict keys. -E On Wed, Oct 29, 2014 at 1:36 PM, Ivar Nesje wrote: > Nice. What do people think about adding this functionality to Base? > > If anyone likes to read code in a gist, rather than in an email, I made

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-29 Thread Max Suster
+1 On Wednesday, October 29, 2014 9:56:33 PM UTC+1, Elliot Saba wrote: > > I really like the concept; I can't tell you how many times I've tried to > tab-complete dict keys. > -E > > On Wed, Oct 29, 2014 at 1:36 PM, Ivar Nesje > wrote: > >> Nice. What do people think about adding this functional

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
It will be prefect if the Tab can also auto-complete the argument names of a function, like what R did. Actually I have other complaints about REPL: 1. Ctrl+w delected all the line rather than only the last word. It really make me crazy 2. If I push F1 in the REPL in termnal window (it is ru

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread Ivar Nesje
We have different level of experience with key bindings, and we are used to different things. You won't get far with "It really make me crazy" that Julia doesn't work exactly as Matlab or R, but there are definitely still possibilities to change behaviour if you manage to convince the community

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
I see, I should use meta-Backspace instead. And the undocumented shortcut for function arguments is cool! I didn't find that before! Just for fun, I changed my code a little, to show help by function_name?\t, like: julia> sin?\t Base.sin(x) Compute sine of "x", where "x" is in radians julia>

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread Kevin Squire
Actually, you could already do that if you typed the "?" first... Thanks for the enthusiasm, though! Cheers, Kevin On Thu, Oct 30, 2014 at 3:43 AM, wrote: > I see, I should use meta-Backspace instead. And the undocumented shortcut > for function arguments is cool! I didn't find that before!

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
The advantage is you don't need to remove the whole line to check the help information. It could also used to check the information of variable while typing. What's ever, maybe it is nothing more than a toy. Let me work with it for a while first. :) The REPL is written by Julia itself, which i

Re: [julia-users] Re: Customize REPL autocomplete

2014-10-30 Thread xiongjieyi
Maybe a little flaw for the filename auto-completion, that path started with ~ ($HOME) can not be completed.