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

Commands documentation #35

Open
50nar opened this issue Jul 3, 2019 · 5 comments
Open

Commands documentation #35

50nar opened this issue Jul 3, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@50nar
Copy link

50nar commented Jul 3, 2019

Is there some sort of documentation explaining how to use this ? How to trigger REPL on/off, how to run current code in shell etc?

Looks like changing powershell.integratedConsole.showOnStartup to false disables entire functionality. Is there a way to disable command shell at the bottom but keep the autocomplete functionality ?

@TylerLeonhardt
Copy link
Collaborator

coc-powershell is still in early days. Apologies for the lack of docs!

The powershell.integratedConsole.showOnStartup issue sounds like a bug. We should track that in a separate issue

@KasonBraley
Copy link

Any chance someone could provide some updates on the basic commands to use with this plugin? Just the basics like how to execute the code in the editor (tried F8 and F5, neither worked), and also how to focus/switch to the integrated terminal.

@aguevara
Copy link

How do you get out of the integrated console and back to your script buffer?

@aguevara
Copy link

aguevara commented Sep 30, 2021

Ignore previous, it was an nvim question; vim manages terminal switching differently. In Neovim see :h terminal-input, you must use <C-\><C-n>.

@MFreeze
Copy link

MFreeze commented Mar 16, 2022

I'm late but you can run the current line in the powershell console with:

:CocCommand powershell.evaluateLine

The selected lines with

:CocCommand powershell.evaluateSelection

You can execute the script with:

:CocComand powershell.execute

If you want to have F5 and f8 to execute code, you just have to map the key in your vimrc

nmap <F5> :CocCommand powershell.evaluateLine<CR>
vmap <F5> :CocCommand powershell.evaluateSelection<CR>
nmap <F8> :CocCommand powershell.execute<CR>

List of commands can be found in path_to_powershell_coc/out/client/extension.js (when searching for registerCommand). You can also get them by using :CocList but I'm not sure if this command is part of another plugin or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants