Add configuration for enabling folding. #5844

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
@russlescai
Contributor

russlescai commented Mar 4, 2015

Fixes #3709.

Adds configuration item to enable or disable folding.

This includes disabling the Folding menu item.

@russlescai

This comment has been minimized.

Show comment
Hide comment
@russlescai

russlescai Mar 4, 2015

Contributor

@izuzak I have recreated the PR for disabling folding, which works with the current master branch.

Happy for feedback etc.

Contributor

russlescai commented Mar 4, 2015

@izuzak I have recreated the PR for disabling folding, which works with the current master branch.

Happy for feedback etc.

@russlescai russlescai referenced this pull request Mar 4, 2015

Closed

Disable folding if enableFolding config is false. #3748

4 of 6 tasks complete

@izuzak izuzak added the needs-review label Mar 31, 2015

@krainboltgreene

This comment has been minimized.

Show comment
Hide comment
@krainboltgreene

krainboltgreene Jul 12, 2015

What can I do to help this get in?

What can I do to help this get in?

@russlescai

This comment has been minimized.

Show comment
Hide comment
@russlescai

russlescai Jul 23, 2015

Contributor

@krainboltgreene It's been waiting for review since 31 March, I presume other issues for v1.0 have been higher priority.

@izuzak is this PR still in the mix? If so, I'll create a new PR from master, to simplify the rebase.

Otherwise, I'll turn it into a separate package.

Contributor

russlescai commented Jul 23, 2015

@krainboltgreene It's been waiting for review since 31 March, I presume other issues for v1.0 have been higher priority.

@izuzak is this PR still in the mix? If so, I'll create a new PR from master, to simplify the rebase.

Otherwise, I'll turn it into a separate package.

@gaelganlut

This comment has been minimized.

Show comment
Hide comment
@gaelganlut

gaelganlut Aug 21, 2015

Hello, I tried to enable it but it doesn't seem to work. has the code changed since?

Hello, I tried to enable it but it doesn't seem to work. has the code changed since?

@thedaniel

This comment has been minimized.

Show comment
Hide comment
@thedaniel

thedaniel Nov 30, 2015

Contributor

What's the motivation for disabling folding? Just to hide the fold controls in the gutter?

Contributor

thedaniel commented Nov 30, 2015

What's the motivation for disabling folding? Just to hide the fold controls in the gutter?

@gaelganlut

This comment has been minimized.

Show comment
Hide comment
@gaelganlut

gaelganlut Nov 30, 2015

@thedaniel as a Web developer i often unintentionally click it instead of selecting the line(s) (it is too close from it)

@thedaniel as a Web developer i often unintentionally click it instead of selecting the line(s) (it is too close from it)

@russlescai

This comment has been minimized.

Show comment
Hide comment
@russlescai

russlescai Nov 30, 2015

Contributor

It was originally raised by Mark Hahn as a desired feature, and I wanted to contribute to Atom and be part of the community so created this PR to help out. :)

Contributor

russlescai commented Nov 30, 2015

It was originally raised by Mark Hahn as a desired feature, and I wanted to contribute to Atom and be part of the community so created this PR to help out. :)

@thedaniel thedaniel added the atom label Dec 3, 2015

@alminde

This comment has been minimized.

Show comment
Hide comment
@alminde

alminde Dec 15, 2015

This would be a really sweet feature!

alminde commented Dec 15, 2015

This would be a really sweet feature!

@a2sheppy

This comment has been minimized.

Show comment
Hide comment
@a2sheppy

a2sheppy Dec 17, 2015

Bummer that patches for this keep bit-rotting. Code folding is one of those things I know lots of people like but it drives me nuts, especially since I don't use it and it's so easy to trigger by accident. Then it gets very confusing. I hope someone is able to actually make this stick!

Bummer that patches for this keep bit-rotting. Code folding is one of those things I know lots of people like but it drives me nuts, especially since I don't use it and it's so easy to trigger by accident. Then it gets very confusing. I hope someone is able to actually make this stick!

@thedaniel

This comment has been minimized.

Show comment
Hide comment
@thedaniel

thedaniel Dec 18, 2015

Contributor

Thanks for this PR - we talked about it a bit amongst the core team, and we decided not to merge this. We're concerned about finding the right balance between configurability and having an overwhelming settings page, and we think that because folding is both a core part of the editor's functionality and very unobtrusive, adding an option to turn it off and on doesn't meet the bar to be added to settings.

For now you can patch the TextEditor prototype yourself in init.coffee like so:

{TextEditor} = require('atom')
TextEditor.prototype.isFoldableAtBufferRow = -> false
Contributor

thedaniel commented Dec 18, 2015

Thanks for this PR - we talked about it a bit amongst the core team, and we decided not to merge this. We're concerned about finding the right balance between configurability and having an overwhelming settings page, and we think that because folding is both a core part of the editor's functionality and very unobtrusive, adding an option to turn it off and on doesn't meet the bar to be added to settings.

For now you can patch the TextEditor prototype yourself in init.coffee like so:

{TextEditor} = require('atom')
TextEditor.prototype.isFoldableAtBufferRow = -> false

@thedaniel thedaniel closed this Dec 18, 2015

@alminde

This comment has been minimized.

Show comment
Hide comment
@alminde

alminde Dec 21, 2015

I had the impression Atom was all about overwhelming settings pages.

Cool init script patch though. Thanks, @thedaniel.

alminde commented Dec 21, 2015

I had the impression Atom was all about overwhelming settings pages.

Cool init script patch though. Thanks, @thedaniel.

@jussi-kalliokoski

This comment has been minimized.

Show comment
Hide comment
@jussi-kalliokoski

jussi-kalliokoski Dec 23, 2016

Contributor

Can this decision be revisited? Folds are hardly unobtrusive since the default for the built-in Java package for example is to fold all import and package declarations every time you switch tabs.

Contributor

jussi-kalliokoski commented Dec 23, 2016

Can this decision be revisited? Folds are hardly unobtrusive since the default for the built-in Java package for example is to fold all import and package declarations every time you switch tabs.

@morgyface

This comment has been minimized.

Show comment
Hide comment
@morgyface

morgyface May 9, 2018

I too think this should be revisited, whilst the folding toggle button is visually unobtrusive it's flippin' annoying due to it's close proximity to the editor canvas. I frequently, and I mean frequently, click fold instead of positioning my cursor at the start of the line. I also never, ever use folding. I'm sure there are people that get on with it, but at least provide an option to disable. Alternatively revisit the design/ux so it's perhaps positioned to the left of the line numbers and away from the editor.

I too think this should be revisited, whilst the folding toggle button is visually unobtrusive it's flippin' annoying due to it's close proximity to the editor canvas. I frequently, and I mean frequently, click fold instead of positioning my cursor at the start of the line. I also never, ever use folding. I'm sure there are people that get on with it, but at least provide an option to disable. Alternatively revisit the design/ux so it's perhaps positioned to the left of the line numbers and away from the editor.

@lee-dohm

This comment has been minimized.

Show comment
Hide comment
@lee-dohm

lee-dohm May 10, 2018

Member

We aren't going to be revisiting this. Thanks for the feedback.

Member

lee-dohm commented May 10, 2018

We aren't going to be revisiting this. Thanks for the feedback.

@atom atom locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.