you must check fsintellisense..I think it's exactly what you need: ""F# IntelliSense for various editors in a simple way that should be usable from most of the source code editors on all platforms supported by F# (.NET on Windows, Mono on Linux and Mac). The command line tool can be called by sending source code and commands through standard input. The resulting information (e.g. tool tips, completion and error information) are reported back to through standard console output""

[link:fsxplat.codeplex.com]

By on 10/2/2012 10:24 PM ()

What I've done is make an .fsx script that spins up some of my commonly used functions. Then I have attached an autohotkey script that does the following if you hit CTRL-;:

1. If in REPL, toggle back to most recent app for selecting more stuff or whatever

2. Else, if in VIM, yank selection to clipboard; otherwise CTRL-C

3. Activate REPL by title and dump in clipboard - launch it if it's not running

Not the prettiest thing, but fairly useful when I don't want to use VS's FSI pane or I am aggregating code from various places. Can even quick-run snippets from a browser selection!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
^;::

IfWinExist, FSI REPL
{
  if WinActive("FSI REPL") {
    Send, {Alt Down}{Tab}{Alt Up}
    return
  } else if WinActive("ahk_class GVIM") {
    Send, y
  } else {
    Send, {Control Down}c{Control Up}
  }
  WinActivate, FSI REPL
  SendInput ! ep;;{Return}
} else {
  Run, %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe , <START_DIR>
}

return
By on 3/5/2010 9:35 AM ()

Julian Kay posted an even simpler method.

Add the following to your .vimrc

1
2
    au BufRead,BufNewFile *.fs set filetype=fs
    au BufRead,BufNewFile *.fsx set filetype=fs

Execute an .fsx file with

:!fsi %

By on 8/2/2012 11:28 AM ()

I just tried using this for my video tutorials, and the only downside I see is that you don't get the types printed out with the result as you would in fsi. This isn't a huge deal breaker, and it could even be useful when you only want to see the resulting output of a script.

By on 8/13/2012 7:00 AM ()

Hi,

You could also use Emacs and the F#-mode (it includes coloration, interactive mode, indentation... but limited completion and no Intellisense). Emacs includes the highly configurable viper-mode which emulates all Vi commands and much more.

Laurent.

By on 3/5/2010 9:48 AM ()

I think trying to 'paste into a console' is likely to be the most immediately productive route (and may work pretty well!)

Note also

[link:blogs.msdn.com]

in case it interests you.

(There aren't yet public APIs for 'hosting FSI', but (as you're looking at) with the available source code in the CTP you can see how a number of bits work and possibly hack along those lines yourself as well.)

By on 3/2/2010 11:52 AM ()

Yes, I'm definitely going to check out VsVim when I get a chance.

For what it's worth, the things I miss in VS from working within Vim are mostly the text object motions... quickly navigating and selecting sections, braces, lists, and so on.

By on 3/3/2010 7:35 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper