-
Notifications
You must be signed in to change notification settings - Fork 511
What new F8 could look like - Client side handling #2060
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
Conversation
That's a bigger problem than it may appear:
Also there was talk about supporting breakpoints when using F8. Currently this wouldn't be too difficult to do, you'd just use the |
In response to 1 and 3, wrapping the script in a dot-sourced script block will address that, and give us the syntax highlighting. . {
if ($true)
{
}
else
{
}
} Number 3 is a valid concern. As for this:
I don’t really think we’ll have the time to work on this, unfortunately. The reason this PR was sent in the first place was to help make PSES do less since today it does so much. With all that said, this PR is less important given the resolution of PowerShell/PowerShellEditorServices#980 . |
Yeah, the fun part of number 3 though is that a not so uncommon key bind is "smart" { that closes brackets for you like an editor would. I use that, and if I try to right click paste (which works the same as this PR basically) the first line becomes
Well yeah, I know. It's not that much effort I don't think, I'll probably take it up after 2.0 is released. |
Unfortunately, I think this is one of those things that will turn into an anti-pattern going forward considering xtermjs and non-Windows does not allow PSRL to handle the Paste action. That means there would be no "safe way" to paste if a keybinding like that is set. That special paste could be remapped to something obviously not Ctrl+V |
I disagree that it's an anti-pattern, either way you don't really need paste as long as F8 works 🤷♂
FWIW you can with terminal-input: // keybindings.json
{
"key": "ctrl+v",
"command": "terminalInput.sendCustomInput",
"args": [ "checkMark" ],
"when": "terminalFocus"
}
// settings.json
"terminal.integrated.commandsToSkipShell": [ "terminalInput.sendCustomInput" ],
"terminalInput.customInputs": { "checkMark": "\u2714" }, # profile.ps1
if ($env:TERM_PROGRAM -eq 'vscode') {
Set-PSReadLineKeyHandler -Chord "$([char]0x2714)" -Function Paste
} |
PR Summary
A little experiment of what F8 could look like if it were handled client side instead of server side.
Why?
Cons
Goals
Support for replacing
$PSScriptRoot
with:PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets.Please mark anything not applicable to this PR
NA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready