Hiding function with comments in JS


#1

Hello, i was wondering if it’s possible somehow to hide functions in JS with coments in ?

thanks a lot.


#2

This isn’t really an Atom question, but yes, it is possible. You can highlight the function and use Cmd+/ on OS X or Ctrl+/ on other platforms to comment it out.


#3

i think i expressed myself bad, i saw atom has this thing : http://i.imgur.com/Hlsn9uE.png
which hides the code inside, UNLES it has a coment inside it, in such case it does hide only "until it meets the coment"
but i want to keep hiding entire functions even if they have coments inside.


#4

That feature is referred to as “code folding”. Code folding is based on indentation. If your code follows standard indentation conventions, it will work the way you’re expecting.


#5

i understand now how stupid my question was :slight_smile:

But i thank you.