美文网首页
mac--coding environment

mac--coding environment

作者: amazing_bing | 来源:发表于2016-09-08 16:45 被阅读0次

    mac environment configure


    install pip

    如果提示要升级执行以下命令,更新来源:
    pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
    python get-pip.py
    

    java and flash install

    install brew

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    install macdown

    Brew cask install macdown
    

    install sublime

    add headline notes

    新建文件 common_head.py (~/Library/Application Support/Sublime Text 3/Packages/User)

    import sublime, sublime_plugin
    import datetime
    
    class PyHeadCommand(sublime_plugin.TextCommand):
        def run(self, edit):
            self.view.run_command("insert_snippet",
                {
                    "contents":"# -*- coding:utf-8 -*- \n"
                    "#!/user/bin python\n"
                    "#Description: Description \n"
                    "#Author:      Bing\n"
                    "#Email:       amzing_bing@outlook.com\n"
                    "#DateTime:    ""%s" %datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +"\n"
                }
            )
    
    class JavaHeadCommand(sublime_plugin.TextCommand):
        def run(self,edit):
            self.view.run_command("insert_snippet",
                {
                    "contents":"/**""\n"
                    " * @Author:      Bing""\n"
                    " * @Email:       xx@xx.com\n"
                    " * @DateTime:    ""%s" %datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +"\n"
                    " * @Description: Description ""\n"
                    " */""\n"
                }
    
            )
    class ShHeadCommand(sublime_plugin.TextCommand):
        def run(self,edit):
            self.view.run_command("insert_snippet",
                {
                    "contents":"#!/bin/sh""\n"
                    "# @Author:       Bing""\n"
                    "# @Email:        xx@xx.com\n"
                    "# @DateTime:     ""%s" %datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") +"\n"
                    "# @Description:  Description ""\n"
                }
            )
    

    在 keybind_users 里面添加

    {"command":"py_head","keys":["ctrl+1"]}, 
    {"command":"java_head","keys":["ctrl+2"]}, 
    {"command":"sh_head","keys":["ctrl+3"]}, 
    { "keys": ["ctrl+4"], "command": "toggle_comment", "args": { "block": true } },
    {"keys": ["alt+d"], "command": "code_intel_auto_complete" }
    

    安装插件管理器

    ctrl+` 打开调试窗口,在输入框内粘贴如下代码,然后回车即可自动安装,安装完成可能需要重启ST

    import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
    

    install plugins

    ctrl+shift+p type "install package",then type plugin name "SublimeLinter"

    Sublimelinter
    Emmet
    Brackethighlighter
    SideBarEnhancements
    Better Completion

    install Theme

    Watson

    user_configure

    {
        "bold_folder_labels": true,
        "color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
        "default_encoding": "UTF-8",
        "disable_tab_abbreviations": true,
        "draw_minimap_border": true,
        "ensure_newline_at_eof_on_save": true,
        "font_face": "YaHei Consolas Hybrid",
        "font_size": 14,
        "highlight_line": true,
        "ignored_packages":
        [
            "SublimeLinter",
            "Vintage"
        ],
        "tab_size": 4,
        "theme": "Watson.sublime-theme",
        "use_current_file_syntax": true,
        "word_wrap": true,
        "remember_open_files": true
    
    }
    

    install wget or git

    brew install wget
    brew install git
    

    iterm2

    相关文章

      网友评论

          本文标题:mac--coding environment

          本文链接:https://www.haomeiwen.com/subject/vigsettx.html