Home Download Buy Blog Forum Support

How to hide comments

Re: How to hide comments

Postby facelessuser on Mon Jan 16, 2012 4:56 pm

Go to Preferences->Browse Pakages and drop the FoldComments folder in there.

He added two commands in the command palette: "fold comments" and "unfold comments". So just press Ctrl+Shift+p and start typing the command, you should see it pop up; select it and go.
Posts: 1781
Joined: Tue Apr 05, 2011 7:38 pm

Re: How to hide comments

Postby noitseuq on Thu Jul 11, 2013 3:54 pm

Posts: 2
Joined: Thu Jul 11, 2013 3:51 pm

Re: How to hide comments

Postby Oddskar on Wed Jun 25, 2014 9:10 am

Hi people,

I've extended upon the work of the other plugins in this thread and created my own plugin, with additional features such as concatenating adjacent single/block comments, and making sure the fold-indicator isn't munged together with adjacent code.

It is available here: https://github.com/oskarols/foldcomments

It's also added to the Package Manager as "Fold Comments".
Posts: 1
Joined: Wed Jun 25, 2014 9:06 am

Re: How to hide comments

Postby sethinsd on Tue Feb 24, 2015 1:14 am

the first one linked is my favorite, however I need it to have an end of line character after the last folded block in succession.
How would I accomplish this? Current code is:
Code: Select all
class FoldCommentsCommand(sublime_plugin.TextCommand):
    def run(self, edit):

class UnfoldCommentsCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        for region in self.view.find_by_selector('comment'):

But I want to add in an end of line and then remove it after.. or is there a way to change the way folding works?
Posts: 1
Joined: Tue Feb 24, 2015 1:12 am

Re: How to hide comments

Postby subscriber360 on Thu Feb 26, 2015 9:13 am

Awesome Job dude, really appreciated.
Posts: 2
Joined: Thu Feb 26, 2015 8:34 am

Re: How to hide comments

Postby ferdly on Fri May 22, 2015 7:18 pm

Hi all,

First post, so be gentle if I offend some netiquette you all have going :-)
(I did a cursory google search on this, but perhaps I don't know the right vernacular.)

I have a followup question.

Can someone tell me (or point me to documentation) that explains what happens when one adds a plugin (like the download above) or writes their own, and then a newer 'official release' includes the same functionality?

Do you just need to attend to the change-log to see what is new, and is there a recommended method of documenting your 'add-on' (contributed and home-grown) plugins (like a personal change-log to your copy)? Is there a coding standard (like doxygen) that can 'harvest' this data dynamically?

Posts: 1
Joined: Fri May 22, 2015 7:00 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 30 guests