Juno keyboard shortcuts and source navigation


#1

I’m using JuliaPro 0.6.x with Juno. I’ve noticed that in the REPL in Juno, most standard readline keyboard shortcuts work, but not ctrl-e (end-of-line).

A more serious limitation is that I cannot reliably jump to function definitions within the source browser. ‘Go to declaration/definition’ seems to work for some symbols, but not others.

Any suggestions/ideas would be welcome. Thanks.


#2

Ctrl-E doesn’t work by default because Juno has the Ctrl-J Ctrl-E keybinding to quickly jump to the last used editor. You can disable that by removing the exception in the julia-client settings:

A more serious limitation is that I cannot reliably jump to function definitions within the source browser. ‘Go to declaration/definition’ seems to work for some symbols, but not others.

Juno relies on Julia’s introspection capabilities to give you that information, so you can only jump to methods that are known to Julia, and for that you have to run the relevant code/load the package the code is defined in.


#3

Thanks - those are exactly what I’ve been looking for. After loading the relevant modules, ctrl-j-ctrl-g seems to be working perfectly. I do see that the ‘Go to Declaratoin/Go to Definition’ menu item still doesn’t do anything, but I suspect there’s a settings option to correct that.

Also, is the ‘Whitelisted Keybindings’ option available in Julia 0.6.4/julia-client 0.6.13 or do I need Julia 1.0 and a newer client (I’m not seeing it in my settings options for julia-client)?


#4

I do see that the ‘Go to Declaratoin/Go to Definition’ menu item still doesn’t do anything, but I suspect there’s a settings option to correct that.

Go to Definition should work the same as Ctrl-J Ctrl-G (and does for me), but Go to Declaration doesn’t work:

Yeah, you need to be on julia-client 0.7+ for that option. Those versions of julia-client should work just fine with Julia 0.6.4 though, so you could just try upgrading (don’t forget about ink when doing that).


#5

Thanks for the suggestions and the help! I had to unpin ink and julia-client in order to do the update. For whatever reason, the julia-client update hung (is there a log that shows what the updater is doing?), so I wound up uninstalling and re-installing it. The white-listed shortcuts is now available and all is well in the REPL. ‘Go to definition’ is also working now.

One minor cosmetic oddity I see after the update is that when I launch the REPL from Juno, I get the following messages. Everything seems to run properly though:

INFO: Loading HttpServer methods…

WARNING: Atom.jl: unrecognised message connected.
WARNING: Atom.jl: unrecognised message enableplotpane.


#6

Yeah, there are cases when the updater fails. I hope to fix that soon.

On what version of Atom.jl are you? You should be on v0.6.17.


#7

Apparently not. After editing the REQUIRE file, Pkg.update(“Atom”) went through and all looks good now.

Thanks for all your help!


#8

Ah, right, I forgot you’re using JuliaPro.

Anytime! :slight_smile: