php的代码度量-记事本++
我特别想知道有多少行代码,但这跨越了许多文件。
我一直在使用记事本++编写代码,对于每个文件,它确实显示行号,但当然我有空返回以使代码更具可读性。
有谁知道我可以准确获取实际代码行的插件或工具?
In particular, I am interested to know how many lines of codes there are, but this spans across many files.
I have been using notepad++ to author the code and for each file it does display line numbers but of course I have empty returns to make the code more readable.
Does anyone know of a plugin or tool that I can accurately get the actual lines of code?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
转到搜索 ->在文件中查找...或使用 Ctrl+Shift+F
查找内容:\S+\s\r\n*
过滤器:*.php
搜索模式正则表达式
点击查找全部
查看下部窗格中的“查找结果”
它并不完美根本没有,但它开箱即用。当然,您也可以更改正则表达式,例如仅计算行数:
Go to Search -> Find in Files... or use Ctrl+Shift+F
Find what: \S+\s\r\n*
Filters: *.php
Search Mode Regular expression
Click Find All
See the 'Find result' in the lower pane
It's not perfect at all, but it works out of the box. Of course you can also make changes to the regular expression, like only counting lines with:
谷歌搜索“php sloc 计数器”。有很多工具可以做到这一点,例如:
http: //thecodecentral.com/2007/12/26/source-line-of-code-counter
但是,这种测量绝对没有用,所以我不确定你为什么要这样做。
Google for "php sloc counter". There are plenty of tools to do that, for example:
http://thecodecentral.com/2007/12/26/source-line-of-code-counter
However, this kind of measuring is absolutely useless, so I'm not sure why you would want to do this.
Linux:
Windows(PowerShell):
Linux:
Windows (PowerShell):