From 8e17de7240f101bca67e4168ef6e9b215151a962 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 5 Dec 2018 22:06:50 -0800 Subject: [PATCH 01/15] Add ISE compatibility doc --- docs/ise_compatibility.md | 76 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 docs/ise_compatibility.md diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md new file mode 100644 index 0000000000..a8e7592e70 --- /dev/null +++ b/docs/ise_compatibility.md @@ -0,0 +1,76 @@ +# ISE Compatibility + +While the PowerShell extension for VSCode does not seek +100% compatibility/reproduction of features in the PowerShell ISE, +there are features in place to make the VSCode experience more natural +for users of the ISE. + +This document tries to list settings you can configure in VSCode +to make the user experience a bit more familiar compared to the ISE. + +## Key bindings + +- Ctrl+B Interrupt and break debugger — F6 + +## Tab-completion + +To enable more ISE-like tab-completion, add this setting: + +```json +"editor.tabCompletion": "on" +``` + +This is a setting added directly to VSCode (rather than in the extension), +so its behavior is determined by VSCode directly and cannot be changed by the extension. + +## No focus on console when executing + +To keep the focus in the editor when you execute with F8: + +```json +"powershell.integratedConsole.focusConsoleOnExecute": false +``` + +The default is `true` for accessibility purposes. + +## Do not start integrated console on startup + +To stop the integrated console on startup, set: + +```json +"powershell.integratedConsole.showOnStartup": false +``` + +Note that the background PowerShell process will still start, +since that provides intellisense, script analysis, symbol navigation, etc. +But the console will not be shown. + +## Colorscheme + +There are a number of ISE themes available for VSCode +to make the editor look much more like the ISE. + +In the Command Palette (Ctrl+Shift+P) +type `theme` to get `Preferences: Color Theme` and press Enter. +In the drop down list, select `PowerShell ISE`. + +## Open in the ISE + +If, after everything, you want to open a file in the ISE, +you can use Shift+Alt+P. + +## Other resources + +- 4sysops has [a great article](https://4sysops.com/archives/make-visual-studio-code-look-and-behave-like-powershell-ise/) + on configuring VSCode to be more like the ISE. + +## More settings + +If you know of more ways to make VSCode feel more familiar +for ISE users, please contribute to this doc. +If there's a compatibility configuration you're looking for, +but you can't find any way to enable it, +please [open an issue](https://github.com/PowerShell/vscode-powershell/issues/new/choose) +and ask away! + +We are always happy to accept PRs and contributions as well! \ No newline at end of file From e4b3af64bee9d1ff2adaeb3e3b3f326add371e80 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 5 Dec 2018 22:41:02 -0800 Subject: [PATCH 02/15] Add more keybindings, in table form --- docs/ise_compatibility.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index a8e7592e70..eb427b6719 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -10,7 +10,11 @@ to make the user experience a bit more familiar compared to the ISE. ## Key bindings -- Ctrl+B Interrupt and break debugger — F6 +| Function | ISE Binding | VSCode Binding | +| ---------------- | ----------- | -------------- | +| Interrupt and break debugger | Ctrl+B | F6 | +| Execute current line | | F8 | +| List available snippets | | Ctrl+Alt+J | ## Tab-completion From dd272e4f8d3c143429fb0a5d6404dc63635a6cb0 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 5 Dec 2018 22:51:20 -0800 Subject: [PATCH 03/15] Add command explorer --- docs/ise_compatibility.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index eb427b6719..8c1df09499 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -58,6 +58,14 @@ In the Command Palette (Ctrl+Shift+P) type `theme` to get `Preferences: Color Theme` and press Enter. In the drop down list, select `PowerShell ISE`. +## Show-Command + +Thanks to the work of [@corbob](https://github.com/corbob), +the PowerShell extension has its own command explorer. + +In the Command Palette (Ctrl+Shift+P), +enter `PowerShell Command Explorer` and press Enter. + ## Open in the ISE If, after everything, you want to open a file in the ISE, From dd3758786122b44e4be97fe1a2a71abf102eee20 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 5 Dec 2018 22:52:35 -0800 Subject: [PATCH 04/15] Fix unmatched --- docs/ise_compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 8c1df09499..0c54020469 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -64,7 +64,7 @@ Thanks to the work of [@corbob](https://github.com/corbob), the PowerShell extension has its own command explorer. In the Command Palette (Ctrl+Shift+P), -enter `PowerShell Command Explorer` and press Enter. +enter `PowerShell Command Explorer` and press Enter. ## Open in the ISE From 2d6765208dd7cfa947284bd2241a9e7f4b0ec29a Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 5 Dec 2018 22:55:36 -0800 Subject: [PATCH 05/15] Add ISE F8 --- docs/ise_compatibility.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 0c54020469..a3471a5123 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -10,11 +10,11 @@ to make the user experience a bit more familiar compared to the ISE. ## Key bindings -| Function | ISE Binding | VSCode Binding | -| ---------------- | ----------- | -------------- | -| Interrupt and break debugger | Ctrl+B | F6 | -| Execute current line | | F8 | -| List available snippets | | Ctrl+Alt+J | +| Function | ISE Binding | VSCode Binding | +| ---------------- | ----------- | -------------- | +| Interrupt and break debugger | Ctrl+B | F6 | +| Execute current line/highlighted text | F8 | F8 | +| List available snippets | | Ctrl+Alt+J | ## Tab-completion From 7878158250425416a27278cda779fbafc6149f27 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Thu, 6 Dec 2018 00:14:09 -0800 Subject: [PATCH 06/15] Add more bits --- docs/ise_compatibility.md | 36 +++++++++++++++++++++++++++++++++--- docs/troubleshooting.md | 10 ++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index a3471a5123..c8a7d06a65 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -49,21 +49,35 @@ Note that the background PowerShell process will still start, since that provides intellisense, script analysis, symbol navigation, etc. But the console will not be shown. +## Assume files are PowerShell by default + +To make new/untitled files register as PowerShell by default: + +```json +"files.defaultLanguage": "powershell" +``` + ## Colorscheme There are a number of ISE themes available for VSCode to make the editor look much more like the ISE. -In the Command Palette (Ctrl+Shift+P) +In the [Command Palette] type `theme` to get `Preferences: Color Theme` and press Enter. In the drop down list, select `PowerShell ISE`. +You can set this in the settings with: + +```json +"workbench.colorTheme": "PowerShell ISE" +``` + ## Show-Command Thanks to the work of [@corbob](https://github.com/corbob), the PowerShell extension has its own command explorer. -In the Command Palette (Ctrl+Shift+P), +In the [Command Palette] enter `PowerShell Command Explorer` and press Enter. ## Open in the ISE @@ -75,6 +89,9 @@ you can use Shift+Alt+P. - 4sysops has [a great article](https://4sysops.com/archives/make-visual-studio-code-look-and-behave-like-powershell-ise/) on configuring VSCode to be more like the ISE. +- Mike F Robbins has [a great post](https://mikefrobbins.com/2017/08/24/how-to-install-visual-studio-code-and-configure-it-as-a-replacement-for-the-powershell-ise/) on setting up VSCode. +- Learn PowerShell has [an excellent write up](https://www.learnpwsh.com/setup-vs-code-for-powershell/) + on getting VSCode setup for PowerShell. ## More settings @@ -85,4 +102,17 @@ but you can't find any way to enable it, please [open an issue](https://github.com/PowerShell/vscode-powershell/issues/new/choose) and ask away! -We are always happy to accept PRs and contributions as well! \ No newline at end of file +We are always happy to accept PRs and contributions as well! + +## VSCode Tips + +### Command Palette + +F1 OR Ctrl+Shift+P +(Cmd+Shift+P on macOS) + +A handy way of executing commands in VSCode. +See [the VSCode docs](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) +for more details. + +[Command Palette]: #command-palette \ No newline at end of file diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 7256d43592..4e4cdf0f2f 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -16,6 +16,16 @@ Instead syntax highlighting for VSCode, Atom, SublimeText and even GitHub is provided by the [Editor Syntax] repository on GitHub. Please open any [syntax highlighting issues there]. +## VSCode is not working like the ISE + +The PowerShell extension does not aim to perfectly recreate +the experience of the PowerShell ISE. +However, we do want to support compatibility whenever possible +to do so without breaking existing functionality. + +Please also see [the ISE compatibility doc](./ise_compatibility.md) +for ways to configure VSCode to be closer to the ISE. + ## Known Issues in the Extension - Highlighting/completions/command history don't work as I expect in the From 2e379986b9f4dd68c0f2efc44725894b57f660cc Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Thu, 6 Dec 2018 07:09:30 -0800 Subject: [PATCH 07/15] Update docs/ise_compatibility.md Co-Authored-By: rjmholt --- docs/ise_compatibility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index c8a7d06a65..83318c18df 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -1,7 +1,7 @@ # ISE Compatibility While the PowerShell extension for VSCode does not seek -100% compatibility/reproduction of features in the PowerShell ISE, +complete feature parity with the PowerShell ISE, there are features in place to make the VSCode experience more natural for users of the ISE. @@ -115,4 +115,4 @@ A handy way of executing commands in VSCode. See [the VSCode docs](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) for more details. -[Command Palette]: #command-palette \ No newline at end of file +[Command Palette]: #command-palette From 002f3a1db00e6bc7813b2be2acdfdd79f93fb860 Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Thu, 6 Dec 2018 07:09:58 -0800 Subject: [PATCH 08/15] Update docs/ise_compatibility.md Co-Authored-By: rjmholt --- docs/ise_compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 83318c18df..9a3c1c8072 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -57,7 +57,7 @@ To make new/untitled files register as PowerShell by default: "files.defaultLanguage": "powershell" ``` -## Colorscheme +## Color scheme There are a number of ISE themes available for VSCode to make the editor look much more like the ISE. From 51038c7eb3278cb4d23e7aa3555af9461dba28d8 Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Thu, 6 Dec 2018 07:10:54 -0800 Subject: [PATCH 09/15] Update docs/ise_compatibility.md Co-Authored-By: rjmholt --- docs/ise_compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 9a3c1c8072..7b65da2f19 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -45,7 +45,7 @@ To stop the integrated console on startup, set: "powershell.integratedConsole.showOnStartup": false ``` -Note that the background PowerShell process will still start, +**Note:** The background PowerShell process will still start, since that provides intellisense, script analysis, symbol navigation, etc. But the console will not be shown. From c5a1cb0c710c6206819b31dc6eef9982e240d269 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Thu, 6 Dec 2018 07:12:00 -0800 Subject: [PATCH 10/15] Tab completion --- docs/ise_compatibility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 7b65da2f19..4369e5489b 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -16,9 +16,9 @@ to make the user experience a bit more familiar compared to the ISE. | Execute current line/highlighted text | F8 | F8 | | List available snippets | | Ctrl+Alt+J | -## Tab-completion +## Tab completion -To enable more ISE-like tab-completion, add this setting: +To enable more ISE-like tab completion, add this setting: ```json "editor.tabCompletion": "on" From fce17ac5d05614e48c17e67f213a9e1afc330f6c Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 12 Dec 2018 10:00:48 -0800 Subject: [PATCH 11/15] Add ISE keybinding for snippets --- docs/ise_compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 4369e5489b..7baf9c353f 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -14,7 +14,7 @@ to make the user experience a bit more familiar compared to the ISE. | ---------------- | ----------- | -------------- | | Interrupt and break debugger | Ctrl+B | F6 | | Execute current line/highlighted text | F8 | F8 | -| List available snippets | | Ctrl+Alt+J | +| List available snippets | Ctrl+J | Ctrl+Alt+J | ## Tab completion From 335959138a9794a8eea9eb0a28a6124f7dc3c45e Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 12 Dec 2018 10:05:58 -0800 Subject: [PATCH 12/15] Change command explorer wording --- docs/ise_compatibility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 7baf9c353f..5d44aac166 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -72,10 +72,10 @@ You can set this in the settings with: "workbench.colorTheme": "PowerShell ISE" ``` -## Show-Command +## PowerShell Command Explorer Thanks to the work of [@corbob](https://github.com/corbob), -the PowerShell extension has its own command explorer. +the PowerShell extension has the beginnings of its own command explorer. In the [Command Palette] enter `PowerShell Command Explorer` and press Enter. From 7c45e96679298a3c5f77d73fe418631125690bc9 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 12 Dec 2018 10:12:43 -0800 Subject: [PATCH 13/15] Add UI remark to troubleshooting doc --- docs/troubleshooting.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 4e4cdf0f2f..1447447948 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -23,6 +23,11 @@ the experience of the PowerShell ISE. However, we do want to support compatibility whenever possible to do so without breaking existing functionality. +Bear in mind that many of the UI/UX aspects of VSCode are driven by +VSCode itself and can't be changed by the extension. +The VSCode maintainers are quite reasonable though, +and you can ask for new features [in their repository](https://github.com/Microsoft/vscode). + Please also see [the ISE compatibility doc](./ise_compatibility.md) for ways to configure VSCode to be closer to the ISE. From f24529cca6c00eb2cfbe0ad768a0c618ea4db180 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 12 Dec 2018 10:26:08 -0800 Subject: [PATCH 14/15] Add custom keybinding note --- docs/ise_compatibility.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/ise_compatibility.md b/docs/ise_compatibility.md index 5d44aac166..67ad6fd973 100644 --- a/docs/ise_compatibility.md +++ b/docs/ise_compatibility.md @@ -16,6 +16,11 @@ to make the user experience a bit more familiar compared to the ISE. | Execute current line/highlighted text | F8 | F8 | | List available snippets | Ctrl+J | Ctrl+Alt+J | +### Custom Keybindings + +You can [configure your own keybindings](https://code.visualstudio.com/docs/getstarted/keybindings#_custom-keybindings-for-refactorings) +in VSCode as well. + ## Tab completion To enable more ISE-like tab completion, add this setting: @@ -82,14 +87,14 @@ enter `PowerShell Command Explorer` and press Enter. ## Open in the ISE -If, after everything, you want to open a file in the ISE, +If you end up wanting to open a file in the ISE anyway, you can use Shift+Alt+P. ## Other resources - 4sysops has [a great article](https://4sysops.com/archives/make-visual-studio-code-look-and-behave-like-powershell-ise/) on configuring VSCode to be more like the ISE. -- Mike F Robbins has [a great post](https://mikefrobbins.com/2017/08/24/how-to-install-visual-studio-code-and-configure-it-as-a-replacement-for-the-powershell-ise/) on setting up VSCode. +- Mike F Robbins has [a really good post](https://mikefrobbins.com/2017/08/24/how-to-install-visual-studio-code-and-configure-it-as-a-replacement-for-the-powershell-ise/) on setting up VSCode. - Learn PowerShell has [an excellent write up](https://www.learnpwsh.com/setup-vs-code-for-powershell/) on getting VSCode setup for PowerShell. From 8efca90ad54dc667b53eb0135c9acbbd62177df3 Mon Sep 17 00:00:00 2001 From: Robert Holt Date: Wed, 12 Dec 2018 10:29:37 -0800 Subject: [PATCH 15/15] Minor edit --- docs/troubleshooting.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 1447447948..b5a50ff2c5 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -23,13 +23,14 @@ the experience of the PowerShell ISE. However, we do want to support compatibility whenever possible to do so without breaking existing functionality. +Please see [the ISE compatibility doc](./ise_compatibility.md) +for ways to configure VSCode to be closer to the ISE. + Bear in mind that many of the UI/UX aspects of VSCode are driven by VSCode itself and can't be changed by the extension. The VSCode maintainers are quite reasonable though, and you can ask for new features [in their repository](https://github.com/Microsoft/vscode). -Please also see [the ISE compatibility doc](./ise_compatibility.md) -for ways to configure VSCode to be closer to the ISE. ## Known Issues in the Extension