如何编辑记事本的首选项文件++?
我的开源项目在其代码中使用空格,而不是制表符。
该项目的贡献者有自己的网站,该网站使用制表符,而不是空格。
他在 Windows 中使用 Notepad++ 编辑这两个项目的文件,当他忘记正确手动设置首选项并因此将选项卡插入到我的项目文件中时,他感到很沮丧。
有没有办法通过脚本编辑此首选项?这样他就可以单击一个图标以模式 1 启动 Notepad++(运行批处理脚本来修改首选项文件,然后启动程序)或单击另一个图标以模式 2 启动。
或者如果有任何其他方法可以使他不必这样做记住这个苦差事,那也有用。也许有一个首选项设置取决于编辑的文件所在的文件夹?
任何帮助将不胜感激。谢谢!
My open source project uses spaces, not tabs, in its code.
A contributor to the project has his own website which uses tabs, not spaces.
He uses Notepad++ in Windows to edit files for both projects, and is frustrated when he forgets to manually set the Preferences correctly and thus inserts tabs into my project's files.
Is there a way to edit this Preference via a script? That way he could click one icon to start Notepad++ in mode 1 (running a batch script to modify the Preferences file and then start the program) or click another to start in mode 2.
Or if there's any other way to make him not have to remember this chore, that would work too. Maybe having a Preferences setting that depends on what folder the edited file is inside of?
Any help would be appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
notepad++ 用空格替换制表符的设置存储在以下 xml 文件
%USERPROFILE%\Application Data\Notepad++\config.xml
以下是需要更改的行
现在我不知道我们如何在Windows中通过批处理脚本编辑文件,但如果不可能,那么他可以保留两个配置文件config-tabs.xml和config-spaces.xml。在脚本中,您可以根据他需要处理的内容复制适当的文件。
The notepad++ setting for replacing tabs with spaces is stored in following xml file
%USERPROFILE%\Application Data\Notepad++\config.xml
The following is the line that needs to be changed
Now I don't know how we can edit a file by batch script in windows, but if it is not possible, then he can keep two config files config-tabs.xml and config-spaces.xml. And in the script you can copy appropriate file depending on what he needs to work on.