Chinaunix首页 | 论坛 | 博客
  • 博客访问: 21082
  • 博文数量: 12
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 95
  • 用 户 组: 普通用户
  • 注册时间: 2015-04-25 10:00
文章分类
文章存档

2015年(12)

我的朋友

分类: Python/Ruby

2015-04-25 10:12:25

1.设置默认PyCharm解析器

操作如下:

Python–>Preferences–>Project Interpreter–>Python Interpreter 点击“+”号选择系统安装的Python。

然后再返回Project Interpreter,选择刚添加的解释器。


2.设置缩进符为制表符“Tab”

  File -> Default Settings -> Code Style
  -> General -> 勾选“Use tab character”
  -> Python -> 勾选“Use tab character”
  -> 其他的语言代码同理设置

3.设置IDE皮肤主题

  File -> Settings -> IDE Settings -> Appearance -> Theme -> 选择“Alloy.IDEA Theme”

4.显示“行号”与“空白字符”

  File -> Settings -> IDE Settings -> Editor -> Appearance
  -> 勾选“Show line numbers”、“Show whitespaces”、“Show method separators”

5.设置编辑器“颜色与字体”主题

  File -> Settings -> IDE Settings -> Editor -> Colors & Fonts -> Scheme name -> 选择“Darcula”
  说明:先选择“Darcula”,再“Save As”一份,命名为“qianyunlai.com”,因为默认的主题是“只读的”,一些字体大小颜色什么的都不能修改,拷贝一份后方可修改!

  修改字体大小
  File -> Settings -> IDE Settings -> Editor -> Colors & Fonts -> Font -> Size -> 设置为“14”

6.去掉默认折叠

  File -> Settings -> IDE Settings -> Editor -> Code Folding -> Collapse by default -> 全部去掉勾选 

7.“代码自动完成”时间延时设置

  File -> Settings -> IDE Settings -> Editor -> Code Completion 
  -> Auto code completion in (ms):0
  -> Autopopup in (ms):500

8.修改IDE快捷键方案

  File -> Settings -> IDE Settings -> Keymap
  系统自带了好几种快捷键方案,下拉框中有如“defaul”,“Visual Studio”,在查找Bug时非常有用,“NetBeans 6.5”,“Default for GNOME”等等可选项,
  因为“Eclipse”方案比较大众,个人用的也比较多,最终选择了“Eclipse”。 

  还是有几个常用的快捷键跟Eclipse不一样,为了能修改,还得先对Eclipse方案拷贝一份: 

  (1).代码提示功能,默认是【Ctrl+空格】,现改为跟Eclipse一样,即【Alt+/】

  Main menu -> code -> Completion -> Basic -> 设置为“Alt+/”
  Main menu -> code -> Completion -> SmartType -> 设置为“Alt+Shift+/”
  不过“Alt+/”默认又被 
  Main menu -> code -> Completion -> Basic -> Cyclic Expand Word 占用,先把它删除再说吧(单击右键删除)!

  (2).关闭当前文档,默认是【Ctrl+F4】,现改为跟Eclipse一样,即【Ctrl+W】

  Main menu -> Window -> Active Tool Window -> Close Active Tab -> 设置为 “Ctrl+F4”;
  Main menu -> Window -> Editor -> Close -> 设置为 “Ctrl+W”;

 

pycharm修改代码模板支持中文输出

python默认不支持中文输出,需要在py的开头添加
 
#coding: utf-8 

在pycharm里面,选项,ide settings,file and code templates,选择python script,添加#coding: utf-8即可。

阅读(2108) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~