notepad3 替代windows自带文本编辑器(xjl456852原创)

notepad3 是个更加奢华的记事本编辑器.
(Notepad3 安装版会直接替代记事本,但便携版可直接运行,不替代)
Windows 上的记事本在日常使用的时候挺方便的,但记事本在保存 utf-8 编码文件的时候,会在文件头前面加上几个不可见的字符(0xEF 0xBB 0xBF,即 BOM 头),导致一些编程文件出错,比如修改 php.ini 配置文件的时候,会导致加载出错。
为此,想找到一款轻量级的文本编辑软件,以替换掉 Windows 下的记事本。
Notepad3 是在 Notepad2 基础上进行升级开发,主要目标也是替换掉 Windows 自带记事本,功能上比记事本更加强大,也支持中文界面。
Notepad3 除了基本文本编辑外,并不会自作多情在文件增加一个 BOM 头。并支持多种开发语言的语法高亮支持,支持多种外观主题,支持代码折叠等功能,查找功能支持正则表达式等。

替换方法
方法一:
notepad3 安装版,可以安装时勾选替代系统自带记事本.
安装版下载地址

方法二:
可以使用notepad2e提供的方法进行替代.

Replacing Windows (XP/7/10) Notepad

One obvious way is to overwrite all Notepad.exes inside Windows directory. However, this irritates SFC and may not persist across OS updates.

A better way is using Image File Execution Options, originally explained here. In short: #157

  1. Place Notepad2e.exe somewhere. Program Files (x86)\Notepad2e\ directory is a good place.
  2. Import this registry key:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
"Debugger"="\"C:\\Program Files (x86)\\Notepad2e\\Notepad2e.exe\" /z"
  • If the EXE was put elsewhere, edit the part inside the second quotes, and don't forget to double all backslashes - example: ...="\"D:\\Foo\\Bar\\MyN2e.exe\" /z"
  • Attention: the EXE should not be named notepad.exe (in any char case).

Now whenever Windows needs to launch Notepad.exe it will launch the EXE you have specified instead.

To undo, replace last line above with "Debugger"=- and import the key.

posted on 2020-11-15 13:09  三杯两盏淡酒  阅读(3110)  评论(0编辑  收藏  举报

导航