Giter Club home page Giter Club logo

jcommenter.vim's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=20

Updated 29.12.2002 KB

Description:
Generates JavaDoc (and some other) comments for java-sources. This is triggered by executing the JCommentWriter()-function while the cursor is over something meaningfull, or if a selection exists, the selected text is parsed and the comment template is generated based on that.

The following comments are generated (in the appropriate situations):
1. File comments: user specifies the template, generated when the cursor is on the first line of the file.
2. Class comments: generated when on top of a class declaration
3. Method comments: generated when on top of a metod declaration. @return, @params, and @throws are generated, if applicable. If executed on a method declaration which already has JavaDoc-comments, updates the javadoc-comments by removing/adding tags as needed.
4.  Field comments. Simply adds an empty JavaDoc-comment template above the field declaration
5. Copy @<name> -tags. When executed on @something, creates a tag with the same name directly above the line the cursor is currently on.
6. @throws for RuntimeExceptions. When executed on a line containing something like "throw new RuntimeException()", a @throws-tag is added to the previous JavaDoc-comment.
7. Block-end comments. When executed on a line containing a '}'-character and possibly some whitespace (but nothing else), generates a one-line-comment describing what block the '}' is terminating. For example, the comment for "aVeryLongMethod" is  "// END: aVeryLongMethod".

There are a bunch of other functions to support the comment generation (see the start of the script for full documentation). The style of the comment templates is configurable (see the file for configuration and description of the options)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.