PyCharm 2.7 — Back to core Python
PyCharm is, first and foremost, a Python IDE. While we work hard to provide you with the best possible support for web development with Django, GAE or Flask, we never forget about Python, the language that powers these great technologies. The changes in PyCharm 2.7 are case in point.
New Python Refactorings
Two new must-have refactoring tools have been added to the existing set to help you maintain your code:
- Change Method Signature allows you to easily update a method and all its calls in your project.
- Extract Parameter instantly adds another parameter to a method signature by extracting it from the method body and correcting all usages inside the body.
Smarter Code Completion
Among the challenges of providing reasonable code assistance for a dynamic language there is detecting type information from the code. PyCharm has always done a good job figuring this out, but starting with this update PyCharm is capable of collecting type information at runtime from the debugger. The IDE makes use of this information to improve code completion suggestions, code insight and quick documentation popups.
This feature is enabled manually via the Python Debugger settings.
NOTE: This feature may affect debugger performance, so use it with care.
More Convenient Editor
If you want your code to comply with PEP 8 style guide, PyCharm can continuously verify that for you even as you're editing the code. The IDE runs pep8.py in background and highlights the coding style violations on the fly. In each particular case, you can either reformat the file or disable specific types of errors produced by pep8.py using quick-fix options.
The good old 'Extract Variable' or 'Extract Constant' refactorings, when invoked on a selected fragment of a string literal, will now correctly replace the selected fragment with a formatting operation referencing the extracted variable.
PyCharm 2.7 recognizes Python code in your doctests, providing syntax highlighting and even code insight. It also understands code in doctests when performing different automatic code manipulations. For example, imports optimization now considers import statements required by doctests.
Better Remote Configuration
Native Vagrant integration in PyCharm makes it much easier to configure a remote interpreter and FTP deployment if you run your development environment in a VM using Vagrant.
The SSH Console: Once you have a remote interpreter configured, you can use the "Tools | Run SSH Console..." action to open a console connected to the remote machine. PyCharm comes with a complete terminal emulation environment — you can even run vim in it if you like.
Django 1.5 Support
To support those who stay on the cutting edge, PyCharm 2.7 ensures compatibility with the latest version of Django (not even released as of Feb 7, 2013), including support for new things such as the verbatim block tag.
Vim Emulation Plugin Improvements
We know that breaking old habits can be painful. So, great news for those who've gotten used to Vim — our IdeaVim plugin for Vi emulation inside the IDE has been significantly improved with the following new features:
- String object selection motions added
- Support for pasting from register in command mode now available
- The last change position mark supported
- Key bindings for pasting into command line added
- And more »
Note that the Vim plugin is not bundled with PyCharm and needs to be installed separately from the plugin manager.
TextMate Bundles Support
PyCharm natively supports many different file types, providing syntax highlighting and other goodies. But sometimes it gets hard to cope with a whole variety of them. So for other programming languages and other text file types in use nowadays, we introduced syntax highlighting based on TextMate bundles (also used by Sublime Text). Now you can enjoy good quality syntax highlighting as you work with such files, even if they lack native support in PyCharm.
Note: PyCharm currently only uses TextMate bundles for syntax highlighting. Depending on demand, we may extend this support with snippets or menu commands in the future.
Sass and LESS language improvements
Sass stylesheets are now even more awesome in PyCharm with the following added features:
- Custom function definition, completion and renaming support
- Highlighting for incorrect @-keyword
- Support of nested properties, and more
LESS support now includes code insight for mix-ins and many other improvements.
Updated Look and Feel &
New Dark UI
Like all other products based on the IntelliJ Platform, PyCharm 2.7 comes with a fresh look and feel, as well as Darcula, a new native dark UI theme for the IDE and the editor.
The 'Test RESTful Web Service' tool from IntelliJ IDEA is now available in PyCharm and provides an easy-to-use UI for running HTTP requests against Web services and displaying results returned in XML, JSON and other formats.
If you're a happy owner of a new MacBook, feast your eyes on a set of new Retina-adapted icons.