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

Feature Suggestion: Cmdlet Help in Editor Right-Click menu #884

Open
mmarchese opened this issue Jun 15, 2017 · 9 comments
Open

Feature Suggestion: Cmdlet Help in Editor Right-Click menu #884

mmarchese opened this issue Jun 15, 2017 · 9 comments
Labels
Area-UI Issue-Enhancement A feature request (enhancement). Up for Grabs Will shepherd PRs.

Comments

@mmarchese
Copy link

Sometimes while editing in a PowerShell file I need to access Help about a cmdlet quickly. It would be nice if we could right click on a particular cmdlet and access its help file from the drop down list.

Perhaps have a submenu allowing for the help to be shown in the integrated console, show window or online as well?

@daviwil
Copy link
Contributor

daviwil commented Jun 15, 2017

Hey Matt, we do have one way of getting help right now, you can run the "PowerShell: Get Online Help for Command" command which will send you to the online help for the cmdlet under the cursor (bound to Ctrl+F1 by default). Agreed, though, would be nice to add this to the right-click menu too.

@daviwil daviwil added Area-Language Server Issue-Enhancement A feature request (enhancement). labels Jun 15, 2017
@daviwil daviwil added this to the Future milestone Jun 15, 2017
@daviwil daviwil added the Up for Grabs Will shepherd PRs. label Jun 15, 2017
@mmarchese
Copy link
Author

Good tip! Thanks!

@corbob
Copy link
Contributor

corbob commented Jun 29, 2018

I've created a PR that I think resolves this, but it feels too simple for how long this has been opened...

TylerLeonhardt pushed a commit that referenced this issue Jul 2, 2018
rjmholt pushed a commit that referenced this issue Jul 11, 2018
@corbob
Copy link
Contributor

corbob commented Jul 12, 2018

@mmarchese how valuable is the ShowWindow portion of this request? Being an electron application, when you launch Get-Help with -ShowWindow, the window often times appears behind the VS Code window. It is my understanding that there is nothing that we can do to resolve that behavior 😞.

I have modified the ShowOnlineHelp call to do -ShowWindow instead of -Online and have found that the experience is very poor (particularly if you have other PowerShell windows open as you won't necessarily see that there's a new one). That being said, it's a simple enough add if it's desired I could look at implementing it more fully.

@mmarchese
Copy link
Author

I've also noticed that windows pop up behind the VS Code window. I've learned to deal with it (especially while using Multi Factor Auth with Office 365 connections) but it is rather annoying. I would say that popping up the Online version would be a better solution if that is possible since that can take focus immediately. Some cmdlets don't have proper links though (or help needs to be updated). If they don't have a proper link perhaps populating the help info into a terminal or the output pane would be preferable rather than having to look for a window behind VS Code.

Hopefully, they will fix this some day soon.

Do you know if there is an issue in the VS Code repo that I can upvote?

@corbob
Copy link
Contributor

corbob commented Jul 12, 2018

I like the idea of if there is no help link to output somewhere else. I'm not sure how to get ti to the console, but it is something I'm interested in investigating, I have some code that will check for a related links section which I think is that would tell us if there's an online help for it.

Regarding an issue, I'm not sure if there's an issue for it in the VS Code repo, it's more an issue with Electron itself (same issue if you use Hyper.js for your terminal, anything that shows a window will be behind he terminal).

@corbob
Copy link
Contributor

corbob commented Jul 12, 2018

With regards to adding it as another submenu I don't think that's currently possible. There appears to be a Feature Request for it in the vscode repo here: microsoft/vscode#9827

If we're comfortable with the Ctrl+F1 going online if it's available and defaulting to -full if it's not then I think I can code that up. If we want them as separate commands, that's still doable, will just take more investigation to avoid duplicating code (doesn't make sense to me to have two call backs to PSES for effectively the same thing).

@dragonwolf83
Copy link

dragonwolf83 commented Jul 13, 2018

It makes more sense to recreate -ShowWindow functionality by using available UI within VS Code. I think it is possible to have it output into a split tab within a WebView or PreviewHtml view. That keeps to the spirit and allows you to see script, help, and console all together. Also makes it easy to have multiple tab help windows open if needed.

In the future, this a good setup for for when PS Core starts rendering help in MarkDown.

@mmarchese
Copy link
Author

mmarchese commented Jul 13, 2018

It would be nice to have a side by side view of the help next to the code if that were possible. Especially now that you can have up to 4 separate panes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UI Issue-Enhancement A feature request (enhancement). Up for Grabs Will shepherd PRs.
Projects
None yet
Development

No branches or pull requests

6 participants