PowerShell Studio Wishlist

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
Locked
User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

PowerShell Studio Wishlist

Post by Bosparan » Tue Sep 03, 2013 5:55 am

Hello,

I've now been using PowerShell Studio 2012 for some time and have compiled a list of features I'd appreciate to have (if some of them already exist and I simply haven't noticed them, please tell me).

Disable autocomplete selectively
I'd really like to be able to disable the auto-complete function only for variables. Writing...
PowerShell Code
Double-click the code block to select all.
foreach ($item in $items)
...is a bit annoying with autocomplete on. Without ... I don't benefit from auto-complete in all the other aspects where it speeds up my work.

Improved support for "{" and "}"
I'm doing a lot of big code stuff. Not necessarily more complex, but certainly more text than most other people I know. Thus I create many functions. And plenty of loops. Tons of them, really. And each time I open such with a "{", I have to manually close it again. Now how awesome would it be, if instead, whenever I type a "{", I'd get a closed "}" to the right of my cursor as well, like this (assume "|" to be the cursor):
PowerShell Code
Double-click the code block to select all.
{|}
even better, should I press enter in this state, the code expands like this:
PowerShell Code
Double-click the code block to select all.
{
    |
}
I simply am tired of doing all this manually, navigating clumsily through the lines, minding the indentation.

loop navigation
When navigating through a loop with my keyboard, I'd really like it if the cursor could move along into the loop automatically, instead of remaining in tab-land like this:
PowerShell Code
Double-click the code block to select all.
{
|   Write-Host "Hello World"
}
Only manually navigating into tab-land should cause me to enter it.

insert complex function comment
I'd like to have a key combination that auto-inserts a complex documentation into my function, fitting it to the parameters taken and the returns created:
PowerShell Code
Double-click the code block to select all.
function Set-Example
{
    <#
        .SYNOPSIS
            Insert Synopsis here
        
        .DESCRIPTION
            Insert Description here

        .PARAMETER param
            Describe parameter
... ... ...
    #>
}
Primal-Sense on project functions
In a project, I only get primal sense for functions and parameters in the active script file. I'd like having it for all files that have been imported at the line I am typing:
PowerShell Code
Double-click the code block to select all.
Import-Module .\Test.ps1

Get-Testfu # <-- Get Primal sense here for function in Test.ps1
Furthermore, I'd appreciate being able to add additional scripts to the Function Explorer (each with its own Functions sub-folder, not all massed into a single one).

And 'that's all' I can think of right now. Each of those feature is - on my list - a 'nice to have'-feature, so not getting it is not going to break my heart, but I won't pretend getting some isn't going to make me happy (more importantly from your perspective: It's more likely to make me recommend to upgrade to the next version, should it finally come along someday. Can't say much on how the odds are right now though, since I don't know what features you're already planning on adding to it anyway).

So, that were my 2 cent (plus change).
Cheers

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: PowerShell Studio Wishlist

Post by davidc » Tue Sep 03, 2013 9:21 am

Thank you, we appreciate user feedback!

Disable Autocomplete selectively
We do not have this option but if you enable "AutoComplete Requires Exact Match" in the Options->Editor, it will not select the variable unless you type it out or click on the PrimalSense.
Or instances like this you can press ESC to cancel out of the PrimalSense so it doesn't overriding your typing.


Improved support for "{" and "}"

Here is where snippets will help. You can create a custom snippet that inserts the matching brackets or use the preexisting snippets made for loops and functions.

loop navigation

I'm not quite clear what you are asking here. If you down arrow it always stays in the same column. This is typical behavior for all editors.

insert complex function comment
Again snippets :) Look at the advance function snippet.

Primal-Sense on project functions
We are looking at Dot Sourcing support for PrimalSense in vNext. In your sample it looks like you are importing a ps1 file as a module instead of dot sourcing the file directly. Is there a particular reason why you use this method?

David
David
SAPIEN Technologies, Inc.

User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

Re: PowerShell Studio Wishlist

Post by Bosparan » Wed Sep 04, 2013 2:29 am

Hello David,

Disable Autocomplete selectively
Just tested the "Exact Match" option, but really, I fail to notice the difference to disabling auto-complete. If I have to type it in full anyway, there's not much to complete, is there? The thing is: I really like autocomplete for most things, except where variables are concerned.

Improved support for "{" and "}"
I have no problem creating the things, I'm concerned with optimizing the process for speed. As it is, in order to establish a loop I press these keys:
"{", "Enter", Enter" "}", "up", "right"
What I'd like to have is:
"{", "Enter"
Especially as using arrow keys means I have to move my right hand.
It would be a fairly marginal improvement for a single operation, but scaled up to thousands of loops ...

Loop Navigation
This is typical behavior for all editors.
Yes, but I'm not concerned with typical, I'm concerned with optimizing my coding time. Tabs (or indents) are reading aids for code, so it's ordered and I know in what loop, without needing to figure it out every time.
Code is however always on the right side of the tabs, so why have me stray into tab-space unless I absolutely insist?

insert complex function comment
Snippets are dumb: They simply insert a fixed code-snippet (unless I missed something). Yours are less dumb than many, in that they prompt which parameters to set (I appreciate them and use them a lot. Created a whole library of my own, in fact).
What I seek is a function that automatically adds all fields required and leaves out all those not needed. For example if my function accepts three parameters (a, b and c), I'd like to have ".PARAMETER a", ".PARAMETER b" and ".PARAMETER c" automatically added, when I insert complex comments. Especially as my functions evolve over time, I'd like to be able to update it, without loosing previous text: Let's say I add two more parameters (d and e), I'd love to get additional ".PARAMETER d" and ".PARAMETER e" added, without loosing my comments on a, b and c. As it is now, I have to add them manually (which adds up to a lot of time, over the course of a few months).

While we're at it: A comment validator, that checks whether I commented everything properly would be great as well. I'm bound to miss something in a 3000 lines script ...

Primal-Sense on project functions
We are looking at Dot Sourcing support for PrimalSense in vNext.
Looking forward to it

Is there a particular reason why you use this method?
First thing I tried that worked. I don't fix something that works unless I have a reason to. If there's a better way to do it, I'm interested - especially if my way won't support PrimalSense in opposite to your way.
I'd be particularly interested in why something is better or not.


Now as you'll have noticed - as I said myself infact - I don't think any of my wishes is a truly essential feature. PowerShell Studio already covers all the essential needs I'm aware of. So I just listed the things that would make my working with it a bit smoother, and a bit more time efficient.

With best regards and in the hope I clarified all unclear points,
Fred

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: PowerShell Studio Wishlist

Post by davidc » Wed Sep 04, 2013 9:42 am

The purpose of the Exact Match is that it will never autocomplete unless you explicitly select the item in PrimalSense.


As for the function comments, we have something that will help address this in PowerShell Studio 2014 though slightly different manor.

As for the Import-Module, it was a similar case on my end. I was wondering if there was an advantage to your method.
I guess it boils down to personal preference, but personal I wouldn't use the cmdlet unless I'm actually loading a module. I think clarity is important.

Note: I added these requests to the wish list.

Thank you once again, we do appreciate the feedback. It helps us improve the software and user experience.

David
David
SAPIEN Technologies, Inc.

User avatar
dennis.lindqvist
Posts: 41
Joined: Mon Mar 25, 2013 9:15 am

Re: PowerShell Studio Wishlist

Post by dennis.lindqvist » Wed Oct 09, 2013 4:47 am

+1 on Complex Documentation.

I don't even know why the legacy way to add comments are inserted automaticaly for new code scripts.
PowerShell Code
Double-click the code block to select all.
#========================================================================
# Created with: SAPIEN Technologies, Inc., PowerShell Studio 2012 v3.1.24
# Created on:   2013-10-09 12:28
# Created by:   Dennis Lindqvist
# Organization: 
# Filename:     
#========================================================================
Why not use the neat way directly to encourage proper documentation?
PowerShell Code
Double-click the code block to select all.
<#
.NOTES 
  Created with: SAPIEN Technologies, Inc., PowerShell Studio 2012 v3.1.24
  Created on:   2013-10-09 12:28
  Created by:   Dennis Lindqvist
  Organization: 
  Filename: 

.LINK
  http://technet.microsoft.com/en-us/maga ... 00719.aspx
  http://technet.microsoft.com/library/hh847834.aspx

.SYNOPSIS
  The synopsis goes here. This can be one line, or many.

.DESCRIPTION
  The description is usually a longer, more detailed explanation of what the script or function does. Take as many lines as you need.

.PARAMETER parametername1
  Here, the dotted keyword is followed by a single parameter name. Don't precede that with a hyphen. The following lines describe the purpose of the parameter:

.PARAMETER parametername2
  Provide a PARAMETER section for each parameter that your script or function accepts.

.EXAMPLE
  There's no need to number your examples.

.EXAMPLE
  PowerShell will number them for you when it displays your help text to a user.

.INPUTS 
   String 
 
.OUTPUTS 
   None 
#>

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: PowerShell Studio Wishlist

Post by davidc » Wed Oct 09, 2013 9:26 am

Thank you for the suggestion.

Note: You can update the template file located in the following folder:

C:\ProgramData\SAPIEN\PowerShell Studio 2012\Templates\FileTypes\

David
David
SAPIEN Technologies, Inc.

User avatar
dennis.lindqvist
Posts: 41
Joined: Mon Mar 25, 2013 9:15 am

Re: PowerShell Studio Wishlist

Post by dennis.lindqvist » Thu Oct 17, 2013 8:51 am

Lucky then, that most programmers aren't lazy :roll: ;)

User avatar
Bosparan
Posts: 282
Joined: Sun Mar 03, 2013 12:45 pm

Re: PowerShell Studio Wishlist

Post by Bosparan » Wed Oct 30, 2013 2:27 am

Hello,

and another round of wishes draws neigh ;)

Choose "{" preference
I'd love for there to be a way to set a preference on how "{" are placed, which are then applied to all snippets (or other automatisms). As far as I know, there are two philosophies on how "{" are placed:
PowerShell Code
Double-click the code block to select all.
# Example 1:
foreach ($item in $items){
    # Do Something
}

# Example 2:
foreach ($item in $items)
{
    # Do Something
}
Now I'm a fan of version 2, as it places entry and exit of a loop on the same plane (and the usual indent means I don't have anything inbetween to obstruct the view). Interestingly enough, even the official snippets don't always agree which way to use. Wouldn't it be nice if you could select a preference and it'd always do it just that way?

Code cleaner
Another nice thing I'd like to have is a functionality that auto-formats the marked passage of code to conform to common standards (indents, placement of "{" and "}", killing empty spaces at the start/end of line, etc.).
This would make stea- *cough* ... ehm, borrowing code easier and cleaner :)

Primal Sense for ValidateSet-Parameters
If I create a function with a parameter with a clearly defined ValidateSet validation, and later in the code call this function, I'd love for primal sense to propose those options when I specify the parameter. Or in cases of other validation parameters to fade in the validation line.

Indent Level override for String-Blocks
When I build a large text-block like this ...
PowerShell Code
Double-click the code block to select all.
$string = @"
This is a sample text
It has many lines
and is currently bothersome to type
"@
... I'd love for the indentation to stop messing with me. Every time I press enter, it sends me to the code level of indentation, instead of the indentation level of the text-block I'm typing.
It would be great if instead it would either send it to the left border of the editor, or simulate it all being at the proper indentation level while it actually is without indentation in the script file. Example:
PowerShell Code
Double-click the code block to select all.
# Example 1: Override indentation
foreach ($item in $items)
{
    $string = @"
This string was typed
without having to cancel indentation each time
I pressed "enter"
"@
}

# Example 2: Simulate indentation level
foreach ($item in $items)
{
    $string = @"
   |This string was type
   |with all lines indented with a straight line to indicate the left border,
   |It never messed with me while typing, but will still be
   |on the left border when run.
   |Even the closing symbols are shown on this plane but work
   |"@
}
Neat, right?
Even better, imagine being able to collapse those string blocks like you can collapse functions or #regions...

Support for c# codeblocks
Sometimes - alright, fairly often - I code C# in PowerShell Studio, by creating text-blocks I later load with the Add-Type command. I'd love for there to be some support for that without having to type it all in Visual Studio and copy paste afterwards (especially since I don't use it for anything but this and would love to get rid of it). Notable features I'd like to have are:
- Indentation, either independent of the rest of the code or simulated, as in previous feature request.
- Basic syntax validation (Remembering to place ";" is hard, when I never need to do it otherwise)

Turn off Primal Sense highlighting for structure elements
When I type a PowerShell structure element I get Primal Sense proposals, as happens for pretty much else I type. In most cases I very much approve of that, except for said structure elements.
Example:
I type 'Begin' (as part of Begin, Process, End) and Primal Sense will highlight the Cmdlet 'Begin-WebCommitDelay'. My usual workflow (and habit) cause me to press 'Enter' next, to reach the next line, which will instead Complete to Begin-WebCommitDelay (and automatically add an 'Import-Module WebAdminsitration' at the top of the script, which I don't keep an eye on at that moment and thus often forget).
I could 'fix' that by either altering my Workflow (which would be akward, inconsistent with previous code and frankly and I would plain dislike doing) or enabling the option requiring Exact Match (which would deprive me of a lot comfort Primal Sense provides in most other situations). Or I might conceivably convince you to have PowerShell Studio's Primal Sense to recognize such structure elements and deselect the Primal Sense proposal while I have an exact match for one of those elements.

Cheers,
Fred

User avatar
StupidSexyFlanders
Posts: 107
Joined: Sun Nov 27, 2011 9:22 am

Re: PowerShell Studio Wishlist

Post by StupidSexyFlanders » Wed Nov 13, 2013 4:36 pm

I would very much like the ability to customize the coding window color scheme and export them to a file for later sharing.

This is a feature of the native Windows ISE (saving color schemes as 'themes') and I think it's a great feature. The default white background is a tremendous strain on my eyes after a while and, though the colors can be changed via the 'Font Style' button, changing the background to something darker would require hours of tweaking all the other colors to something lighter...only to have to do it all again if I change workstations, have to reinstall, etc.

Also, having fully collaspable code (including if/then and try/catch statements) would be great. This is a feature of PowerGUI and the Windows ISE ;)
Attachments
colors.JPG
The native Windows ISE using the \\\'Green Monochrome\\\' theme
colors.JPG (72.74 KiB) Viewed 7860 times
Mike

Locked