thehogfather / brackets-code-folding

Code folding extension for brackets IDE
134 stars 42 forks source link

Make the folding button easier to click on #3

Closed MiguelCastillo closed 11 years ago

MiguelCastillo commented 11 years ago

It is pretty difficult to expand/collapse lines right now. Consider making the collapse buttons a bit bigger

thehogfather commented 11 years ago

Good point. However the entire line number is clickable and should cause code to fold/unfold when clicked. I agree that there is no visual cue that this is the case. I will push an update to fix this using a bit of css on mouse over.

MiguelCastillo commented 11 years ago

Here is a sample of my jshint implementation where I am handling my own gutter.

Here I create/delete the gutter: https://github.com/MiguelCastillo/Brackets-Interactive-Linter/blob/master/linterManager.js

Here I add and remove gutter markers. https://github.com/MiguelCastillo/Brackets-Interactive-Linter/blob/master/linterReporter.js

  1. So, setup an activeEditorChange event and get the codemirror instance from it.
  2. Setup your gutter. E.g. _cm.setOption("gutters", ["interactive-linter-gutter"]);
  3. Add gutter marks. E.g. _cm.setGutterMarker(token.start.line, "interactive-linter-gutter", $("
    test
    ")[0]);

I will go through your code and if I can get my way around in a reasonable manner I will make a pull request.

-Miguel

MiguelCastillo commented 11 years ago

Alright, so I put together a gutter for ya. The logic to place add the gutter and to clear it out needs to be cleaned up... It shouldn't be that much work to get it cleaned up.

https://github.com/MiguelCastillo/brackets-code-folding

thehogfather commented 11 years ago

Cheers mate. Working on this ..