11

I very much enjoy working in Notepad++, but I haven't yet found a plugin to automatically do PHPDoc style comments. Other PHP IDE's (Eclipse, NetBeans, ZendStudio) include this feature, and it's quite handy.

Basically what I want is, if on the line above a function definition or class definition I type in:

/**

It automatically populates the PHPdoc format (something like the following for a function):

/**  
 * 
 * @param $first_argument
 * @param $second_argument
 * @return
 */

Then when I type in additional lines to the comment, it starts each line with an asterisk.

Is there a NP++ plugin that accomplishes this, or a way to tweak NP++ to make it work?

1
  • The problem is in other PHP IDE's. Notepad++ is hardly a PHP editor, let alone a PHP IDE. Would be a nice feature though. Commented Feb 3, 2011 at 22:39

5 Answers 5

11

The question is old...but try DoxyIt plugin from plug manager. It works exactly as you need.

Sign up to request clarification or add additional context in comments.

2 Comments

I have not found "DocxIt" plugin in plugin manager 1.0.8.0 in NP++ v6.3.3. Perhaps, did you mean "DoxyIt"?
@Mikl The plugin is indeed called DoxyIt and can be found also in github if you click on the name link supplied in this comment
4

While Notepad++'s syntax highlighter recognizes doc comments, it does not actually parse them and generate the corresponding autocomplete code for you, nor does it have any snippet features that allow you to insert doc comments on the fly.

3 Comments

I should mention that it does have some snippet features in the Snippets and QuickText plugins, although these don't offer enough flexibility to really create PHPDoc comments.
@Travis: Yeah, which is why I'm not a fan of those plugins :/
The FingerText plugin has hotspots for snippets, so might have the functionality for creating PHPDoc comments nicely.
4

Try DocIt, it works fine, after install move cursor before function and press CTRL + ALT + SHIFT + D to add comments.

Download: https://sourceforge.net/projects/nppdocit/postdownload

enter image description here

Comments

2

I think there aren't a "really tool" por PHPDoc on N++. You can use the WebEdit plugin (plugin manager). Once installed you need to update the edit file adding this line at the end:

pdoc=/**\n * \n * \n * @params \n * @return \n */

Restart N++, write pdoc and press Alt+Enter to get anything like this:

/**
 * 
 * 
 * @params 
 * @return 
 */

Obviously, it can't get your function params and other tipical info of DocBloks but may be helpfull if we have no choice.

Comments

2

I guess the selected answer is older than the plugin itself but I use DocIt. http://nppdocit.sourceforge.net/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.