Liviu
Liviu

Reputation: 605

I would need some hints with F# interactive usability

Now in VS2013 and F#3.1.1, I noticed that it is a bit cumbersome to send code to F# interactive.

There are separate menus for but no keyboard shortcuts for

In the editor window, there is no "send whole file" to f# interactive. You have to select it all, right click and send.

It feels very unpolished. Are any faster ways of doing this? What are your IDE workflows?

As I am righting these questions, i think about maybe using shellplus powershell integration for invoking this...

Upvotes: 2

Views: 266

Answers (2)

latkin
latkin

Reputation: 16792

For sending references, yes, you have to right-click on the individual reference or the references node and click "Send reference to FSI." Not perfect if you prefer keyboard shortcuts, but much improved from VS 2012 when you had no choice but to type out a full #r statement every time...

For sending code, Alt+Enter is the easiest/most popular shortcut. Highlight the code you want to execute (using either mouse or keyboard), then hit Alt+Enter. To send the entire file, just use select-all (Ctrl+A) to highlight everything.

Upvotes: 3

Kit
Kit

Reputation: 2136

Just in case it helps: you can right click on any reference in the Solution Explorer and do 'Send reference to interactive' - or you can right click on the References node and send them all to interactive.

You can also do this in your source:

#r @"c:\mycode\myassembly.dll"

...and you can surround that with #if interactive to stop it messing up your compiles.

#if INTERACTIVE
#r @"c:\temp\myassembly.dll"
#endif

Finally you might also want to look at script files (.fsx) - googling for "f# script files" produces some useful references.

Upvotes: 4

Related Questions