Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FSI is readonly #126

Closed
haf opened this issue Aug 6, 2016 · 12 comments
Closed

FSI is readonly #126

haf opened this issue Aug 6, 2016 · 12 comments
Labels
enhancement Accepted suggestions that makes existing features better

Comments

@haf
Copy link

haf commented Aug 6, 2016

Install both vim mode and ionide and you cannot use FSI.

Steps to repro

install vscodevim in its latest version.

install ionide in its latest version (-fsharp).

Run command "FSI: Start". Click the FSI to make it focus. For me cursor is now a vertical bar. Press a char, like 'b' for example. It's not output.

Custom editor keybindings:

// Place your key bindings in this file to overwrite the defaults
[
  { "key": "ctrl+c", "command": "extension.vim_esc", "when": "editorTextFocus" },
  { "key": "cmd+b",  "command": "fake.buildDefault" },
  { "key": "cmd+r",  "command": "editor.action.rename", "when": "editorTextFocus" },
  { "key": "cmd+d",  "command": "editor.action.goToDeclaration",
                     "when": "editorTextFocus" },
  { "key": "ctrl+cmd+left", "command": "workbench.action.navigateBack" },
  { "key": "ctrl+cmd+right", "command": "workbench.action.navigateForward" }
]

Workaround

None found.

Expected behaviour

I can type in FSI.

Versions

  • Latest everything, updated everything before filing the issue
@cloudRoutine
Copy link
Member

@haf you'll have to provide more detail. Which Vim extension are you referring to? I just installed this one and it's been working along with FSI without issue.

Perhaps your issue is with the keybindings? If so you can overwrite all of the defaults in your personal settings

@haf
Copy link
Author

haf commented Aug 7, 2016

Added some details. Thanks for looking into it!

@cloudRoutine
Copy link
Member

@haf FSI is readonly, it's always been readonly because @Krzysztof-Cieslak prefers it that way and I haven't taken the time to figure out a good way to implement an interactive version. Before VSCode introduced the integrated terminal there pretty much wasn't any way to have a text input box.

(Maybe we could have made a custom html preview window and done something like using jquery to read the text in an input box and then send that to FSI in another process and render the responses in a pane, but it would have been a mess to implement 😵 )

So even though the integrated terminal is an improvement, you can only configure one particular integrated terminal, but you can open multiple instances of it. There's

    // Bash on Ubuntu (on Windows)
    "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe",

and that's all she wrote 😞

But we should be able to do something about it fairly soon

from Expose integrated terminal extension API #9957

The initial extension API will allow:

  • Creating and optionally naming of a terminal instance
  • Sending commands (text sequences + '\n') to these "owned" terminal instances

They've got more Vim improvements coming up too

@cloudRoutine
Copy link
Member

@haf haf changed the title FSI and Vim mode are incompatible FSI is readonly Aug 7, 2016
@Krzysztof-Cieslak Krzysztof-Cieslak added enhancement Accepted suggestions that makes existing features better question labels Aug 7, 2016
@Krzysztof-Cieslak
Copy link
Member

Yes, FSI is currently readonly. Both by-design and also because of missing APIs for extensions.

Best I can suggest for now (if you really want typing in FSI) is using integrated terminal and starting Interactive in there.

We can probably revisit this issue in next month - additional APIs for sending commands to terminal is planned by Code team for current iteration.

@haf
Copy link
Author

haf commented Aug 7, 2016

Sweet. :) No rush for my sake. Looking forward to hearing more about it.

@haf
Copy link
Author

haf commented Aug 7, 2016

PS; as you've become aware I'm mostly shifting towards Ionide now despite my rough initial steps with it.

@egamma
Copy link

egamma commented Aug 17, 2016

This issue is a duplicate of microsoft/vscode#10451

@Krzysztof-Cieslak
Copy link
Member

@egamma, sorry. I'm bit confused. I don't think it's connected to the issue you've linked.

As I've explained in previous post - FSI Panel right now is read-only by design (we basically use output panel for printing output from F# interactive [which is spawned in background as Node's child process).

We're planning to revisit this implementation when additional API for sending stuff to integrated terminal is available, but it has nothing to do with Vim mode right now :)

@egamma
Copy link

egamma commented Aug 17, 2016

Sorry I've only read the description and not the full discussion.

We have the issue that we cannot distinguish between editor 'types', so when you install the VIM extension it impacts all editors that show up in VS Code. I thought the FSI panel suffers from this as well. Our problem is that in the Debug Console the entry field for expressions is impacted by the VIM extension, but it should not be.

@zgramana
Copy link

FWIW, As of 1.4, running fsharpi in the terminal console in combination with workbench.action.terminal.runSelectedText gets really close. If that command were to append ;; when run, it would be reasonably usable.

@Krzysztof-Cieslak
Copy link
Member

Moved F# Interactive to Terminal API in 2.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Accepted suggestions that makes existing features better
Projects
None yet
Development

No branches or pull requests

5 participants