問題描述
有時在我的代碼中我喜歡注釋掉一段代碼以供臨時使用/引用等,例如:
/*廢話*/
但是如果我想在那個塊中插入一行,當我點擊回車時,它會自動在下一行放一個 * ,就像我在做一個 DocBlock 一樣,這是一個小煩惱.這發生在每個回車鍵上:
/*等等<在此處按下輸入>**/
現在我認為這種自動格式化"應該只在開場評論使用格式/**(兩顆星)時發生.多行注釋在 DocBlocks 之前已經存在很長時間了,所以我不確定為什么它會強制這些老派"標準直截了當/* */注釋具有花哨的不需要的額外 DocBlock * !
那么有沒有辦法:
- a) 理想情況下 - 只有在開始標記是/** 時才進行格式化
- b) 或者如果它不能區分/* 和/**,有沒有辦法完全禁用自動注釋格式?
干杯
我最終在他們的 Bugzilla 中將此作為 Netbeans 錯誤輸入,他們現在已經修復了該問題.他們很快就做到了,我應該在 12 小時內為他們點贊.據我所知,它似乎將包含在 Netbeans 7.4 版本中.一定要喜歡開源!:)
此處的工作詳細信息:
https://netbeans.org/bugzilla/show_bug.cgi?id=230814>
Sometimes in my code I like to comment out a block of code for temporary use/reference etc eg:
/*
blah
*/
But it's a minor annoyance that if I then want to go and insert a line inside that block, when I click enter, it will automatically put a * on the next line as though I were doing a DocBlock. This happens on every enter key:
/*
blah<enter pressed here>
*
*/
Now I would have thought this 'auto-formatting' should only take place if the opening comment is using the format /** (two stars). Multi line comments were around a long time before DocBlocks, so I'm not sure why it forces these "old school" standard straight forward /* */ comments to have fancy unwanted extra DocBlock *'s!
So is there a way to:
- a) Ideally - only have that formatting take place if the opening tag is /**
- b) Or if it can't differentiate between /* and /**, is there a way to disable the auto-comment-formatting entirely?
Cheers
I ended up entering this as a Netbeans bug in their Bugzilla and they have now fixed the issue. They did this VERY Quickly I should add - within 12 hours - kudos to them. From what I can make out it looks like it will be included in Netbeans 7.4 release. Gotta love Open Source! :)
Job details here:
https://netbeans.org/bugzilla/show_bug.cgi?id=230814
這篇關于如何在沒有自動 DocBlock 格式的情況下在 NetBeans 中進行多行注釋?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!