主题:
pycharm
开发利器,减少编写错误代码的可能性,遵从PEP8编码规范.
- 配置
- 设置
- 安装模块
- 快捷键
- Git 版本控制
1. 配置
setting--> project --> project Interpreter
- 添加模块
- 选择python解释器
- 创建独立虚拟环境
添加模块:如Django

选择python解释器

创建虚拟环境

2. 设置
File -->> Setting -->> Editor -->> File and Code Templates -->> Python Script
- 创建python文件模板
创建python文件模板

模板具体内容:
#!/usr/bin/env python
# encoding: utf-8
"""
__author__: ${USER}
__software__: ${PRODUCT_NAME}
__project__:${PROJECT_NAME}
__file__: ${NAME}
__time__: ${DATE} ${TIME}
"""
class Main(object):
def __init__(self):
pass
if __name__ == '__main__':
pass
示例:

3. 主题
也许有人会对pycharm主题配色感兴趣,毕竟暗黑的风格很具神秘感:
主要包括:1. 主题 2. 代码编辑界面字体、大小 和 控制台字体、大小 3. 代码间距
- 主题:Darcula
- 字体:编辑界面:Lucida Console ; 控制台:Comic Sans Ms
- 大小:编辑界面:size: 16 ; 控制台:size: 14
- Line spacing: 编辑界面:1.2 ~ 1.4 之间; 控制台:1.0
示例:

效果图:

4. 快捷键
常用:
key | meaning |
---|---|
1. ctrl + / | 注释;取消注释 |
2. ctrl + B | 函数实现定义; 定位函数位置 |
3. ctrl + Q | 文档 |
4. shift + F10 | run |
5. ctrl + D | 复制 |
6. shift + shift | 全局搜索 |
7. ctrl + F | 搜索 |
8. F3 | next |
9. shift + F3 | previous |
10. ctrl + R | replace |
11. ctrl + shift + F7 | 高亮 |
12. ctrl + N | 快速跳至某类 |
13. ctrl +[/ ] | 快速跳转代码块首尾 |
15. alt + delete | safe delete |
16. alt + enter | 查看pycharm提示 |
17. Ctrl+Alt+T | Code→Surround with |
18. Shift+F6 | Rename |

5. Git 版本控制
- 傻瓜式...略
- 还是偏好命令行式
示例:

网友评论