Sublime Text 3(ST3) Python 개발환경 설정하기
맥에서 사용하는 Sublime Text 3 를 파이썬 개발 환경으로 사용하기 위한 설정에 대해 정리
ST3 다운로드 및 인스톨
패키지 인스톨러 설치
링크 생성
$ sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/bin/subl
테마 다운로드
인스톨 패키지를 이용하여 설치.
- Flatland
환경설정
사용자 설정
경로: Preferences > Settings – User
{ "auto_complete": false, "auto_complete_commit_on_tab": true, "auto_match_enabled": true, "bold_folder_labels": true, "caret_style": "solid", "color_scheme": "Packages/Theme - Flatland/Flatland Dark.tmTheme", "detect_indentation": true, "draw_indent_guides": true, "ensure_newline_at_eof_on_save": true, "file_exclude_patterns": [ "*.DS_Store", "*.pyc", "*.git" ], "find_selected_text": true, "fold_buttons": false, "folder_exclude_patterns": [], "font_face": "Menlo", "font_options": [ "no_round" ], "font_size": 13, "highlight_line": true, "highlight_modified_tabs": true, "ignored_packages": [ "Vintage" ], "indent_to_bracket": true, "line_padding_bottom": 0, "line_padding_top": 0, "match_brackets": true, "match_brackets_angle": false, "match_brackets_braces": true, "match_brackets_content": true, "match_brackets_square": true, "new_window_settings": { "hide_open_files": true, "show_tabs": true, "side_bar_visible": true, "status_bar_visible": true }, "remember_open_files": true, "remember_open_folders": true, "save_on_focus_lost": true, "scroll_past_end": false, "show_full_path": true, "show_minimap": false, "tab_size": 2, "theme": "Flatland Dark.sublime-theme", "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, "use_simple_full_screen": true, "vintage_start_in_command_mode": false, "wide_caret": true, "word_wrap": true }
Python 환경 설정
- 경로: Preferences > Settings – User 설정 파일 위치와 동일한 위치
- 파일명: Python.sublime-settings
{ "draw_white_space": "all", "auto_indent": true, "rulers": [ 79 ], "smart_indent": true, "tab_size": 4, "trim_automatic_white_space": true, "use_tab_stops": true, "word_wrap": true, "wrap_width": 80 }
플러그인 설치
SideBarEnhancements
Anacoda
- Lint 제거Preferences > Package Setting > Anaconda > User – Setting {“anaconda_lint” : false}
- 단축키
- Goto Definition: ctrl + alt + g
- Find Usages : ctrl + alt + f
- Get Documentation: ctrl + alt + d
SublimeLinter-pep8 and SublimeLinter-pyflakes
GitGutter
SublimeREPL
- 단축키 생성 방법
- SublimeREPL.sublime-build 파일 생성
경로: ~/Application Support/Sublime Text 3/Packages/User - SublimeREPL.sublime-build 설정 내용 추가
- command + b 빌드 결과 출력 여부 확인
{ "target": "run_existing_window_command", "id": "repl_python_run", "file": "config/Python/Main.sublime-menu" }
- SublimeREPL.sublime-build 파일 생성
- 단축키
- Goto Definition: ctrl + alt + g
- Find Usages : ctrl + alt + f
- Get Documentation: ctrl + alt + d