GithubHelp home page GithubHelp logo

Comment continuation about sublime-jsdocs HOT 7 CLOSED

spadgos avatar spadgos commented on May 28, 2024
Comment continuation

from sublime-jsdocs.

Comments (7)

spadgos avatar spadgos commented on May 28, 2024

It already does this, no?

The only thing is that in your second example it won't like you demonstrate because it's not a docblock (a comment block that starts with /** instead of just /*). This is by design.

from sublime-jsdocs.

canni avatar canni commented on May 28, 2024

lol, it does work, maybe I was in some weird context when I had checked.

As about /* I use it a lot, but not as a function docblock but as a inline-multiline comment

In my dev team we follow simple rulre:

comments starting from // are for devs only, and they're removed automatically on deploy,
comments in:

/*
 *
 */

are meant to stay in code as important things, but invisible for doc generation software

from sublime-jsdocs.

spadgos avatar spadgos commented on May 28, 2024

Ok, seems reasonable then. I imagine that it'll be a configuration setting which is turned off by default though.

from sublime-jsdocs.

spadgos avatar spadgos commented on May 28, 2024

@canni - question: would it work for you if the leading * is added only if the current line starts with a comment? eg:

/*
aBlock.ofCode('which is commented out'); <<A>>
*/

/*
 * important comments to stay here or something<<B>>
 */

So, in the above, pressing enter at <<A>> would not add an asterisk (same behaviour as you see right now), but at <<B>> it would.

from sublime-jsdocs.

canni avatar canni commented on May 28, 2024

I think this is good solution, but better I think it would be to write: /**/<<cursor>> move back cursor /*<<here>>*/ pres enter and this give cursor:

/*
 * <<here>>
 */

It would be simply faster and less typing required

from sublime-jsdocs.

spadgos avatar spadgos commented on May 28, 2024

i disagree on that, actually. That's a fairly esoteric interaction -- difficult to remember when you want it to happen, and confusing when it is triggered accidentally.

How about this instead (in each of these, imagine the cursor at the |):

/*|

press: enter

/*
|
*/

press: *

/*
 *|
 */

press: enter

/*
 *
 *|
 */

Alternatively, /*| followed by ctrl+enter (or shift, whatever) would result in:

/*
 *|
 */

from sublime-jsdocs.

canni avatar canni commented on May 28, 2024

First solution is good for me :)

from sublime-jsdocs.

Related Issues (20)

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.