You are here: PSPad forum > English discussion forum > Keyword IntelliSense

Keyword IntelliSense

#1 Keyword IntelliSense

Posted by: clanman | Date: 2023-02-21 09:56 | IP: IP Logged

I have recently tested Notepad++ and found a feature I liked. They called it Function List and it allowed you to add parameters for functions. These parameters would appear once you hit the () of say a COS function. Example COS(). They are apart of auto correct.

Once that was done and the cursor was inside the brackets, a one liner showing the first possible parameter would appear. You can use alt+up/down to see other options if there are more than one.

The downside of the feature was two fold:
1. It only worked with functions and note statements
2. You could not select the parameter and have it entered on the line

Over to PSPad
I was wondering if there was a way to add options to user highlighter 3 and 4 that name keywords from 1 and 2 that they can belong to.

Example:
Keyword 1 might contain get-hotfix and Get-WinEvent
Keyword 3 contains option "-computername. This keyword then has an array of keywords from 1 and 2 that use it and a string describing what it does

If you use say Enter or Tab or whatever when command option is highlighted then that parameter is inserted at the cursor position.

Options: Reply | Quote | Up ^


#2 Re: Keyword IntelliSense

Posted by: pspad | Date: 2023-02-21 13:12 | IP: IP Logged

It looks like code clips (Ctrl+Space) in PSpad.
You can define list of parameters in description

I agree, parameters doesn't appear as hint when you write

Options: Reply | Quote | Up ^


#3 Re: Keyword IntelliSense

Posted by: clanman | Date: 2023-02-23 10:05 | IP: IP Logged

I use code clips extensively and love it. This would be an extension of that.

Options: Reply | Quote | Up ^


#4 Re: Keyword IntelliSense

Posted by: pspad | Date: 2023-02-23 10:19 | IP: IP Logged

Can you describe me possible implementation - PSpad behavior?

Options: Reply | Quote | Up ^


#5 Re: Keyword IntelliSense

Posted by: clanman | Date: 2023-02-24 10:44 | IP: IP Logged

PSPad could use code clips to base intellisence on.

If the current statement exists in code clips with additional options then PSPad could use those options to base its intellisence on. Example below:

Quote:
Code Clip
Get-AppBackgroundTask [-PackageFamilyName <String>] [-IncludeResourceUsage]
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [<-Confirm |
-Debug | -ErrorAction | -ErrorVariable | -InformationAction | -InformationVariable |
-OutBuffer | -OutVariable | -PipelineVariable | -Verbose | -WarningAction |
-WarningVariable <variable nane> | -WhatIf>]

Base on the above, after typing "Get-AppBackgroundTask -", a list of the above parameters would appear and selecting PackageFamilyName, PackageFamilyName <String> would be inserted at the cursor polsition.

The issue with this approach is there is no description of what the parameter does.

The extension of this is to do to do the same as above which tells PSPad what parameters belong to what statements. The keywords could contain a one line descriptions of them and if that exists then display it within the intellisence. Again selecting the parameter would insert it at the current location.

Options: Reply | Quote | Up ^


#6 Re: Keyword IntelliSense

Posted by: pspad | Date: 2023-02-24 10:58 | IP: IP Logged

OK. It means extend code clips of part what will appear after clip is inserted.
I will think about it

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR