美文网首页我爱编程
Sublime使用,安装插件

Sublime使用,安装插件

作者: 七百年前 | 来源:发表于2017-01-04 17:51 被阅读1315次

    1.安装Package Control

    从菜单 View - Show Console 或者 ctrl + ~ 快捷键,调出 console。将以下 Python 代码粘贴进去并 enter 执行,不出意外即完成安装。

    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())
    

    手动安装:
    可能由于各种原因,无法使用代码安装,那可以通过以下步骤手动安装Package Control:
    1.点击Preferences > Browse Packages菜单
    2.进入打开的目录的上层目录,然后再进入Installed Packages/目录
    3.下载 Package Control.sublime-package 并复制到Installed Packages/目录
    4.重启Sublime Text。

    使用方法:
    快捷键 Ctrl+Shift+P(菜单 – Tools – Command Paletter),输入 install 选中Install Package并回车,输入或选择你需要的插件回车就安装了(注意左下角的小文字变化,会提示安装成功)。

    2.安装CodeFormatter插件

    在启动Sublime Text 3程序后,使用快捷键 “ Ctl+Shift+P ”,再选择 "Package Control: Install Package"

    如果想对PHP格式化,需要PHP5.6以上版本,而且需要配置sublime的(package setttings > codeFormatter >settings default

    "codeformatter_php_options": {
        "syntaxes": "php", // Syntax names which must process PHP formatter
        "php_path": "D:/phpstudy/php/php-5.6.27-nts/php.exe", // Path for PHP executable, e.g. "/usr/lib/php" or "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments
        "format_on_save": false, // Format on save
        "php55_compat": false, // PHP 5.5 compatible mode
        "psr1": false, // Activate PSR1 style
        "psr1_naming": false, // Activate PSR1 style - Section 3 and 4.3 - Class and method names case
        "psr2": true, // Activate PSR2 style
        "indent_with_space": 4, // Use spaces instead of tabs for indentation
        "enable_auto_align": true, // Enable auto align of = and =>
        "visibility_order": true, // Fixes visibility order for method in classes - PSR-2 4.2
        "smart_linebreak_after_curly": true, // Convert multistatement blocks into multiline blocks
        // Enable specific transformations. Example: ["ConvertOpenTagWithEcho", "PrettyPrintDocBlocks"]
        // You can list all available transformations from command palette: CodeFormatter: Show PHP Transformations
        "passes": [],
        // Disable specific transformations
        "exclude": []
    },
    

    3.安装主题美化
    https://github.com/ihodev/sublime-boxy
    安装方法:Ctrl(Mac下Cmd)+Shift+P

    1. install package -> Boxy Theme
    2. install package -> a File Icons
      BOXYBOXY
      ReleaseRelease DownloadsDownloads Build StatusBuild Status TwitterTwitter Make a donation at patreon.comMake a donation at patreon.com
      A set of easy customizable interface and syntax themes for Sublime Text 3 3103+. Comes in, both, light and dark variations. There are dozens of options that enable you to personalize your experience with Boxy Theme
      , don't forget to check them out.
      Want to contribute some code? Excellent! Read up on our guidelines.
      If you have some problems, first search for a similar issue, and then report with new one. Please read the Known Issues section before reporting a new one.
      Want to learn more? See the wiki →.
      InstallationActivationIconsSkinsSettingsReferencesForumPackage ControlShare The Love
      [

    ](https://github.com/ihodev/sublime-boxy#installation)Installation
    The easiest way to install is using Package Control, where Boxy is listed as **Boxy Theme
    **.
    Open Command Palette
    using menu item Tools → Command Palette...

    Choose Package Control: Install Package

    Find Boxy Theme
    and hit Enter

    Restart Sublime TextmacOS : menu item Sublime Text → Quit Sublime Text

    Windows: menu item File → Exit

    Linux : menu item File → Exit

    Read more →
    [

    ](https://github.com/ihodev/sublime-boxy#activation)Activation
    Activate the UI theme and color scheme by modifying your user preferences file, which you can find using the menu itemPreferences → Package Settings → Boxy Theme → Preferences
    .
    Also you can use commands provided by the theme:
    Open Command Palette
    using menu item Tools → Command Palette...

    Choose Boxy Theme: Activation
    or Boxy Theme: Configuration

    Hit Enter

    DON'T FORGET TO RESTART SUBLIME TEXT AFTER ACTIVATING THE THEME.

    Read more →
    [

    ](https://github.com/ihodev/sublime-boxy#icons)Icons
    Starting 5.0.0 this theme requires A File Icon package for enhanced support of the file-specific icons. Please install the package and restart Sublime Text.
    [

    ](https://github.com/ihodev/sublime-boxy#skins)Skins
    You can activate skins by using commands provided by Skins package:
    Open Command Palette
    using menu item Tools → Command Palette...

    Choose Select Skin
    to change the skin
    Choose Boxy Theme: Activation
    or Boxy Theme: Configuration
    to change the UI theme and color scheme

    Or do this manually by modifying your user preferences file, which you can find using the menu item Preferences → Package Settings → Boxy Theme → Preferences
    .
    DON'T FORGET TO RESTART SUBLIME TEXT AFTER ACTIVATING THE SKIN.

    [

    ](https://github.com/ihodev/sublime-boxy#boxy-monokai--predawn)Boxy Monokai ★ Predawn
    Note: This skin is heavily inspired by Predawn Theme. Install or support original if it better fits your needs.

    Boxy Monokai ★ PredawnBoxy Monokai ★ Predawn
    The screenshot above shows next options in action:
    // Activation"color_scheme": "Packages/Boxy Theme/schemes/Boxy Monokai.tmTheme","theme": "Boxy Monokai.sublime-theme",

    // Settings"theme_accent_tangerine": true,"theme_autocomplete_item_selected_colored": true,"theme_bar_margin_top_sm": true,"theme_dropdown_atomized": true,"theme_find_panel_close_hidden": true,"theme_icon_button_highlighted": true,"theme_panel_switcher_atomized": true,"theme_quick_panel_item_selected_colored": true,"theme_quick_panel_size_md": true,"theme_scrollbar_colored": true,"theme_scrollbar_line": true,"theme_sidebar_close_always_visible": true,"theme_sidebar_folder_atomized": true,"theme_statusbar_size_md": true,"theme_tab_close_always_visible": true,"theme_tab_selected_overlined": true,"theme_tab_size_md": true,

    The operating system is Windows. The font used for the code is Operator Mono.
    Installed packages:
    Bracket Highlighter
    Sublime Linter

    [

    ](https://github.com/ihodev/sublime-boxy#boxy-nova--minimal)Boxy Nova ★ Minimal

    Boxy Nova ★ MinimalBoxy Nova ★ Minimal
    The screenshot above shows next options in action:
    // Activation"color_scheme": "Packages/Boxy Theme/schemes/Boxy Nova.tmTheme","theme": "Boxy Nova.sublime-theme",

    // Settings"theme_accent_mono": true,"theme_button_rounded": true,"theme_find_panel_close_hidden": true,"theme_find_panel_size_xs": true,"theme_grid_border_size_sm": true,"theme_icons_atomized": true,"theme_minimap_viewport_opacity_xh": true,"theme_sidebar_folder_arrow": true,"theme_sidebar_heading_bold": true,"theme_sidebar_highlight_selected_text_only": true,"theme_sidebar_highlight_text_only": true,"theme_sidebar_indent_top_level_disabled": true,"theme_sidebar_indent_xl": true,"theme_size_md": true,"theme_tab_arrows_hidden": true,"theme_tab_close_always_visible": true,"theme_unified": true

    The operating system is Windows. The font used for the code is Consolas. The UI font is Consolas (via addon).
    Installed packages:
    Boxy Theme Addon - Font Face
    Bracket Highlighter
    A File Icon

    [

    ](https://github.com/ihodev/sublime-boxy#boxy-ocean--material)Boxy Ocean ★ Material
    Note: This skin is heavily inspired by Material Theme. Install or support original if it better fits your needs.

    Boxy Ocean ★ MaterialBoxy Ocean ★ Material
    The screenshot above shows next options in action:
    // Activation"color_scheme": "Packages/Boxy Theme/schemes/Boxy Ocean.tmTheme","theme": "Boxy Ocean.sublime-theme",

    // Settings"theme_accent_cyan": true,"theme_bar": true,"theme_bar_logo_atomized": true,"theme_bar_shadow_hidden": true,"theme_button_rounded": true,"theme_dirty_colored_always": true,"theme_icons_materialized": true,"theme_scrollbar_rounded": true,"theme_sidebar_highlight_selected_text_only": true,"theme_sidebar_highlight_text_only": true,"theme_sidebar_indent_top_level_disabled": true,"theme_size_md": true,"theme_tab_highlight_text_only": true,"theme_tab_selected_transparent": true,"theme_tab_selected_underlined": true,"theme_tab_size_xxl": true,"theme_unified": true,

    The operating system is Ubuntu. The font used for the code is Roboto Mono. The UI font is Roboto Medium (via addon).
    Installed packages:
    Boxy Theme Addon - Font Face
    Color Highlighter
    Color ​Helper

    [

    ](https://github.com/ihodev/sublime-boxy#boxy-solarized-dark--code)Boxy Solarized Dark ★ Code

    Boxy Solarized Dark ★ CodeBoxy Solarized Dark ★ Code
    The screenshot above shows next options in action:
    // Activation"color_scheme": "Packages/Boxy Theme/schemes/Boxy Solarized Dark.tmTheme","theme": "Boxy Solarized Dark.sublime-theme",

    // Settings"theme_accent_purple": true,"theme_bar": true,"theme_bar_shadow_hidden": true,"theme_dropdown_atomized": true,"theme_find_panel_atomized": true,"theme_sidebar_disclosure": true,"theme_sidebar_folder_mono": true,"theme_sidebar_indent_sm": true,"theme_statusbar_colored": true,"theme_statusbar_size_md": true,"theme_tab_highlight_text_only": true,"theme_tab_selected_filled": true,"theme_tab_size_md": true,"theme_tabset_line_visible": true,"theme_unified": true,

    The operating system is macOS. The font used for the code is SF Mono. The UI font is SF Mono (via addon).
    Installed packages:
    Boxy Theme Addon - Font Face
    Boxy Theme Addon - Mono File Icons
    Boxy Theme Addon - Widget Font Size
    Bracket Highlighter

    [

    ](https://github.com/ihodev/sublime-boxy#boxy-solarized-light--iowa)Boxy Solarized Light ★ Iowa

    Boxy Solarized Light ★ IowaBoxy Solarized Light ★ Iowa
    The screenshot above shows next options in action:
    // Activation"color_scheme": "Packages/Boxy Theme/schemes/Boxy Solarized Light.tmTheme","theme": "Boxy Solarized Light.sublime-theme",

    // Settings"theme_accent_green": true,"theme_bar": true,"theme_bar_colored": true,"theme_bar_shadow_hidden": true,"theme_button_rounded": true,"theme_icons_atomized": true,"theme_quick_panel_size_md": true,"theme_scrollbar_rounded": true,"theme_sidebar_close_always_visible": true,"theme_sidebar_folder_materialized": true,"theme_sidebar_highlight_selected_text_only": true,"theme_sidebar_highlight_text_only": true,"theme_sidebar_indent_top_level_disabled": true,"theme_statusbar_size_md": true,"theme_tab_highlight_text_only": true,"theme_tab_line_size_lg": true,"theme_tab_selected_transparent": true,"theme_tab_selected_underlined": true,"theme_tab_size_lg": true

    The operating system is Windows. The font used for the code is Space Mono.
    Installed packages:
    Bracket Highlighter
    Sublime Linter

    [

    ](https://github.com/ihodev/sublime-boxy#boxy-tomorrow--numix)Boxy Tomorrow ★ Numix

    Boxy Tomorrow ★ NumixBoxy Tomorrow ★ Numix
    The screenshot above shows next options in action:
    // Activation"color_scheme": "Packages/Boxy Theme/schemes/Boxy Tomorrow.tmTheme","theme": "Boxy Tomorrow.sublime-theme",

    // Settings"theme_accent_numix": true,"theme_autocomplete_item_selected_colored": true,"theme_dropdown_atomized": true,"theme_find_panel_materialized": true,"theme_grid_border_size_xs": true,"theme_popup_border_visible": true,"theme_quick_panel_border_visible": true,"theme_quick_panel_item_selected_colored": true,"theme_scrollbar_colored": true,"theme_scrollbar_line": true,"theme_sidebar_disclosure": true,"theme_tab_selected_transparent": true,"theme_tab_selected_underlined": true,"theme_tab_size_lg": true,"theme_unified": true,

    The operating system is Ubuntu. The font used for the code is Fira Code. The UI font is Fira Code (via addon)
    Installed packages:
    Boxy Theme Addon - Font Face

    [

    ](https://github.com/ihodev/sublime-boxy#boxy-yesterday--atom)Boxy Yesterday ★ Atom

    Boxy Yesterday ★ AtomBoxy Yesterday ★ Atom
    The screenshot above shows next options in action:
    // Activation"color_scheme": "Packages/Boxy Theme/schemes/Boxy Yesterday.tmTheme","theme": "Boxy Yesterday.sublime-theme",

    // Settings"theme_accent_sky": true,"theme_button_rounded": true,"theme_find_panel_close_hidden": true,"theme_find_panel_size_xs": true,"theme_grid_border_size_lg": true,"theme_icon_button_highlighted": true,"theme_icons_atomized": true,"theme_popup_border_visible": true,"theme_quick_panel_size_md": true,"theme_scrollbar_rounded": true,"theme_sidebar_disclosure": true,"theme_sidebar_indent_top_level_disabled": true,"theme_statusbar_size_md": true,"theme_tab_rounded": true,"theme_tab_selected_prelined": true,

    The operating system is macOS. The font used for the code is Iosevka. The UI font is San Francisco Text (via addon).
    Installed packages:
    Boxy Theme Addon - Font Face
    Boxy Theme Addon - Widget Font Size
    PlainNotes

    [

    ](https://github.com/ihodev/sublime-boxy#share-the-love)Share The Love
    I've put a lot of time and effort into making Boxy Theme
    awesome. If you love it, you can buy me a coffee. Every cup helps! I promise it will be a good investment

    :wink::wink:

    Donate with: Patreon.

    相关文章

      网友评论

        本文标题:Sublime使用,安装插件

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