Skip to content

Option to wrap at specified column only when window is larger than the specified number of columns #1490

Closed

Description

@hashhar

Consider this a feature request:

I am looking to be able to wrap code to 80 columns but only when my window is larger than 80 columns.
Otherwise I want it to use the viewport wrapping.

I guess this would be useful for people who have two windows open side by side and one of the windows has two files open side by side (settings.json for me). In such cases, I cannot view the file without scrolling sideways.

Activity

  1. added
    feature-request
    on Dec 20, 2015
  2. added this to the Backlog milestone on Dec 20, 2015
  3. bpasero commented on Dec 23, 2015

    @bpasero
    Contributor
  4. Fania commented on May 8, 2016

    @Fania

    Yes please!

  5. hashhar commented on May 8, 2016

    @hashhar
    ContributorAuthor

    I would like to start implementing this myself. Reading through the code myself and setting up the environment. Will ask if any help needed.

  6. hashhar commented on May 21, 2016

    @hashhar
    ContributorAuthor

    Hmmm, I was having some issues building it. But it's building fine now. I'll try and send a PR within a 5 or 6 days.

  7. hashhar commented on May 27, 2016

    @hashhar
    ContributorAuthor

    How can I find out the current viewport width? I think adding an extra conditional to src/vs/editor/common/config/commonEditorConfig.ts near line 117 would do the trick?

    I'm sorry, this is turning out to be a bit more difficult than I expected. The codebase is really large.

  8. hashhar commented on May 27, 2016

    @hashhar
    ContributorAuthor

    Got it working. I now need to integrate it properly. alexandrudima or Benjamin Pasero (@bpasero).

    You can see the patch here. I have some notes in the commit message regarding the next steps to take to integrate it properly.

    This is just a proof of concept, I am looking to add a new config setting which would be a boolean deciding if this behaviour would occur. And the value for the wrappingColumn (which I fixed to 80 right now) would then be read from the wrappingColumn property.

    What do you think about this approach and if there could any improvements be made, please suggest.

  9. hashhar commented on May 30, 2016

    @hashhar
    ContributorAuthor

    alexandrudima I am not able to get it to show in the default config file. How is the default config file generated?

    Nevermind, found it. Now all that's left is the smoke test to see if I broke anything.

  10. hashhar commented on May 30, 2016

    @hashhar
    ContributorAuthor

    I'm gonna send a PR. It works on my end.

  11. Fania commented on Jun 6, 2016

    @Fania

    Sounds great. Thanks for the effort!

  12. alexdima commented on Aug 29, 2016

    @alexdima
    Member

    Just merged the PR from Ashhar Hasan (@hashhar). Thank you Ashhar Hasan (@hashhar)!

  13. hashhar commented on Aug 29, 2016

    @hashhar
    ContributorAuthor

    Thanks.

  14. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions