[PYTHON] PyCharm begins

This is my first post on Qiita. I don't think it's useful because it's too much memorandum, but I'm sorry.

I wanted to use PyCharm, so I searched for the settings I wanted and set it up to the point where it could be used.

The latest version seems to be PyCharm4.

Operating environment

Installation

With homebrew-cask included

$ brew cask install pycharm-ce

#For professional version
$ brew cask install pycharm

Make a project

Create with Cleate New Project from the quick menu that appears after starting. Next comes a list of interpreters. It also provides a virtual environment for virtualenv. It's the best.

Works with git

It seems that if you open the local repository of git in advance by opening the project, it will be recognized. In that case, select ʻOpen ...` from the quick start and specify the repository folder. Add a pycharm (intellj?) File when opened? It is said, but it is better not to remove all and add.

appearance

You can do this from Preference> ʻAppearance and Behavior> Theme`. I like darkness, so I specified "Darcula".

Color scheme

The color scheme is set with Preferance> ʻEditor> Color & Font`.

By default, monokai is included, but there are few, so let's add it.

Since it is also possible to set from scratch, DL the published theme

Color Themes

I used "Solarized Dark." Here. I like Solarized Dark

Color Themes Solarized Dark.

To do this, load the downloaded jar file with Pycharm's File> Import Setting.

After that, proceed with the dialog appropriately and adapt. Then specify the color scheme installed from Scheme Name.

ref: https://www.jetbrains.com/pycharm/help/colors-and-fonts.html

Font change

This is also done in the same place as the color scheme.

Color & Font can be set for each theme, but the default and imported settings are immutable. Themes can be duplicated, and when duplicated, fonts and detailed settings can be set.

Make a copy of the theme with the "Save As" button from the Color & Font screen. Give it a name.

After that, specify the font from the item of Font. I like Rounded M + so I set it. You can also set line heigth, so do whatever you want.

ref: https://www.jetbrains.com/pycharm/help/colors-and-fonts.html

Line number display, display of special characters such as spaces

You can also do this.

It is possible from ʻEditor> General> ʻAppearance.

For line numbers, check Show line numbers.

The blank display is Show white spaces.

ref: https://www.jetbrains.com/pycharm/help/editor-appearance.html

What is the change in the project interpreter environment?

It can be changed in the part of Preferance>Project: [project-name]. You can change it from Project interpreter.

To my surprise, you can also check the version of the module inside the interpreter to see the latest version. I haven't confirmed it yet, but could I upgrade?

You can also create a virtualenv environment from the gear icon. Somehow it's already exhausted.

ref: https://www.jetbrains.com/pycharm/help/project-interpreter.html?search=project

The description of the file encoding is

This is common

# -*- coding: utf-8 -*-

# write code...

This. I like this one better.

# coding=utf-8

# write code...

I want this to be automatically included when I create a Python file. How do you do it?

From Preferance> ʻEditor> File and Code Templates`, select the Python Script item and change it appropriately with the input items on the right side.

ref: https://www.jetbrains.com/pycharm/help/creating-and-editing-file-templates.html?search=template

I want to use more and more

Can I write a script for the time being? I tried to set it up to about.

The first thing that surprised me was that it checks pep8 as standard. Convenient. Wonderful.

How many more features do you have? What's New (announcement of development blog because I could not see it by specifying the version on the top page), It seems that ipynb can also be used. I'm still not sure what's amazing. Let's see the atmosphere by watching the introductory video of youtube.

http://youtu.be/639hcsfR4vU

It's a Community Edition, but it's a quality that makes you want to buy a paid license.

I should have used it earlier > <

Recommended Posts

PyCharm begins
Tkinter begins
Jupyter begins
Poetry begins
pycharm shortcut
Pycharm memo
pycharm shortcut
Django begins part 1
Jupyter Lab begins
Override Pycharm typeshed
PyCharm Preferences Note
PyCharm code interpolation