养生 装修 购物 美食 感冒 便秘 营销 加盟 小吃 火锅 管理 创业 搭配 减肥 培训 旅游

sublime默认设置用户设置和设置特定语法

时间:2024-11-06 09:53:36

sublime默认设置用户设置和设置特定语法,设置完样式如下

sublime默认设置用户设置和设置特定语法

工具/原料

sublime3

方法/步骤

1、设置1.通过PackageControl安装Flatland主题2.设置默认首选项–>设置-->用户设置3.把原来的删除复制粘贴下面代码//Placeyoursettingsinthefile"Packages/User/Preferences.sublime-settings",//whichoverridesthesettingsinhere.////Settingsmayalsobeplacedinsyntax-specificsettingfiles,for//example,inPackages/User/Python.sublime-settingsforpythonfiles.{//Setsthecolorsusedwithinthetextarea"color_scheme":"Packages/Theme-Flatland/FlatlandDark.tmTheme",//Notethatthefont_faceandfont_sizeareoverriddenintheplatform//specificsettingsfile,forexample,"Preferences(Linux).sublime-settings".//Becauseofthis,settingthemherewillhavenoeffect:youmustsetthem//inyourUserFilePreferences."font_face":"Menlo","font_size":18,//Validoptionsare"no_bold","no_italic","no_antialias","gray_antialias",//"subpixel_antialias","no_round"(OSXonly),"gdi"(Windowsonly)and//"directwrite"(Windowsonly)"font_options":["no_round"],//Charactersthatareconsideredtoseparatewords"word_separators":"./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?",//Settofalsetopreventlinenumbersbeingdrawninthegutter"line_numbers":true,//Settofalsetohidethegutteraltogether"gutter":true,//Spacingbetweenthegutterandthetext"margin":4,//Foldbuttonsarethetrianglesshownintheguttertofoldregionsoftext"fold_buttons":false,//Hidesthefoldbuttonsunlessthemouseisoverthegutter"fade_fold_buttons":true,//Columnsinwhichtodisplayverticalrulers"rulers":[],//Settotruetoturnspellcheckingonbydefault"spell_check":false,//Thenumberofspacesatabisconsideredequalto"tab_size":2,//Settotruetoinsertspaceswhentabispressed"translate_tabs_to_spaces":true,//Iftranslate_tabs_to_spacesistrue,use_tab_stopswillmaketaband//backspaceinsert/deleteuptothenexttabstop"use_tab_stops":true,//Settofalsetodisabledetectionoftabsvs.spacesonload"detect_indentation":true,//Calculatesindentationautomaticallywhenpressingenter"auto_indent":true,//Makesautoindentalittlesmarter,e.g.,byindentingthenextline//afteranifstatementinC.Requiresauto_indenttobeenabled."smart_indent":true,//Addswhitespaceuptothefirstopenbracketwhenindenting.Requires//auto_indenttobeenabled."indent_to_bracket":true,//Trimswhitespaceaddedbyauto_indentwhenmovingthecaretoffthe//line."trim_automatic_white_space":true,//Disableshorizontalscrollingifenabled.//Maybesettotrue,false,or"auto",whereitwillbedisabledfor//sourcecode,andotherwiseenabled."word_wrap":"auto",//Settoavalueotherthan0toforcewrappingatthatcolumnratherthanthe//windowwidth"wrap_width":80,//Settofalsetopreventwordwrappedlinesfrombeingindentedtothesame//level"indent_subsequent_lines":true,//Drawstextcenteredinthewindowratherthanleftaligned"draw_centered":false,//Controlsautopairingofquotes,bracketsetc"auto_match_enabled":true,//Wordlisttouseforspellchecking"dictionary":"Packages/Language-English/en_US.dic",//Setswhichscopesarecheckedforspellingerrors"spelling_selector":"markup.raw,sourcestring.quoted-punctuation-meta.preprocessor.c.include,sourcecomment-sourcecomment.block.preprocessor,-(source,constant,keyword,storage,support,variable,markup.underline.link,meta.tag)",//Settotruetodrawaborderaroundthevisiblerectangleontheminimap.//Thecoloroftheborderwillbedeterminedbythe"minimapBorder"keyin//thecolorscheme"draw_minimap_border":false,//Alwaysvisualisetheviewportontheminimap,asopposedtoonly//showingitonmouseover"always_show_minimap_viewport":false,//Ifenabled,willhighlightanylinewithacaret"highlight_line":true,//Validvaluesare"smooth","phase","blink"and"solid"."caret_style":"solid",//Thesesettingscontrolthesizeofthecaret"caret_extra_top":0,"caret_extra_bottom":0,"caret_extra_width":0,//Settofalsetodisableunderliningthebracketssurroundingthecaret"match_brackets":true,//Settofalseifyou'dratheronlyhighlightthebracketswhenthecaretis//nexttoone"match_brackets_content":true,//Settofalsetonothighlightsquarebrackets.Thisonlytakeseffectif//match_bracketsistrue"match_brackets_square":true,//Settofalsetonothighlightcurlybrackets.Thisonlytakeseffectif//match_bracketsistrue"match_brackets_braces":true,//Settofalsetonothighlightanglebrackets.Thisonlytakeseffectif//match_bracketsistrue"match_brackets_angle":false,//EnablevisualizationofthematchingtaginHTMLandXML"match_tags":true,//Highlightsotheroccurrencesofthecurrentlyselectedtext"match_selection":true,//Additionalspacingatthetopofeachline,inpixels"line_padding_top":0,//Additionalspacingatthebottomofeachline,inpixels"line_padding_bottom":0,//Settofalsetodisablescrollingpasttheendofthebuffer.//OnOSX,thisvalueisoverriddenintheplatformspecificsettings,so//you'llneedtoplacethislineinyourusersettingstooverrideit."scroll_past_end":false,//Thiscontrolswhathappenswhenpressingupordownwhenonthefirst//orlastline.//OnOSX,thisvalueisoverriddenintheplatformspecificsettings,so//you'llneedtoplacethislineinyourusersettingstooverrideit."move_to_limit_on_up_down":false,//Setto"none"toturnoffdrawingwhitespace,"selection"todrawonlythe//whitespacewithintheselection,and"all"todrawallwhitespace"draw_white_space":"all",//Settofalsetoturnofftheindentationguides.//Thecolorandwidthoftheindentguidesmaybecustomizedbyediting//thecorresponding.tmThemefile,andspecifyingthecolors"guide",//"activeGuide"and"stackGuide""draw_indent_guides":true,//Controlshowtheindentguidesaredrawn,validoptionsare//"draw_normal"and"draw_active".draw_activewilldrawtheindent//guidescontainingthecaretinadifferentcolor."indent_guide_options":["draw_normal"],//Settotruetoremovingtrailingwhitespaceonsave"trim_trailing_white_space_on_save":true,//Settotruetoensurethelastlineofthefileendsinanewline//characterwhensaving"ensure_newline_at_eof_on_save":true,//Settotruetoautomaticallysavefileswhenswitchingtoadifferentfile//orapplication"save_on_focus_lost":true,//Saveviawritingtoanalternatefile,andthenrenamingitoverthe//originalfile."atomic_save":false,//Theencodingtousewhentheencodingcan'tbedeterminedautomatically.//ASCII,UTF-8andUTF-16encodingswillbeautomaticallydetected."fallback_encoding":"Western(Windows1252)",//Encodingusedwhensavingnewfiles,andfilesopenedwithanundefined//encoding(e.g.,plainasciifiles).Ifafileisopenedwithaspecific//encoding(eitherdetectedorgivenexplicitly),thissettingwillbe//ignored,andthefilewillbesavedwiththeencodingitwasopened//with."default_encoding":"UTF-8",//Filescontainingnullbytesareopenedashexadecimalbydefault"enable_hexadecimal_encoding":true,//Determineswhatcharacter(s)areusedtoterminateeachlineinnewfiles.//Validvaluesare'system'(whatevertheOSuses),'windows'(CRLF)and//'unix'(LFonly)."default_line_ending":"system",//Whenenabled,hoveringoverawordwillshowapopuplistingall//possiblelocationsforthedefinitionsymbol.Requiresindex_files."show_definitions":true,//Whenenabled,pressingtabwillinsertthebestmatchingcompletion.//Whendisabled,tabwillonlytriggersnippetsorinsertatab.//Shift+tabcanbeusedtoinsertanexplicittabwhentab_completionis//enabled."tab_completion":true,//Enableautocompletetobetriggeredautomaticallywhentyping."auto_complete":false,//Themaximumfilesizewhereautocompletewillbeautomaticallytriggered."auto_complete_size_limit":4194304,//Thedelay,inms,beforetheautocompletewindowisshownaftertyping"auto_complete_delay":50,//Controlswhatscopesautocompletewillbetriggeredin"auto_complete_selector":"meta.tag-punctuation.definition.tag.begin,source-comment-string.quoted.double.block-string.quoted.single.block-string.unquoted.heredoc",//Additionalsituationstotriggerautocomplete"auto_complete_triggers":[{"selector":"text.html","characters":"<"}],//Bydefault,autocompletewillcommitthecurrentcompletiononenter.//Thissettingcanbeusedtomakeitcompleteontabinstead.//Completingontabisgenerallyasuperioroption,asitremoves//ambiguitybetweencommittingthecompletionandinsertinganewline."auto_complete_commit_on_tab":true,//Controlsifautocompleteisshownwhensnippetfieldsareactive.//Onlyrelevantifauto_complete_commit_on_tabistrue."auto_complete_with_fields":false,//Controlswhathappenswhenpressingtheupkeywhilethefirstitemin//theautocompletewindowisselected:iffalse,thewindowishidden,//otherwisethelastiteminthewindowisselected.Likewiseforthe//downkeywhenthelastitemisselected."auto_complete_cycle":false,//AutomaticallycloseHTMLandXMLtagswhen</isentered."auto_close_tags":true,//Bydefault,shift+tabwillonlyunindentiftheselectionspans//multiplelines.Whenpressingshift+tabatothertimes,it'llinserta//tabcharacter-thisallowstabstobeinsertedwhentab_completionis//enabled.Setthistotruetomakeshift+tabalwaysunindent,insteadof//insertingtabs."shift_tab_unindent":false,//Iftrue,thecopyandcutcommandswilloperateonthecurrentline//whentheselectionisempty,ratherthandoingnothing."copy_with_empty_selection":true,//Iftrue,theselectedtextwillbecopiedintothefindpanelwhenit's//shown.//OnOSX,thisvalueisoverriddenintheplatformspecificsettings,so//you'llneedtoplacethislineinyourusersettingstooverrideit."find_selected_text":true,//Whenauto_find_in_selectionisenabled,the"FindinSelection"flag//willbeenabledautomaticallywhenmultiplelinesoftextareselected"auto_find_in_selection":false,//Whendrag_textisenabled,clickingonselectedtextwillbegina//drag-dropoperation.ThisisnotcurrentlyimplementedunderLinux."drag_text":true,////UserInterfaceSettings////ThethemecontrolsthelookofSublimeText'sUI(buttons,tabs,scrollbars,etc)"theme":"FlatlandDark.sublime-theme",//Setto0todisablesmoothscrolling.Settoavaluebetween0and1to//scrollslower,orsettolargerthan1toscrollfaster"scroll_speed":1.0,//Controlssidebaranimationwhenexpandingorcollapsingfolders"tree_animation_enabled":true,//Controlsanimationthroughouttheapplication"animation_enabled":true,//Makestabswithmodifiedfilesmorevisible"highlight_modified_tabs":true,"show_tab_close_buttons":true,//Showfoldersinthesidebarinbold"bold_folder_labels":true,//OSXonly:SettotruetodisableLionstylefullscreensupport.//SublimeTextmustberestartedforthistotakeeffect."use_simple_full_screen":true,//OSXonly.Validvaluesaretrue,false,and"auto".Autowillenable//thesettingwhenrunningonascreen2560pixelsorwider(i.e.,a//Retinadisplay).Whenthissettingisenabled,OpenGLisusedto//acceleratedrawing.SublimeTextmustberestartedforchangestotake//effect."gpu_window_buffer":"auto",//Validvaluesare"system","enabled"and"disabled""overlay_scroll_bars":"system",//Allowstabstoscrollleftandright,insteadofsimplyshrinking"enable_tab_scrolling":true,//Displayfileencodinginthestatusbar"show_encoding":false,//Displaylineendingsinthestatusbar"show_line_endings":false,////ApplicationBehaviorSettings////Exitingtheapplicationwithhot_exitenabledwillcauseittoclose//immediatelywithoutprompting.Unsavedmodificationsandopenfileswill//bepreservedandrestoredwhennextstarting.////Closingawindowwithanassociatedprojectwillalsoclosethewindow//withoutprompting,preservingunsavedchangesintheworkspacefile//alongsidetheproject."hot_exit":true,//remember_full_screenwillallowSublimeTexttostartinfullscreen//modeifitwasexitedinfullscreenmode.Whensettofalse,Sublime//Textwillneverstartinfullscreenmode."remember_full_screen":false,//Alwayspromptbeforereloadingafile,evenifthefilehasn'tbeen//modified.Thedefaultbehavioristoautomaticallyreloadafileifit//hasn'tbeenedited.Ifafilehasunsavedchanges,apromptwillalways//beshown."always_prompt_for_file_reload":false,//OSXonly:Whenfilesareopenedfromfinder,orbydraggingontothe//dockicon,thiscontrolsifanewwindowiscreatedornot."open_files_in_new_window":true,//OSXonly:Thiscontrolsifanemptywindowiscreatedatstartupornot."create_window_at_startup":true,//Settotruetoclosewindowsassoonasthelastfileisclosed,unless//there'safolderopenwithinthewindow.//OnOSX,thisvalueisoverriddenintheplatformspecificsettings,so//you'llneedtoplacethislineinyourusersettingstooverrideit."close_windows_when_empty":false,//Showthefullpathtofilesinthetitlebar.//OnOSX,thisvalueisoverriddenintheplatformspecificsettings,so//you'llneedtoplacethislineinyourusersettingstooverrideit."show_full_path":true,//ShowstheBuildResultspanelwhenbuilding.Ifsettofalse,theBuild//ResultscanbeshownviatheTools/BuildResultsmenu."show_panel_on_build":true,//Showsbuilderrorsjustunderthelineonwhichtheyoccur."show_errors_inline":true,//Previewfilecontentswhenclickingonafileinthesidebar.Double//clickingoreditingthepreviewwillopenthefileandassignitatab."preview_on_click":true,//folder_exclude_patternsandfile_exclude_patternscontrolwhichfiles//arelistedinfoldersonthesidebar.Thesecanalsobesetonaper-//projectbasis."folder_exclude_patterns":[".svn",".git",".hg","CVS"],"":["*.pyc","*.pyo","*.exe","*.dll","*.obj","*.o","*.a","*.lib","*.so","*.dylib","*.ncb","*.sdf","*.suo","*.pdb","*.idb",".DS_Store","*.class","*.psd","*.db","*.sublime-workspace"],//Thesefileswillstillshowupinthesidebar,butwon'tbeincludedin//GotoAnythingorFindinFiles"binary_file_patterns":["*.jpg","*.jpeg","*.png","*.gif","*.ttf","*.tga","*.dds","*.ico","*.eot","*.pdf","*.swf","*.jar","*.zip"],//Fileindexingparsesallfilesinthesidebar,andbuildsanindexof//theirsymbols.ThisisrequiredforGotoDefinitiontowork."index_files":true,//Setthenumberthreadstouseforindexing.Avalueof0willmake//SublimeTextguessbasedonthenumberofcores.Usetheindex_files//settingtodisableallworkers."index_workers":0,//index_exclude_patternsindicatewhichfileswon'tbeindexed."index_exclude_patterns":["*.log"],//Listanypackagestoignorehere.Whenremovingentriesfromthislist,//arestartmayberequiredifthepackagecontainsplugins."ignored_packages":["Vintage"]}

sublime默认设置用户设置和设置特定语法

2、用户设置-->复制粘贴下面代码Preferences.[sublime-settings-user]{"font_size":18,"ignored_packages":["Vintage"]}

sublime默认设置用户设置和设置特定语法

3、设置特定语法Preferences.[Python.sublime-settings]//ThesesettingsoverridebothUserandDefaultsettingsforthePythonsyntax{//editoroptions"draw_white_space":"all",//tabsandwhitespace"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}

© 一点知识