ããã«ã¡ã¯ãæè¡ä¸èª²ã§OJTä¸ã®éç°ã§ããå
é±ãå½éèªç©ºå®å®å±ã«è¡ã£ã¦ãã¾ããã
æ°´æããéæã¾ã§ã¯é¢ä¿è
éå®ã§ãåæããã¯ä¸è¬å
¬éãããã®ã§ããã対ããµã¤ã«é²è¡è£
ç½®ã«ããªãã®äººã ãããã§ãã¦ãã¾ããã
ãã¦ãç§ã¯æ®æ®µãã¡ã¢ãåãã«ãç°¡åãªã·ã§ã«ã¹ã¯ãªãããæ¸ãã«ãMacã§ããã¹ãã¨ãã£ã¿ã¼ã®[Sublime Text]ãå©ç¨ãã¦ãã¾ããã10æããOJTã§æè¡ä¸èª²é
å±ã¨ãªããPythonãdjangoãå©ç¨ãã¦ç¤¾å
ã®æ¸ç±ç®¡çã·ã¹ãã ãæ§ç¯ãããã¨ã«ãªãã¾ããã
ãã®æ©ä¼ã«ãSublime TextãPythonéçºã«ä½¿ããããããã«ãã«ã¹ã¿ãã¤ãºãã¦ã¿ã¾ããã
package control
package controlã¨ã¯[Sublime Text]ã«æ§ã
ãªãã©ã°ã¤ã³ã追å ãããã¨ãã§ããæ©è½ã§ãã
package controlã追å ãã¦ãããã¨ã§å¿
è¦ãªãã©ã°ã¤ã³ãç°¡åã«installã§ããããã«ãªãã¾ãã
package controlã®installæ¹æ³ã»ä½¿ãæ¹
https://packagecontrol.io/installation
ããinstallã³ã¼ããåå¾ãã[Sublime Text]ä¸é¨ã®ã³ã³ã½ã¼ã«ã«ãã¼ã¹ããã¦ã¨ã³ã¿ã¼ãæ¼ãã¨installããã¾ãã
以å¾cmd+shift+p
ã§package controlãèµ·åã§ããããã«ãªãã¾ãã
packageã®å°å
¥ã¯ã package controlãéããInstall packageãé¸æå¾ã欲ããpackageãæ¤ç´¢ãã¦é¸æãã¨ã³ã¿ã¼ãæ¼ãã¨installãè¡ããã¾ãã
installãã¦ããã¨ä¾¿å©ãªpackage
[Python Flake8 Lint]
PEP8ãPyFlakesãå
¥ã£ã¦ããã®ã§PEP8ã¨ããPythonã®ã³ã¼ãã£ã³ã°è¦ç´ã«æ²¿ã£ã¦ããããè«ççã«ééãããªãããPythonã³ã¼ãã®ãã§ãã¯ããã¦ããã¾ãã
åé¡ãããã°ãã¬ã¼ã¿ã¼ã©ã¤ã³(左端ã®é¨å)ã§è¦åãåºãã¦ãããã®ã§ãééãã«æ°ã¥ããããã§ãã
[Git]
Gitã³ãã³ãã[Sublime Text]ä¸ã§ä¸éãè¡ããããã«ãªãã¾ãã
[PEP8 AutoFormat]
.pyãã¡ã¤ã«ã®ä¿åæã«èªåçã«PEP8ã«æ²¿ãããã«ä¿®æ£ãã¦ããã¾ãã
ã¨ã¯ãããLinterã«ææãããç¡é§ãªã¹ãã¼ã¹ãè¦éããã¨ãããã®ã§ããã®ãã©ã°ã¤ã³ã¯ããã¾ã§è£å©çãªãã®ã ã¨æã£ãæ¹ãè¯ãããã§ãã
[ConvertToUTF8]
Sublime Textã§ã¯UTF-8以å¤ã¯æååããã¦ãã¾ããã¨ãããã®ã§UTF-8ã«èªåå¤æãããã©ã°ã¤ã³ãå
¥ãã¦ããã¾ãã(Pythonã§ããUTF-8ãããã¯ASCIIãæ¨å¥¨ããã¦ãã¾ã)
[All Autocomplete]
Sublime Textã®ã³ã¼ãè£å®æ©è½ããããã«å¼·åãã¦ããã¾ãã
[AutoFileName]
ããã¸ã§ã¯ããã©ã«ãå
ã®ãã¡ã¤ã«åãè£å®ãã¦ããã¾ãã
imageãã¡ã¤ã«ã¯ç»åå¹
ã表示ãã¦ããã¾ãã
[SublimeREPL]
[Sublime Text]å
ã®ã¿ããterminalã®ããã«ä½¿ããããã«ãªãã¾ãã
å人çã«ã¯ãããã¤ããªã·ã§ããshellãèµ·åããã°ãterminalãããã§ãã
ã¡ãªã¿ã«REPLã¨ã¯Read-Eval-Print-Loopã®ç¥ã§å¯¾è©±åå®è¡ç°å¢ã®ãã¨ãæãã¾ãã
[SublimeFiles]
ã³ãã³ãã§ãã¡ã¤ã«æä½ãè¡ããããã«ãªãã¾ãã
macã®ããã©ã«ãã§ã¯ãcmd + ctl + n
ã§èµ·åãã¾ãã
ãã¡ã¤ã«ç§»åã«ãã¦ã¹æä½ãå¿
è¦ãªããªãã®ã§ã便å©ã§ãã
vim likeãªæä½ãã§ããããã«ã«ã¹ã¿ãã¤ãº
vimã¨ã¯ãlinuxãªã©ã«æ¨æºã§å
¥ã£ã¦ãããã¨ãå¤ãé«æ©è½ãªããã¹ãã¨ãã£ã¿ã§ãã
æä½ãç¹æ®ãªãã®ã®ãã«ã¼ã½ã«ç§»åãªã©ããã¼ãã¼ãã§å®çµããã®ã§æ
£ããã°é常ãããé«éã«ä½æ¥ãè¡ãã¾ãã
ãã®vimã®ç¹æ®ãªæä½ã[Sublime Text]ã§ãè¨å®ãå¤ããã°ç°¡åã«åç¾ãããã¨ãã§ãã¾ãã
ãã®ããã«ã¯ã¡ãã¥ã¼ãã¼ãã[Preferences] > [Settings]ãé¸æã以ä¸ãè¨å
¥ãã¾ãã
// ããã©ã«ãã§ã¯[vintage]ãæå®ããã¦ãã¾ããåé¤ãã¾ã "ignored_packages": [], // vim ã®ãã¼ãã¤ã³ããä½¿ç¨ "vintage_ctrl_keys": true, // æ°è¦ãã¡ã¤ã«ãéããããã¼ãã«ã¢ã¼ã "vintage_start_in_command_mode": true, // ã¤ã³ã¯ãããã¡ã¨ã¯ãªãããã¼ããåæ "vintage_use_clipboard": true,
次ã«ã[Preferences] > [Key Bindings]ãé¸æã以ä¸ããã¼ã¹ããã¾ãã
// ã¿ãã®åãæ¿ã { "keys": ["g", "t"], "command": "next_view", "context": [ { "key": "setting.is_widget", "operand": false }, { "key": "setting.command_mode" } ] }, { "keys": ["g", "T"], "command": "prev_view", "context": [ { "key": "setting.is_widget", "operand": false }, { "key": "setting.command_mode" } ] }, // ã¤ã³ãµã¼ãã¢ã¼ãããæãã { "keys": ["ctrl+j"], "command": "exit_insert_mode", "context": [ { "key": "setting.command_mode", "operand": false }, { "key": "setting.is_widget", "operand": false } ] }, { "keys": ["j","j"], "command": "exit_insert_mode", "context": [ { "key": "setting.command_mode", "operand": false }, { "key": "setting.is_widget", "operand": false } ] }, // ãã¸ã¥ã¢ã«ã¢ã¼ãããæãã { "keys": ["ctrl+j"], "command": "exit_visual_mode", "context": [ { "key": "setting.command_mode"}, { "key": "num_selections", "operand": 1}, { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": false } ] }
ããã ãã§ãvimã¨åãããã«æä½ãã§ãã¾ããç´ æ´ãããã§ããã
ããã¨ä¾¿å©ãªè¨å®é
[Sublime Text] â [Preferences]â [Settings]ãããã¯command + ,
ã«ã¦å種è¨å®ç»é¢ãéãã¾ãã以ä¸ãåèã¾ã§ã«ç§ã®è¨å®ã§ãã
{ "auto_indent": false, "color_scheme": "Packages/User/Cobalt (SL) (Flake8Lint).tmTheme", "detect_indentation": false, //ã¿ãã®ç©ºç½ã¯æ¨ªç·ããã¹ãã¼ã¹ã¯ç¹ã表示 "draw_white_space": "all", "font_size": 15, //ã«ã¼ã½ã«ã®ããè¡ããã¤ã©ã¤ã "highlight_line": true, //å¤æ´ããããã¡ã¤ã«ã®ã¿ãããã¤ã©ã¤ããç§ã®ç°å¢ã§ã¯ãå¤æ´ãå ããã¨ã¿ãåããªã¬ã³ã¸ã«ã "highlight_modified_tabs": true, //æªä¿åã®ãã¡ã¤ã«ããã£ã¦ã確èªããã«éããã次åèµ·åæã«ç·¨éå 容ããã¼ã«ãã㯠"hot_exit": true, "ignored_packages": [ ], //ã«ã¼ã©ã¼ã表示ãã¦80æåã«éãã¦ãããã©ããç®è¦ã§ãã§ãã¯ã§ããããã«ãã "rulers": [ 80 ], //ç·¨éä¸ã®ãã¡ã¤ã«ã®æ¹è¡ã³ã¼ãã表示 "show_encoding": true, //ç·¨éä¸ã®ãã¡ã¤ã«ã®æ¹è¡ã³ã¼ãã表示 "show_line_endings": true, "smart_indent": false, //ã¿ããæ¼ããéã«ã¹ãã¼ã¹ãå ¥åããã "translate_tabs_to_spaces": true, //[Enter]ãæ¼ããæã«ã空è¡ã«æ¿å ¥ããã¦ããç¡é§ãªã¤ã³ãã³ããåãé¤ã "trim_automatic_white_space": true, //æ«å°¾ã«ä¸è¦ãªã¹ãã¼ã¹ãå ¥ã£ã¦ããã¨ä¿åæã«åé¤ "trim_trailing_white_space_on_save": true, //vim likeãªåä½ãããããã®è¨å® "vintage_ctrl_keys": true, "vintage_start_in_command_mode": true, "vintage_use_clipboard": true, }
å人çã«ã¯ãã¿ãããã¤ã©ã¤ããããæ©è½ã好ãã§ããæãå ããããããããããããã«ãã³ã¤ã¤ã
ãã¾ã
terminalããsubl
ã¨æã¤ã¨[Sublime Text]ãéããããã«
PATHãéã£ã¦ãããã£ã¬ã¯ããªã«[sublime text]ã®ãã¤ããªã®ã·ã³ããªãã¯ãªã³ã¯ãè²¼ããã¨ã§ã§ããããã«ãªãã¾ãã
[Sublime Text]ã¯æ«å°¾ã«2ã ã£ãã3ãä»ãã¦ããå ´åãããã®ã§ããã¾ããããªãå ´åã¯ã¢ããªã±ã¼ã·ã§ã³ãã©ã«ãã確èªãã¦ã¿ã¦ãã ããã
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
ä¸è¨ãå®è¡å¾subl
ã§èµ·åsubl title
ã§ãã¡ã¤ã«åãæå®ãã¦èµ·å subl .
ã§ã«ã¬ã³ããã£ã¬ã¯ããªã§èµ·åã§ãã¾ãã
[Sublime Text]ããterminalãctrl+shift+T
ã§éã
package controlãã[terminal]ãinstallããã ãã§ããã«ã¬ã³ããã£ã¬ã¯ããªã§éãã¾ããããªã便å©ã§ãã
Sublime TextããPythonãå®è¡ãã
[Tools] â [build system] â [Python]ãé¸æãã¦ããã°ãcmd + b
ãæ¼ãã ãã§å®è¡ã§ããããã«ãªãã¾ãã
æå¾ã«
007ãé¢ç½ãã§ãããã ã¸ã§ã¼ã ãºã»ãã³ãå½¹ããã¨ã«ã»ã¯ã¬ã¤ã°ãä½ä¸ã ãã§ãªãç§çæ´»ã§ãã¢ãã¢ããªã®ã羨ã¾ããã»ã»ã»