Skip to content

style active unsaved file #235

Closed
Closed

Description

@lorenzwalthert

Adapting the function style_active_file(). Implementation similar to #143 (i.e. via rstudioapi::modifyRange()) so unsaved files can be styled too.

Activity

  1. added this to the milestone on Oct 11, 2017
  2. added a commit that references this issue on Oct 12, 2017
    7667bd2
  3. lorenzwalthert commented on Oct 13, 2017

    @lorenzwalthert
    CollaboratorAuthor

    I think in order to keep the API consistent, the behaviour of the Addins to style a highlighted region and styling an active file should be the same with regard to unsaved changes, so I suggest to use rstudioapi throughout. The other question is whether the styled file should be saved or not. I think if we use rstudioapi, and the file contains unsaved changes, this won't be the case.

  4. lorenzwalthert commented on Oct 13, 2017

    @lorenzwalthert
    CollaboratorAuthor

    I think we could also use a global option on which we make saving after styling conditional. I implemented that in strcode. See R/zzz.R and how the option is remembered.

  5. added a commit that references this issue on Oct 26, 2017
    066c68f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions