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: 1727
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


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 29 guests