sublime安装笔记

今天需要在win8上装个sublime,参考osx上的sublime从头配置了一下,把过程记录了下来。

首先要 python, php, nodejs, git,为了避免不必要的麻烦,安装目录一定不要带空格,不用中文目录,并添加到系统PATH变量。

安装Package Control

https://packagecontrol.io/installation

菜单 Preferences->Settings – User

打开用户配置输入如下内容:

{
    "auto_complete": true,
    "color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme",
    "file_exclude_patterns":
    [
        ".tags",
        ".tags_sorted_by_file",
        ".gitattributes",
        ".gitignore",
        "*.pyc",
        "*.pyo",
        "*.exe",
        "*.dll",
        "*.obj",
        "*.o",
        "*.a",
        "*.lib",
        "*.so",
        "*.dylib",
        "*.ncb",
        "*.sdf",
        "*.suo",
        "*.pdb",
        "*.idb",
        ".DS_Store",
        "*.class",
        "*.psd",
        "*.db"
    ],
    "folder_exclude_patterns":
    [
        ".svn",
        ".git",
        ".hg",
        "CVS"
    ],
    "font_face": "Courier New",
    "font_size": 11,
    "ignored_packages":
    [
    ],
    "rulers":
    [
        80
    ],
    "scroll_past_end": true,
    "show_full_path": true,
    "tab_size": 4,
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": false,
    "word_wrap": false,
    "wrap_width": 120
}

菜单 Preferences->KeyBindings – User

打开快捷键配置,输入如下内容

[
    // Convert to expanded format
    {
        "keys": ["ctrl+alt+["],
        "command": "css_format",
        "args": {
            "action": "expand"
        }
    },

    // Convert to compact format
    {
        "keys": ["ctrl+alt+]"],
        "command": "css_format",
        "args": {
            "action": "compact"
        }
    },

    // Compress
    {
        "keys": ["ctrl+alt+\\"],
        "command": "css_format",
        "args": {
            "action": "compress"
        }
    }

    // {
    //  "keys": ["j", "j"], "command": "exit_insert_mode",
    //  "context":
    //  [
    //      { "key": "setting.command_mode", "operand": false },
    //      { "key": "setting.is_widget", "operand": false }
    //  ]
    // }
]

安装Package

  • ConvertToUTF8
  • CSS Format
  • DocBlockr
  • FileDiffs
  • HTML-CSS-JS Prettify
  • INI
  • MarkDown Preview
  • nginx
  • phpfmt
  • PhpNamespace
  • Puppet
  • SublimeCodeIntel
  • SublimeLinter
  • SublimeLinter-csslint
  • SublimeLinter-jshint
  • SublimeLinter-json
  • SublimeLinter-php
  • Theme – Soda
  • Volt

Tools->Build System->New Build System…

支持php内容如下

{
    "cmd": ["php", "$file"]
}

保存到C:\Users\zhaoyi\AppData\Roaming\Sublime Text 3\Packages\User\php.sublime-build

git

    原文作者:zhaoyi
    原文地址: https://segmentfault.com/a/1190000002771131
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞