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

Reformat Document & Minor Improvements #54

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sanssecours
Copy link
Member

@sanssecours sanssecours commented Apr 21, 2016

Hi,

this pull request adds

  • a new command: “Reformat Document”,
  • fixes some problems with commands if the default Python interpreter is a version of Python 3, and
  • changes the shortcut for “Documentation in Browser”.

If I there are any problems with the commits contained in this pull request, then please let me know.

Kind regards,
René

Before this change some commands would not work if `python` linked to a
recent version of Python (3.x) instead of the legacy version of Python
provided by Apple (2.x).
To format the current file via [yapf](https://github.com/google/yapf)
use the keyboard shortcut `^` + `⇧` + `H`.
The new shortcut is `⌥` + `⌘` + `H`. We changed the shortcut since now
“Reformat Document” uses the old shortcut `^` + `⇧` + `H`. This change
makes sense, since many other bundles use the latter shortcut to tidy
(LaTeX, Perl, HTML) or reformat (C, JavaScript, JSON) the current
document.
This new version of “Reformat Document” now also reformats “unsaved”
files. This means you can now also use the command on Python code in
the bundle editor.
@infininight
Copy link
Member

Unhappy with the error handling in the Reformat command, does YAPF ever provide helpful information here? Just seems like an entire page of unhelpful error message that really just makes it look like the command is broken.

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

Successfully merging this pull request may close these issues.

2 participants