Giter Site home page Giter Site logo

saulaxel / jcommenter.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vim-scripts/jcommenter.vim

0.0 2.0 0.0 41 KB

A script for automatically generating JavaDoc comments

Home Page: http://www.vim.org/scripts/script.php?script_id=20

Vim Script 100.00%

jcommenter.vim's Introduction

Jcommenter

A [neo]vim plugin to generate JavaDoc.

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

Updated 19.08.2018 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 @ -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. The style of the comment templates is configurable

Installation

Use your favorite plugin manager and add a line as the later to the corresponding part of your vim configuration:

    <Name-of-plugin-manager> 'saulaxel/jcommenter.vim'

jcommenter.vim's People

Contributors

saulaxel avatar

Watchers

 avatar  avatar

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.