记事本是(Notepad)Windows计算机中的默认文本编辑器。每个 .txt 文件都配置为直接在记事本(Notepad)中打开。很长一段时间以来,它已经为文本编辑器铺平了道路,在此期间,我们看到了一些非常有前途的记事本(Notepad)竞争对手。其中之一是Notepad++。它是一款免费的开源文本编辑软件,提供与记事本(Notepad)相同的功能,还有一些。用户可以用多种语言在Notepad++
Notepad++集成了一些像记事本这样的轻量级应用程序所缺乏的功能。如果您发现自己对Notepad++非常满意,并且觉得Notepad不再适合您的需求,那么本文适合您。今天,我们将向您展示如何用Notepad++Notepad来编辑 Windows PC 上的任何文本文件。
Notepad缺少文本编辑和管理的几个方面,其中许多是Notepad++专门提供的。用户缺乏在记事本(Notepad)中修改大文本文件的能力,而这是在Notepad++中可以轻松做到的。有几个高级功能,例如在文件夹的所有文件中查找文本、书签文件、可自定义的热键以及更好的搜索和替换实用程序。此外(Besides),该应用程序只有 5MB 大(仍然比记事本(Notepad)大,如果你从Windows 商店(Windows Store)下载,它只有 2MB 左右)。
记事本和记事本++是一样的吗?
鉴于这两个应用程序的名称非常相似,用户经常会混淆它们。这条线可以最简单地绘制,因为Notepad是 Microsoft 的内置文本编辑应用程序,而Notepad++是第三方应用程序,即您必须单独下载它。就功能而言,Notepad与(Notepad)Notepad++相比毫无优势。虽然前者提供了最基本的主流功能,但您可以在Notepad++上执行多项高级任务,例如同时编辑、行书签、分屏编辑等等。Notepad++Notepad更广泛地用作IDE。
如何更换记事本?
如果您想将记事本的可执行文件 ( .exe ) 替换为其中一种替代文件,那么您也有相应的程序。在这种情况下,您需要执行以下操作:
- 下载(Download)记事本(Notepad)的替代品
- 在(Make)C:Windows 和 C:WindowsSystem32 中复制记事本的可执行文件
- 通过应用程序属性获取记事本(Notepad)的所有权并从位置删除应用程序
- 将替换的可执行文件粘贴到所有这些位置并将其重命名为“Notepad.exe”
如何将Notepad替换为Notepad++作为默认文本编辑器(Text Editor)
1]使用提升的命令提示符(Elevated Command Prompt)
这里的方法很简单。这里明显的先决条件是让您在 PC 上下载并安装Notepad++之后,您只需按照以下步骤操作:
- 从开始菜单(Start Menu)或高级用户菜单(Power User Menu)打开提升的命令提示符(Command Prompt)。
- 将以下命令行复制并粘贴到命令提示符(Command Prompt)中,然后按Enter。
- 如果您运行的是32 位(32-bit)版本的 Notepad++,下面的命令行是。
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles(x86)%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
- 如果您有64 位(64-bit)版本,请使用以下命令行:
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
- 完成后,您将在屏幕上收到“操作成功”消息,之后您可以关闭CMD并重新启动系统以使更改生效。
您可以从注册表编辑器(Registry Editor)验证更改。也可以通过注册表编辑器(Registry Editor)进行更改,更改相关位值。如果要撤消上述更改,只需运行以下命令行:
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f
2]设置文本文件以使用Notepad++
解决此问题还有另一种相当简单的方法,它也可能对您有用。如果您只是将文本文件配置为使用Notepad++而不是其默认应用程序Notepad打开。这样,记事本(Notepad)不会被阻止,您的文本文件也将默认在Notepad++以下是如何进行切换:
- 创建一个示例文本文件并将其放在您的桌面(Desktop)上,以便于访问
- 右键单击(Right-click)应用程序图标并选择属性
- 在“常规(General)”选项卡下,您会看到“打开方式:”选项。点击(Click)旁边的更改按钮
- 从应用程序列表中,选择Notepad++并单击确定以保存设置
- 如果您在这里没有找到Notepad++,请点击更多应用
对于大多数用户来说,这种方法工作得很好,也比第一种方法更容易,但是如果您希望所有针对记事本(Notepad)的命令都转向Notepad++,您也可以使用命令行(Command Line)方法。
3]使用记事本替换器
免费软件记事本(Freeware Notepad Replacer)替换器可让您轻松替换记事本!(Notepad)它将允许您(It will allow you to)用您想使用的任何替代品替换默认的Windows版本的记事本。(Notepad)
我们希望这篇文章已经澄清了您对如何用Notepad++或任何文本编辑器替换(any text editor)Notepad的所有疑问。
相关:(Related:)如何set Notepad++ as default editor for .xml files.
How to replace Notepad with Notepad++ in Windows 11/10
Notepad is the default text editor found in Windows computers. Every .txt file is configured to open directly in the Notepad. It has paved the way for text editors over quite some time now, in which period we have seen some very promising competitors of Notepad. One of these is Notepad++. It is a free, open-sourced text editing software that provides the same features as the Notepad and then some. Users can write on Notepad++ in several languages.
Notepad++ has several features integrated into it that lightweight applications like Notepad lack. If you’re someone who’s found him/herself to be very comfortable with Notepad++ and feels like Notepad isn’t suiting your needs anymore, this article is for you. Today, we will be showing you how you can replace Notepad with Notepad++ to edit any text files on your Windows PC.
There are several aspects of text editing and curation that Notepad lacks, many of which are specialized by Notepad++. Users lack the ability to modify large text files in Notepad, which is something one can easily do in Notepad++. There are several advanced features such as finding text in all the files of a folder, bookmarking files, customizable hotkeys, and a much better search and replace utility. Besides, the app is only 5MB big (still bigger than Notepad which, if you download from the Windows Store, is only around 2MB).
Is Notepad and Notepad ++ the same?
Given how similar the names of both these applications are, users often get confused between them. The line can most simply be drawn with the fact that Notepad is Microsoft’s built-in text editing application while Notepad++ is a third-party app i.e., you have to download it separately. In terms of features, Notepad stands nowhere in comparison to Notepad++. While the former offers the most basic, mainstream features, you can perform several advanced tasks on Notepad++ like simultaneous editing, line bookmarking, split-screen editing, and many more. Notepad++ is also used as an IDE more widely than Notepad.
How do I replace Notepad?
If you want to replace Notepad’s executable file (.exe) with one of its alternatives, then you have a procedure for that too. Here’s what you need to do in that case:
- Download your replacement for Notepad
- Make copies of Notepad’s executable files in C:\Windows and C:\Windows\System32
- Take ownership of Notepad via app properties and delete the app from the locations
- Paste your replacement’s executable file on all those locations and rename it as ‘Notepad.exe’
How to replace Notepad with Notepad++ as the default Text Editor
1] Using the Elevated Command Prompt
The method in place here is pretty simple. The obvious prerequisite here is for you to have Notepad++ downloaded and installed on your PC. After that, you just have to follow the steps below:
- Open an elevated Command Prompt from the Start Menu or the Power User Menu.
- Copy and paste the following command line in the Command Prompt and press Enter.
- The below command line is if you’re running a 32-bit version of Notepad++.
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles(x86)%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
- If you have the 64-bit version, use the command line below:
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
- Once completed, you’ll receive an “Operation Successful” message on your screen, after which you can close the CMD and restart your system to let the change take effect.
You can verify the change from your Registry Editor. The change can be made via the Registry Editor too, changing the relevant bit value. If you want to undo the above changes, just run the following command line:
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f
2] Setting text files to open with Notepad++
There’s another, a rather easy way around this issue that may work just fine for you too. If you simply configure your text files to open with Notepad++ and not their default app, Notepad. This way, Notepad isn’t blocked and your text files will open in Notepad++ by default too. Here’s how you can make the switch:
- Create a sample text file and put it on your Desktop, so that it’s easy to access
- Right-click on the app icon and select Properties
- Under the General tab, you’ll see an ‘Open With:’ option. Click on the change button next to it
- From the list of apps, select Notepad++ and click Ok to save the settings
- If you don’t find Notepad++ here, click on More Apps
For most users, this method works just fine and is easier than the first one too, but if you want all the commands directed at Notepad to be diverted towards Notepad++, you can use the Command Line method as well.
3] Use Notepad Replacer
Freeware Notepad Replacer lets you replace Notepad the easy way! It will allow you to replace the default Windows version of Notepad with whatever alternative you would like to use.
We hope that this post has clarified all your doubts about how you can replace Notepad with Notepad++, or any text editor for that matter.
Related: How to set Notepad++ as default editor for .xml files.