How do I make Notepad++ my default editor in PowerShell?
In POSH-GIT, a Git add-on for PowerShell, when I issue a 'commit' command, Notepad++ opens for the commit comment, and unlike normal Notepad++ operation, it prompts to save when I exit with Alt-X
.
How do I set this up for whenever I use PowerShell?
By 'default editor', I mean I want to type edit <filename>
, and have Powershell open that file in Notepad++, but with a prompt to save when I close Notepad++, which is not the normal behaviour. Not on mine at least; Notepad++ just caches open files in memory/on disk when it closes.
powershell notepad++
|
show 1 more comment
In POSH-GIT, a Git add-on for PowerShell, when I issue a 'commit' command, Notepad++ opens for the commit comment, and unlike normal Notepad++ operation, it prompts to save when I exit with Alt-X
.
How do I set this up for whenever I use PowerShell?
By 'default editor', I mean I want to type edit <filename>
, and have Powershell open that file in Notepad++, but with a prompt to save when I close Notepad++, which is not the normal behaviour. Not on mine at least; Notepad++ just caches open files in memory/on disk when it closes.
powershell notepad++
PowerShell does not have a default editor. Please clarify what you are actually trying to do.
– DavidPostill♦
Aug 7 '16 at 13:14
Is your question how to associate Notepad++ as the default editor, or how to associate certain commands with auto-execution of that identical sequence (or other sequences?)?
– fixer1234
Aug 8 '16 at 3:01
1
@fixer1234 That is my intention, thank you for your patience with my lack of clarity.
– ProfK
Aug 8 '16 at 4:15
Edit is not an alias by default in Powershell. If you have one you can use Get-Alias to see it's definition and should be able to change it with Set-Alias. As for the prompt when you close Notepadd++, from what I read versions 6.6 and later should automatically save those files periodically. You can change the settings in Settings->Preferences->Backup->Enable session snapshot and periodic backup.
– Mimp
Aug 8 '16 at 17:22
When I close with alt+f4 I don't get the prompt, when I use alt+X I do.
– jiggunjer
Aug 12 '16 at 13:40
|
show 1 more comment
In POSH-GIT, a Git add-on for PowerShell, when I issue a 'commit' command, Notepad++ opens for the commit comment, and unlike normal Notepad++ operation, it prompts to save when I exit with Alt-X
.
How do I set this up for whenever I use PowerShell?
By 'default editor', I mean I want to type edit <filename>
, and have Powershell open that file in Notepad++, but with a prompt to save when I close Notepad++, which is not the normal behaviour. Not on mine at least; Notepad++ just caches open files in memory/on disk when it closes.
powershell notepad++
In POSH-GIT, a Git add-on for PowerShell, when I issue a 'commit' command, Notepad++ opens for the commit comment, and unlike normal Notepad++ operation, it prompts to save when I exit with Alt-X
.
How do I set this up for whenever I use PowerShell?
By 'default editor', I mean I want to type edit <filename>
, and have Powershell open that file in Notepad++, but with a prompt to save when I close Notepad++, which is not the normal behaviour. Not on mine at least; Notepad++ just caches open files in memory/on disk when it closes.
powershell notepad++
powershell notepad++
edited Aug 8 '16 at 4:40
ProfK
asked Aug 7 '16 at 12:52
ProfKProfK
308114698
308114698
PowerShell does not have a default editor. Please clarify what you are actually trying to do.
– DavidPostill♦
Aug 7 '16 at 13:14
Is your question how to associate Notepad++ as the default editor, or how to associate certain commands with auto-execution of that identical sequence (or other sequences?)?
– fixer1234
Aug 8 '16 at 3:01
1
@fixer1234 That is my intention, thank you for your patience with my lack of clarity.
– ProfK
Aug 8 '16 at 4:15
Edit is not an alias by default in Powershell. If you have one you can use Get-Alias to see it's definition and should be able to change it with Set-Alias. As for the prompt when you close Notepadd++, from what I read versions 6.6 and later should automatically save those files periodically. You can change the settings in Settings->Preferences->Backup->Enable session snapshot and periodic backup.
– Mimp
Aug 8 '16 at 17:22
When I close with alt+f4 I don't get the prompt, when I use alt+X I do.
– jiggunjer
Aug 12 '16 at 13:40
|
show 1 more comment
PowerShell does not have a default editor. Please clarify what you are actually trying to do.
– DavidPostill♦
Aug 7 '16 at 13:14
Is your question how to associate Notepad++ as the default editor, or how to associate certain commands with auto-execution of that identical sequence (or other sequences?)?
– fixer1234
Aug 8 '16 at 3:01
1
@fixer1234 That is my intention, thank you for your patience with my lack of clarity.
– ProfK
Aug 8 '16 at 4:15
Edit is not an alias by default in Powershell. If you have one you can use Get-Alias to see it's definition and should be able to change it with Set-Alias. As for the prompt when you close Notepadd++, from what I read versions 6.6 and later should automatically save those files periodically. You can change the settings in Settings->Preferences->Backup->Enable session snapshot and periodic backup.
– Mimp
Aug 8 '16 at 17:22
When I close with alt+f4 I don't get the prompt, when I use alt+X I do.
– jiggunjer
Aug 12 '16 at 13:40
PowerShell does not have a default editor. Please clarify what you are actually trying to do.
– DavidPostill♦
Aug 7 '16 at 13:14
PowerShell does not have a default editor. Please clarify what you are actually trying to do.
– DavidPostill♦
Aug 7 '16 at 13:14
Is your question how to associate Notepad++ as the default editor, or how to associate certain commands with auto-execution of that identical sequence (or other sequences?)?
– fixer1234
Aug 8 '16 at 3:01
Is your question how to associate Notepad++ as the default editor, or how to associate certain commands with auto-execution of that identical sequence (or other sequences?)?
– fixer1234
Aug 8 '16 at 3:01
1
1
@fixer1234 That is my intention, thank you for your patience with my lack of clarity.
– ProfK
Aug 8 '16 at 4:15
@fixer1234 That is my intention, thank you for your patience with my lack of clarity.
– ProfK
Aug 8 '16 at 4:15
Edit is not an alias by default in Powershell. If you have one you can use Get-Alias to see it's definition and should be able to change it with Set-Alias. As for the prompt when you close Notepadd++, from what I read versions 6.6 and later should automatically save those files periodically. You can change the settings in Settings->Preferences->Backup->Enable session snapshot and periodic backup.
– Mimp
Aug 8 '16 at 17:22
Edit is not an alias by default in Powershell. If you have one you can use Get-Alias to see it's definition and should be able to change it with Set-Alias. As for the prompt when you close Notepadd++, from what I read versions 6.6 and later should automatically save those files periodically. You can change the settings in Settings->Preferences->Backup->Enable session snapshot and periodic backup.
– Mimp
Aug 8 '16 at 17:22
When I close with alt+f4 I don't get the prompt, when I use alt+X I do.
– jiggunjer
Aug 12 '16 at 13:40
When I close with alt+f4 I don't get the prompt, when I use alt+X I do.
– jiggunjer
Aug 12 '16 at 13:40
|
show 1 more comment
1 Answer
1
active
oldest
votes
This is not really the solution to my question, but it is the closest I have come. It is a PowerShell script that totally replaces Notepad with Notepad++ system wide.
Replace Notepad.exe with Notepad++ Using PowerShell in Windows 10
The linked script only replaces file notepad.exe
with the executable of Notepad++ after it moved original file to notepad.exe.bak
. And if the Notepad++ is 7.5.9 or above, then it adds a value into key HKLM:SoftwareMicrosoftWindows NTCurrentVersionImage File Execution Optionsnotepad.exe
.
1
On an old Win2k I was used to seenotepad++.exe
materially renamed innotepad.exe
... andnotepad.exe
inms.notepad.exe
...:-)
– Hastur
Oct 14 '16 at 8:06
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1110795%2fhow-do-i-make-notepad-my-default-editor-in-powershell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is not really the solution to my question, but it is the closest I have come. It is a PowerShell script that totally replaces Notepad with Notepad++ system wide.
Replace Notepad.exe with Notepad++ Using PowerShell in Windows 10
The linked script only replaces file notepad.exe
with the executable of Notepad++ after it moved original file to notepad.exe.bak
. And if the Notepad++ is 7.5.9 or above, then it adds a value into key HKLM:SoftwareMicrosoftWindows NTCurrentVersionImage File Execution Optionsnotepad.exe
.
1
On an old Win2k I was used to seenotepad++.exe
materially renamed innotepad.exe
... andnotepad.exe
inms.notepad.exe
...:-)
– Hastur
Oct 14 '16 at 8:06
add a comment |
This is not really the solution to my question, but it is the closest I have come. It is a PowerShell script that totally replaces Notepad with Notepad++ system wide.
Replace Notepad.exe with Notepad++ Using PowerShell in Windows 10
The linked script only replaces file notepad.exe
with the executable of Notepad++ after it moved original file to notepad.exe.bak
. And if the Notepad++ is 7.5.9 or above, then it adds a value into key HKLM:SoftwareMicrosoftWindows NTCurrentVersionImage File Execution Optionsnotepad.exe
.
1
On an old Win2k I was used to seenotepad++.exe
materially renamed innotepad.exe
... andnotepad.exe
inms.notepad.exe
...:-)
– Hastur
Oct 14 '16 at 8:06
add a comment |
This is not really the solution to my question, but it is the closest I have come. It is a PowerShell script that totally replaces Notepad with Notepad++ system wide.
Replace Notepad.exe with Notepad++ Using PowerShell in Windows 10
The linked script only replaces file notepad.exe
with the executable of Notepad++ after it moved original file to notepad.exe.bak
. And if the Notepad++ is 7.5.9 or above, then it adds a value into key HKLM:SoftwareMicrosoftWindows NTCurrentVersionImage File Execution Optionsnotepad.exe
.
This is not really the solution to my question, but it is the closest I have come. It is a PowerShell script that totally replaces Notepad with Notepad++ system wide.
Replace Notepad.exe with Notepad++ Using PowerShell in Windows 10
The linked script only replaces file notepad.exe
with the executable of Notepad++ after it moved original file to notepad.exe.bak
. And if the Notepad++ is 7.5.9 or above, then it adds a value into key HKLM:SoftwareMicrosoftWindows NTCurrentVersionImage File Execution Optionsnotepad.exe
.
edited Feb 23 at 13:44
miroxlav
8,01652874
8,01652874
answered Oct 4 '16 at 6:02
ProfKProfK
308114698
308114698
1
On an old Win2k I was used to seenotepad++.exe
materially renamed innotepad.exe
... andnotepad.exe
inms.notepad.exe
...:-)
– Hastur
Oct 14 '16 at 8:06
add a comment |
1
On an old Win2k I was used to seenotepad++.exe
materially renamed innotepad.exe
... andnotepad.exe
inms.notepad.exe
...:-)
– Hastur
Oct 14 '16 at 8:06
1
1
On an old Win2k I was used to see
notepad++.exe
materially renamed in notepad.exe
... and notepad.exe
in ms.notepad.exe
... :-)
– Hastur
Oct 14 '16 at 8:06
On an old Win2k I was used to see
notepad++.exe
materially renamed in notepad.exe
... and notepad.exe
in ms.notepad.exe
... :-)
– Hastur
Oct 14 '16 at 8:06
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1110795%2fhow-do-i-make-notepad-my-default-editor-in-powershell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
PowerShell does not have a default editor. Please clarify what you are actually trying to do.
– DavidPostill♦
Aug 7 '16 at 13:14
Is your question how to associate Notepad++ as the default editor, or how to associate certain commands with auto-execution of that identical sequence (or other sequences?)?
– fixer1234
Aug 8 '16 at 3:01
1
@fixer1234 That is my intention, thank you for your patience with my lack of clarity.
– ProfK
Aug 8 '16 at 4:15
Edit is not an alias by default in Powershell. If you have one you can use Get-Alias to see it's definition and should be able to change it with Set-Alias. As for the prompt when you close Notepadd++, from what I read versions 6.6 and later should automatically save those files periodically. You can change the settings in Settings->Preferences->Backup->Enable session snapshot and periodic backup.
– Mimp
Aug 8 '16 at 17:22
When I close with alt+f4 I don't get the prompt, when I use alt+X I do.
– jiggunjer
Aug 12 '16 at 13:40