最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Automatically "continue" a comment block in Sublime when pressing enter? - Stack Overflow

programmeradmin5浏览0评论

I'm sure there's an answer out there but due to the ambiguity of this question and keywords it's difficult.

All I want is a menting plugin or answer to mimic Java in Eclipse where:

/* 
 * This is a description of a function in Javascript
 * When I press return a line like this
 *
 * should appear (above) and allow me to continue the ment block
 * and be surrounded by the following
 */

UPDATE/ANSWER

A few minutes after I posted this user pst came in and rephrased my question to actually make sense. After searching I found DocBlockr. Works great, thank you both!

I'm sure there's an answer out there but due to the ambiguity of this question and keywords it's difficult.

All I want is a menting plugin or answer to mimic Java in Eclipse where:

/* 
 * This is a description of a function in Javascript
 * When I press return a line like this
 *
 * should appear (above) and allow me to continue the ment block
 * and be surrounded by the following
 */

UPDATE/ANSWER

A few minutes after I posted this user pst came in and rephrased my question to actually make sense. After searching I found DocBlockr. Works great, thank you both!

Share Improve this question edited Aug 5, 2017 at 6:49 Cœur 38.8k25 gold badges205 silver badges277 bronze badges asked Nov 27, 2012 at 20:01 jasonsemkojasonsemko 7432 gold badges7 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 12

Start with the DocBlockr package.

If you enter and align the first * it will insert the following starting *s.

/*
 * <-- Type and align that one, hit <RETURN>...
 * <-- This one will be inserted and aligned automatically.

If you insert a double-asterisk it will insert the leading *s without the hinting:

/**
 * <-- Inserted automatically.

If you're at the start of a function it'll put the JsDoc stuff in for you as well.

发布评论

评论列表(0)

  1. 暂无评论