首页 文章

Sublime Text 3在保存文件后添加空格

提问于
浏览
0

使用Python语法保存文件时,Sublime Text 3出现问题 . 操作员附近的空间会自动添加 .
例如:
我输入:print(a," ",b c),保存文件后将是:print(a," ",b c)
我尝试更改设置,但我不想在我不键入空格的地方自动添加空格 .

我的设置文件:

{
    "always_show_minimap_viewport": true,
    "auto_complete": false,
    "auto_complete_commit_on_tab": true,
    "auto_match_enabled": true,
    "bold_folder_labels": true,
    "caret_style": "solid",
    "color_scheme": "Packages/ayu/ayu-dark.tmTheme",
    "detect_indentation": true,
    "draw_indent_guides": true,
    "draw_minimap_border": true,
    "enable_telemetry": false,
    "ensure_newline_at_eof_on_save": true,
    "folder_exclude_patterns":
    [
        ".svn",
        ".git",
        ".hg",
        "CVS",
        "*.DS_Store",
        "*.pyc",
        "pycache"
    ],
    "font_face": "Liberation Mono",
    "font_options":
    [
        "subpixel_antialias",
        "no_round"
    ],
    "font_size": 14,
    "highlight_line": false,
    "highlight_modified_tabs": false,
    "ignored_packages":
    [
        "Vintage"
    ],
    "indent_guide_options":
    [
        "draw_active",
        "draw_normal"
    ],
    "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
    },
    "pep8_max_line_length": 79,
    "preview_on_click": false,
    "rulers":
    [
        79
    ],
    "shift_tab_unindent": true,
    "show_panel_on_build": false,
    "soda_classic_tabs": true,
    "soda_folder_icons": false,
    "tab_size": 4,
    "theme": "ayu-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,
    "wrap_width": 80,
    "material_theme_accent_graphite": true ,
    "material_theme_compact_sidebar": true,
    "file_exclude_patterns": ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj","*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.sublime-workspace"],
}

语法设置文件:

// These settings override both User and Default settings for the Python syntax
{
    "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
}

1 回答

  • 0

    我找到了解决方案 . 这是一个Anaconda插件 . 您必须在此插件的用户设置中设置以下标志:

    "auto_formatting": true,
    "autoformat_ignore":
        [
            "E309",
            "E501",
            "E221",
            "E222",
            "E223",
            "E225",
            "E226",
            "E227",
            "E228",
            "E231"
        ]
    

相关问题