21. View Settings List Example
The following is a settings list of an .rst file when it was erroneously sporting
a tab_width of 2 instead of 4 as configured. In hopes of finding out more about the
bug I captured the View Settings object by:
opening the Console
sd = view.settings().to_dict()
sd (calls repr(sd) to show its contents)
{
adaptive_dividers: False,
added_words: [
"customizations",
"workspaces",
"subclassing",
"subclassed",
"keymap",
"json",
"args",
"submenu",
"orangish",
],
allow_git_home_dir: False,
always_prompt_for_file_reload: False,
always_show_minimap_viewport: False,
animation_enabled: True,
auto_close_tags: True,
auto_complete: True,
auto_complete_commit_on_tab: False,
auto_complete_cycle: False,
auto_complete_delay: 50,
auto_complete_include_snippets: True,
auto_complete_include_snippets_when_typing: True,
auto_complete_preserve_order: "some",
auto_complete_selector:
"meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
auto_complete_size_limit: 4194304,
auto_complete_trailing_spaces: True,
auto_complete_trailing_symbols: False,
auto_complete_triggers: [
{
characters: "<",
selector: "text.html, text.xml",
},
{
rhs_empty: True,
selector: "punctuation.accessor",
},
],
auto_complete_use_history: False,
auto_complete_use_index: True,
auto_complete_with_fields: False,
auto_find_in_selection: False,
auto_hide_menu: False,
auto_hide_status_bar: False,
auto_hide_tabs: False,
auto_indent: True,
auto_match_enabled: True,
binary_file_patterns: [
"*.3gp", "*.3gpp", "*.7z", "*.7zip", "*.aac", "*.accda", "*.accdb", "*.accde",
"*.accdr", "*.accdt", "*.adn", "*.aep", "*.aet", "*.ai", "*.aiff", "*.au", "*.bin",
"*.dbf", "*.dds", "*.dll", "*.doc", "*.docm", "*.docx", "*.docxml", "*.dotm", "*.dotx",
"*.eot", "*.exe", "*.flac", "*.gif", "*.gz", "*.h264", "*.ico", "*.idml", "*.indb",
"*.indd", "*.indl", "*.indt", "*.inx", "*.jar", "*.jpeg", "*.jpg", "*.laccdb",
"*.lnk", "*.m4a", "*.m4p", "*.m4v", "*.maf", "*.mam", "*.maq", "*.mar", "*.mat",
"*.mdb", "*.mdw", "*.mkv", "*.mov", "*.mp+", "*.mp3", "*.mp4", "*.mpc", "*.mpeg",
"*.mpg", "*.mpp", "*.odg", "*.ods", "*.oga", "*.ogg", "*.ogm", "*.ogv", "*.one",
"*.opus", "*.otf", "*.pdf", "*.png", "*.pps", "*.ppsx", "*.ppt", "*.pptx", "*.prel",
"*.prproj", "*.psb", "*.psd", "*.psq", "*.pzip", "*.ra", "*.rar", "*.rm", "*.saz",
"*.swf", "*.tar", "*.tga", "*.tgz", "*.ttf", "*.wav", "*.webm", "*.wim", "*.wma",
"*.wmf", "*.wmv", "*.woff", "*.woff2", "*.wri", "*.xls", "*.xlsb", "*.xlsm", "*.xlsx",
"*.xlt", "*.zip",
],
block_caret: False,
bold_folder_labels: False,
caret_extra_bottom: 4,
caret_extra_top: 4,
caret_extra_width: 1,
caret_style: "solid",
close_deleted_files: True,
close_find_after_find_all: True,
close_find_after_replace_all: True,
close_windows_when_empty: False,
color_scheme: "Mariana.sublime-color-scheme",
console_max_history_lines: 3000,
control_character_style: "hex",
copy_with_empty_selection: True,
create_window_at_startup: True,
dark_color_scheme: "Mariana.sublime-color-scheme",
dark_theme: "Default Dark.sublime-theme",
default_encoding: "UTF-8",
default_line_ending: "system",
detect_indentation: True,
dictionary: "Packages/Language - English/en_US.dic",
drag_text: True,
draw_centered: False,
draw_indent_guides: True,
draw_minimap_border: False,
draw_unicode_bidi: True,
draw_unicode_white_space: "punctuation",
draw_white_space: "all",
enable_hexadecimal_encoding: True,
enable_tab_scrolling: True,
ensure_newline_at_eof_on_save: False,
fade_fold_buttons: True,
fallback_encoding: "Western (Windows 1252)",
file_exclude_patterns: [
"*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj",
"*.o", "*.a", "*.lib", "*.so", "*.dylib",
"*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb",
".DS_Store", ".directory", "desktop.ini", "*.class", "*.psd",
"*.db", "*.sublime-workspace",
],
file_tab_style: "rounded",
find_highlight_matches_max_size: 16777216,
find_in_files_context_characters: 300,
find_in_files_context_lines: 2,
find_in_files_max_file_size: 104857600,
find_in_files_max_result_size: 16777216,
find_in_files_side_by_side: False,
find_in_files_suppress_errors: False,
find_regex_highlight_matches_max_size: 1048576,
find_scroll_highlights_limit: 8192,
find_selected_text: True,
focus_on_file_drop: True,
fold_buttons: True,
fold_style: "auto",
folder_exclude_patterns: [
".svn",
".git",
".hg",
"CVS",
".Trash",
".Trash-*",
],
font_face: "Consolas",
font_options: [],
font_size: 10,
git_diff_target: "index",
goto_anything_exclude_gitignore: False,
goto_anything_file_preview: True,
gutter: True,
hardware_acceleration: "none",
hide_new_tab_button: False,
hide_pointer_while_typing: True,
hide_tab_scrolling_buttons: False,
highlight_find_results_in_scrollbar: True,
highlight_gutter: True,
highlight_line: False,
highlight_line_number: True,
highlight_modified_tabs: False,
hot_exit: "always",
hot_exit_projects: True,
ignored_packages: ["Vintage"],
ignored_snippets: [],
image_file_patterns: [
"*.jpeg",
"*.jpg",
"*.gif",
"*.png",
"*.ico",
"*.bmp",
"*.tga",
"*.psd",
"*.ppm",
"*.pgm",
"*.webp",
"*.hdr",
],
inactive_sheet_dimming: True,
indent_guide_options: ["draw_normal"],
indent_subsequent_lines: True,
indent_to_bracket: False,
index_exclude_gitignore: True,
index_exclude_patterns: ["*.bak", "*.log", "*.svg"],
index_files: True,
index_skip_unknown_extensions: True,
index_workers: 0,
light_color_scheme: "Breakers.sublime-color-scheme",
light_theme: "Default.sublime-theme",
line_numbers: True,
line_padding_bottom: 0,
line_padding_top: 0,
margin: 4,
match_brackets: True,
match_brackets_angle: False,
match_brackets_braces: True,
match_brackets_content: True,
match_brackets_square: True,
match_selection: True,
match_tags: True,
mini_diff: True,
minimap_horizontal_scrolling: False,
move_to_limit_on_up_down: False,
native_tabs: "system",
open_files_in_new_window: "never",
open_tabs_after_current: True,
overlay_scroll_bars: "system",
popup_shadows: True,
preview_on_click: True,
regex_auto_escape: True,
relative_line_numbers: False,
reload_file_on_change: True,
remember_full_screen: False,
remember_layout: False,
remember_workspace: True,
reveal_menu: True,
reveal_tabs_with_timeout: False,
ruler_style: "dotted",
ruler_width: 1.0,
rulers: [86],
save_on_focus_lost: False,
scroll_context_lines: 0,
scroll_past_end: True,
scroll_speed: 1.0,
select_across_groups: False,
selection_description_column_type: "virtual",
shell_environment: True,
shift_tab_unindent: False,
show_definitions: True,
show_encoding: True,
show_errors_inline: True,
show_full_path: True,
show_git_status: True,
show_git_status_in_status_bar: True,
show_indentation: True,
show_line_column: "compact",
show_line_endings: True,
show_navigation_bar: True,
show_panel_on_build: True,
show_project_first: False,
show_rel_path: False,
show_sidebar_button: True,
show_spelling_errors: True,
show_syntax: True,
show_tab_close_buttons: True,
show_tab_close_buttons_on_left: False,
smart_indent: True,
spell_check: True,
spelling_selector:
"markup.raw, source string.quoted - punctuation - meta.preprocessor.include, source comment - source comment.block.preprocessor, -(source, constant, keyword, storage, support, variable, markup.underline.link, meta.tag)",
sub_word_separators: "_",
sublime_merge_path: "",
syntax: "Packages/RestructuredText/reStructuredText.sublime-syntax",
syntax_detection_size_limit: 16777216,
tab_completion: True,
tab_size: 2,
theme: "auto",
theme_font_options: [],
themed_title_bar: True,
translate_tabs_to_spaces: True,
tree_animation_enabled: True,
trim_automatic_white_space: True,
trim_only_modified_white_space: True,
trim_trailing_white_space_on_save: "all",
ui_scale: 0.0,
update_system_recent_files: True,
use_find_clipboard: True,
use_tab_stops: True,
vintage_ctrl_keys: False,
vintage_start_in_command_mode: False,
vintage_use_clipboard: False,
word_separators: "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?",
word_wrap: False,
wrap_width: 0,
wrap_width_style: "constant",
};