简体   繁体   English

我应该在 Notepad++ 中使用什么语言选项和我的 windows 主机文件以提高可读性?

[英]What language option should I use in Notepad++ with my windows host file for readability?

Maybe this is a silly question, but today I was working in my hosts file (C:\windows\system32\drivers\hosts) in notepad++ and would like to use the language formatting.也许这是一个愚蠢的问题,但今天我在 notepad++ 中处理我的主机文件 (C:\windows\system32\drivers\hosts) 并且想使用语言格式。

For example, the first line appears to be a comment例如,第一行似乎是一条评论

# Copyright (c) 1993-1999 Microsoft Corp.

What language do I choose to view the file?我选择什么语言来查看文件?

The hosts file is not written in any programming language. hosts文件不是用任何编程语言编写的。 It's simply plain text in a format easily parseable by certain system and network applications. 它只是纯文本 ,格式易于被某些系统和网络应用程序解析。 Besides, anyone can come up with a parser that treats text delimited by # as comment lines. 此外,任何人都可以提出一个解析器来处理由#分隔的文本作为注释行。

(And in case you didn't get the hint, choose the option that I highlighted in bold.) (如果你没有得到提示,请选择我以粗体突出显示的选项。)

try Nncrontab language, it's easy to read if you have to maintain big host files.尝试 Nncrontab 语言,如果您必须维护大型主机文件,它很容易阅读。 With comment at the end of the line, the display is better than Perl or ini language.行尾加上注释,显示效果优于Perl或ini语言。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Windows PowerShell 中使用文件打开记事本++ - Open notepad++ with a file in Windows PowerShell 如何在命令行中使用记事本++ 打开文件。 (启动记事本++ 创建新文件而不是打开当前文件)(Windows) - How to open file with notepad++ in command line. (start notepad++ create new file instead of open current file) (Windows) 如何使用C ++在notepad ++中打开文件? - How do I open a file within notepad++ with C++? 向 Notepad++ 添加 Rust(编程语言)语法? - Adding Rust (programming language) syntax to Notepad++? QProcess 使用 Windows “启动”程序启动 Notepad++ - QProcess start Notepad++ with Windows "start" program 我应该使用什么Windows API函数将文件/文件夹标记/取消标记为受保护的操作系统文件? - What Windows API function should I use to mark/unmark files/folders as protected operating system file? 如何使git在Windows上使用我选择的编辑器而不是Notepad.exe? - How do I make git use the editor of my choice on Windows instead of Notepad.exe? 我应该安装什么来使用 c++ 中的命名空间 Windows::Devices? - What should I install to use namespace Windows::Devices in c++? 需要制作一个简单的Windows应用程序,我应该使用什么样的语言? - need to make a simple Windows app, what languague should I use? Mac / Windows Java应用程序应使用哪种打包工具? - What packaging tool should I use for a Mac/Windows Java app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM