PyCharm 配置

安装PyCharm

brew cask install pycharm

配置

Apperance & BBehavior->Apperance

Theme Darcula

Keymap

Mac OS X 10.5+

项目中更改python版本

Preferences->Project:()->Project Interpreter

设置字体大小

Preferences->Editor->Font
Size:20

Font: Menlo

添加python file 模版|File Templates

Preferences->Editor->File and Code Templates->Python Script

1
2
3
4
#!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'ovwane'
__time__ = '${YEAR}.${MONTH}.${DAY} ${HOUR}:${MINUTE}'

配置 Pipenv 环境

Configure a Pipenv environment

1
python -m site --user-base

虚拟环境存放位置:$HOME/.local

插件

.ignore

.ignore插件忽略不必要提交的文件

Rainbow Brackets

彩虹颜色的括号 看着很舒服 敲代码效率变高。

isort

isort Plugins,import 导入模块排序。

参考

如何在IntelliJ IDEA中使用.ignore插件忽略不必要提交的文件

PyCharm使用心得

PyCharm 配置autopep8

安装参考

pip3 install autopep8

1
2
3
4
5
6
7
8
9
jinlong  ~  pip3 install autopep8
Collecting autopep8
Downloading autopep8-1.3.2-py2.py3-none-any.whl (42kB)
100% |████████████████████████████████| 51kB 19kB/s
Collecting pycodestyle>=2.3 (from autopep8)
Downloading pycodestyle-2.3.1-py2.py3-none-any.whl (45kB)
100% |████████████████████████████████| 51kB 24kB/s
Installing collected packages: pycodestyle, autopep8
Successfully installed autopep8-1.3.2 pycodestyle-2.3.1

pip3 show autopep8

Ruby 配置

rbenv

1
git clone https://github.com/rbenv/rbenv.git ~/.rbenv

环境变量

1
echo 'export PATH="$HOME/.rbenv/bin:$PATH"\neval "$(rbenv init -)"' >> ~/.zshrc

ruby-build

1
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build

环境变量

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
export PATH="${HOME}/.rbenv/shims:${PATH}"
export RBENV_SHELL=zsh
source '${HOME}/.rbenv/libexec/../completions/rbenv.zsh'
command rbenv rehash 2>/dev/null
rbenv() {
local command
command="${1:-}"
if [ "$#" -gt 0 ]; then
shift
fi

case "$command" in
rehash|shell)
eval "$(rbenv "sh-$command" "$@")";;
*)
command rbenv "$command" "$@";;
esac
}

查看 ruby 版本

1
rbenv install -l

安装 ruby

1
rbenv install 2.6.0
,