Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the folding button easier to click on #3

Closed
MiguelCastillo opened this issue Apr 21, 2013 · 4 comments
Closed

Make the folding button easier to click on #3

MiguelCastillo opened this issue Apr 21, 2013 · 4 comments

Comments

@MiguelCastillo
Copy link

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

@thehogfather
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

Cheers mate. Working on this ..

thehogfather added a commit that referenced this issue Apr 22, 2013
…ed line numbers and hard to click fold markers. Extension now uses separate gutter for rendering fold markers. (credits - Miguel Castillo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants