Professional Documents
Culture Documents
Sublime Text 2 Tips and Tricks (Updated) - Tuts Code Tutorial
Sublime Text 2 Tips and Tricks (Updated) - Tuts Code Tutorial
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
SearchTuts+
FreeTutorials
Design&Illustration
Code
WebDesign
Music&Audio
Photo&Video
3D&MotionGraphics
GameDevelopment
ComputerSkills
Crafts&DIY
Business
Courses
Design&Illustration
Code
WebDesign
Music&Audio
Photo&Video
3D&MotionGraphics
Business
Bundles
eBooks
Design&Illustration
Code
WebDesign
Music&Audio
Photo&Video
3D&MotionGraphics
Crafts&DIY
Business
FreeAccount
SignUpSignIn
AllTopics
Findtutorials,courses,andmore...
FreeTutorials
Design&Illustration
Design&Illustration
Vector
AdobePhotoshop
AdobeIllustrator
Illustration
Tools&Tips
Inspiration
News
Designing
TextEffects
WebRoundups
MoreCategories...
LearningGuides
Code
Code
WebDevelopment
WordPress
MobileDevelopment
PHP
Flash
JavaScript
News
iOSSDK
AndroidSDK
ThemeDevelopment
MoreCategories...
LearningGuides
WebDesign
WebDesign
CSS
HTML&CSS
AdobePhotoshop
CompleteWebsites
HTML
Workflow
DesignTheory
General
UIDesign
SiteElements
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
1/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
MoreCategories...
LearningGuides
Music&Audio
Music&Audio
AudioProduction
General
LogicPro
Workshops
Mixing&Mastering
OpenMic
SoundDesign
AbletonLive
Reason
Recording
MoreCategories...
LearningGuides
Photo&Video
Photo&Video
Shooting
PostProcessing
PhotoCritique
AdobePhotoshop
Inspiration
Lighting
News
Lectures
AdobeLightroom
Speedlights
MoreCategories...
LearningGuides
3D&MotionGraphics
3D&MotionGraphics
AdobeAfterEffects
3D
MotionGraphics
3DStudioMax
Cinema4D
Maya
Workflow
News
VisualEffects
AdobePhotoshop
MoreCategories...
LearningGuides
GameDevelopment
GameDevelopment
Implementation
GameDesign
PlatformAgnostic
Business
Programming
Flash
FromScratch
News
Construct2
HTML5
MoreCategories...
LearningGuides
ComputerSkills
ComputerSkills
OSX
AppTraining
Productivity
Tips&Shortcuts
Electronics
Security
Office
Automation
Hardware
Terminal
MoreCategories...
LearningGuides
Crafts&DIY
Crafts&DIY
Decorations
Homewares
Scissors
Yarn
Sewing
PaperCrafts
Jewellery
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
2/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Crochet
Fashion
Knitting
MoreCategories...
LearningGuides
Business
Business
Freelance
Marketing
Communication
Planning
Finance
Sales
Business&Finance
Entrepreneurship
Productivity
Blogging
MoreCategories...
LearningGuides
Courses
Design&Illustration
Code
WebDesign
Music&Audio
Photo&Video
3D&MotionGraphics
Business
Bundles
eBooks
Design&Illustration
Code
WebDesign
Music&Audio
Photo&Video
3D&MotionGraphics
Crafts&DIY
Business
Blog
Pricing
SignIn
FreeAccount
Advertisement
Code
Categories
WebDevelopment
WordPress
MobileDevelopment
PHP
Flash
JavaScript
News
iOSSDK
AndroidSDK
More...
Categories
LearningGuides
LearnAndroidSDKFromScratch
MakingthePerfectWordPressTheme
RefactoringLegacyCode
TheSOLIDPrinciples
LearniOSSDKDevelopmentFromScratch
AnIntroductiontoXamarin
CSS3Mastery
StrangeandUnusualHTML
WorkingwithSymfony2
More...
LearningGuides
ExpertHelpNew!
WebDevelopment
SublimeText2TipsandTricks(Updated)
byJeffreyWay6Jan2012363Comments
51
23
731
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
3/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Share
SublimeText2isoneofthefastestandmostincrediblecodeeditorstobereleasedinalongtime!Withacommunityandpluginecosystemaspassionateasthisone,it
justmightbeimpossibleforanyothereditortocatchup.I'llshowyoumyfavoritetipsandtrickstoday.
SublimeText2iscurrentlyavailableforallmajorplatforms:OSX,LinuxandWindows.
1BleedingEdgeVersions
Sublimeisinactivedevelopment.If,likeme,youwanttousethelatestpossibleversionoftheapp,youcandownloadthedevbuild.You'llfindthatnew(auto)updates
areavailableeveryotherdayorso.
DownloadadevbuildofSublime2here.
2GetaBetterIcon
Update:hereisabettericon.
Initsdefense,SublimeText2isstillinabetastate.Theofficialiconwilllikely/hopefullychangewiththeofficialrelease.Untilthen,NateBeatycreatedanalternative
icon,ifyoupreferit.
Tointegrateit,youneedtoreplacetheexisting"SublimeText2.icns"filewiththisnewone.OnaMac,browsetoSublime2inyourApplications/folder,thenright
clickand"ViewPackageContents."Lastly,browsetoContents/Resources/,anddragthenewiconin,overwritingtheexistingone.
Pleasetakenoteofthefactthat,ifyou'reusingthefrequentlyupdateddevelopmentversionofSublimeText,witheachupdate,theiconwillberemoved.
Withthatinmind,don'tworryabouttheiconforthetimebeing.
3AccesstheCommandPalette
SimilartoTextMate,wecanuseSublime'scommandpalettebyaccessingtheToolsmenu,orbypressingShift+Command+P,ontheMac.Whetheryouneedtovisita
Preferencespage,orpasteinasnippet,allofthatcanbeaccomplishedhere.
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
4/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
4LightningFastFileSwitching
PressControlorCommand+P,typeinthenameofthefileyouwishtoaccess(fuzzyfinder),and,withoutevenpressingEnter,you'llinstantlybetransportedtothatfile.
WhileVimandappslikePeepOpenofferasimilarfunctionality,they'renotnearlyasfastasSublime'simplementation.
5HowDidWeSurviveBeforeMultiSelection?
EditorslikeTextMatehavelongofferedverticalselection,whichisquiteneat.But,withmultiselection,youcanhavemultiplecursorsonthepage.Thiscandrastically
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
5/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
reducetheneedforusingregularexpressions,andadvancedsearchandreplacequeries.Perhapsaquickvisualdemonstrationisinorder...
QuickDemoofMultiSelection
0:26min(NoAudio)
Toenablemultiselection,youhaveseveraloptions:
PressAltorCommandandthenclickineachregionwhereyourequireacursor.
Selectablockoflines,andthenpressShift+Command+L.
Placethecursoroveraparticularword,andpressControl/Command+Drepeatedlytoselectadditionaloccurrencesofthatword.
Alternatively,addanadditionalcursoratalloccurrencesofawordbytypingAlt+F3onWindows,orCtrl+Command+GontheMac.Amazing!!
6IndentGuides
Update:thisfeaturenowcomespreinstalledwithSublimeText2.
It'ssuchasmallfeature,butI'vealwayslovedhowNotepad++onWindowsdisplaysindentguidesitmakesthepagemucheasiertonavigateandformat.SublimeText2
offersthisability,viaaplugincreatedbyNikolausWittenstein.
Tointegratethisplugin:
Downloadit
Renamethefolderto"IndentGuides"anddragitintothePackagesfolder.OnaMac,thispathwouldbeApplicationSupport/SublimeText2/Packages
7PackageControl
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
6/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Thestepsoutlinedintheprevioustip(#6)areabittedious,aren'tthey?Instead,wecaninstalltheexcellentSublimePackageControl,whichstreamlinestheentire
process.
Toinstall"PackageControl,"openSublimeandpressControl+`.Next,pastethefollowingsnippetintotheconsole.
importurllib2,os;pf='PackageControl.sublimepackage';ipp=sublime.installed_packages_path();os.makedirs(ipp)ifnotos.path.exists(ipp)elseNone;open(os.path.j
Don'tworryifyoudon'tunderstandthecodeabovejustcopyandpaste!
Lastly,restartSublimeText,andbrowsetoPreferences>PackageSettings.Iftheinstallationwassuccessful,you'llnowseeaPackageControliteminthatlist.
WithPackageControlinstalled,theprocessofaddingnewpluginsandfunctionalitybecomesincrediblysimple!
Forausageexample,refertothenextiteminthislist.
8Alignment
Ifyou'rethetypewhopreferstolineupyourequalsignsforexample,inyourJavaScript...
//Before
varjoe='joe';
varjohnny='johnny';
varquaid='quaid';
//After
varjoe='joe';
varjohnny='johnny';
varquaid='quaid';
...thisprocesscanbeautomated,viatheSublimeAlignmentplugin.Ratherthandownloadingandinstallingitmanually,let'sinsteadusePackageControl(outlinedin#7).
PressShift+Command+P
Type"install,"tobringupthe"PackageControl:InstallPackage"option,andpressEnter
Lookfor"Alignment,"andpressEntertoinstallit.
You'redonesoeasy!TypeShift+Command+Atoautoalign.
Thisprocesscanberepeatedforallofthetypicalpluginsweinstall,suchasZenCoding.
9VimFanatic
I'mahugefanofVim.Theamountofpoweritprovidesisinsane.ThefactthatI'veswitchedovertoSublimeText2shouldspeakvolumesthen!
Ifyou'reusingadevbuildofSublimeText(see#2inthislist),youcanenableVintagemode,whichprovidessupportfortheVicommandsthatweknowandlove
okay...someofuslove.Therestofyouhateit!:)
ToenableVintagemode,browsetoPreferences/GlobalSettingsDefault.Oncethisfileopens,browsetotheverybottom,andchange"ignored_packages":
["Vintage"]to"ignored_packages":[].Next,restartSublime,presstheEscapekey,and,tada:commandmode!
BlockCursor
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
7/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Onethingyoumaynoticeisthat,incommandmode,itcanbedifficulttofindthecursor(especiallywhentakingadvantageofthingslikebookmarks).Onmorethanone
occasion,I'vefoundmyselftryingtohuntdownitslocation.
Whileit'snotaperfectsolution,aplugin,called"SublimeBlockCursor,"attemptstoremedythisissue.
Note:WhilethereadmestatesthatSublimeBlockCursorcanbeinstalled,viaPackageControl,Iwasn'tabletofindit.Instead,Ihadtoclonetheproject
manuallyintothePackagesfolder.
10DistractionFreeEditing
Sometimes,weneedtofilteroutalloftheadditionalfluffthatgetsinthewayofourcoding.Use"DistractionFreeMode"totakethisideaasfaraspossible.Thisoption
isavailable,viatheViewmenu.Select"EnterDistractionFreeMode,"orusetheMackeyboardshortcut,Control+Shift+Command+F.
11YouCanStillUseTextMateBundles
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
8/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
TextMatesnippetsandthemesportovernicelytoSublimeText.YouonlyneedtodroptheminthePackagesfolder.tmbundleextensionintact,andSublimewill
recognizethefiles.ThismeansthattheentirecatalogofTextMatethemeswillworkinSublime!
Forexample,I'vebeenworkingwiththe(fantastic)Slimtemplatingengineagoodbitlately,andneededbettersyntaxhighlighting.FredWucreatedabundlefor
TextMate,but,tada,itworksperfectlyinSublimeTextaswell!Ifyou'reinterested,youcandownloadtheSlimbundlehereitincludesbothsnippetsandsyntax
highlighting.
12CustomThemes
ThedefaultthemeforSublimeTextisexcellent,butImuchpreferacustomlightanddarktheme,Soda,createdbyIanHill.
Installation
AstakenfromtheGithubpage...
"Ifyouareagituser,thebestwaytoinstallthethemeandkeepuptodateistoclonetherepodirectlyintoyourPackagesdirectoryintheSublimeText2application
settingsarea."
UsingGit
GotoyourSublimeText2Packagesdirectoryandclonethethemerepositoryusingthecommandbelow:
gitclonehttps://github.com/buymeasoda/sodatheme/"ThemeSoda"
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
9/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
DownloadManually
DownloadthefilesusingtheGitHub.zipdownloadoption.
UnzipthefilesandrenamethefoldertoThemeSoda
CopythefoldertoyourSublimeText2Packagesdirectory
ActivatingtheTheme
ToconfigureSublimeText2tousethetheme:
OpenyourSublimeText2UserGlobalPreferencesfile:SublimeText2>Preferences>UserGlobalSettings
Add(orupdate)yourthemeentrytobe"theme":"SodaLight.sublimetheme"or"theme":"SodaDark.sublimetheme"
ExampleUserGlobalSettings
{
"theme":"SodaLight.sublimetheme"
}
13PageCrawling
SublimeTextprovidesuswithafewdifferentwaystoqueryapage(outsideofthestandardsearchfunctions).
Functions
Needaquickwaytobrowsetoaspecificfunctionormethod?
TypeControl/Command+rtorevealapopupthatallowsforthisverything(noticethe@symbol)!Evenbetter,thesearchisfuzzyaswell,whichisparticularlyhelpfulfor
hugeclasses.
HTML
WhatifyouwanttoimmediatelytransitiontoaspecificpartofanHTMLpagesay,tothedivwithaclassofcontainer.TypeControl/Command+p,then#,andyou'll
instantlyseeatreeofyourdocument.
GotoLineNumber
Toquicklymovetoaspecificlinenumberonthepage,youcanpressControl+g.However,you'llnoticethat,onceagain,it'spullingupthatpalette(Control/Command+
p),andappendingthe:symbol.ThisisadoptedfromVim.
Thismeans,inadditiontoControl+g,youcanalsotype,Control/Command+p,andthen:LINE_NUMBER.
14FetchRemoteFilesWithEase
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
10/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
LetssaythatyoureafanofNormalize.css.Perhaps,youdownloaditandsaveittoasnippet,orstorethestylesheet,itself,inanassetsfolder.Thatway,forfuture
projects,youonlyneedtocopyandpaste.
Theonlyproblemwiththismethodaswevealldiscoveredisthat,ifafewmonthshavepassed,itsmorethanpossiblethattheasset(inthiscase,Normalize.css)will
havebeenupdatedbythecreator.Soyouroptionsaretoeitherusethe,now,outdatedversionofNormalize,or,onceagain,returntotheGitHubpageandpullinafresh
copy.Thisallseemstedious.
CreatedbyWesllyHonorato,Nettuts+Fetchisthesolutiontoourdilemma.Itcanbeinstalled,viaPackageControl.
Usage
You'llonlyusetwocommands,whenworkingwithFetch.First,weneedtosavesomefilereferences.Again,bringupthecommandpalette,andsearchfor"Fetch."For
now,choose"ManageRemoteFiles."
What'sgreataboutSublimeText2isthatconfigurationisincrediblysimple.Toassignreferencestoonlineassetfiles,weonlyneedtocreateanobject,likeso(don't
worryonewillbeprepopulatedforyou,afterinstallation):
So,topullinthelatestcopyofjQuery(ifyoudon'twanttouseaCDN):
{
"files":
{
"jquery":"http://code.jquery.com/jquery.min.js"
}
LearnmoreaboutusingNettuts+Fetch.
15PrefixrPlugin
BuiltbybyWillBond(creatorofPackageControl),theNettuts+Prefixrpluginallowsyoutoautomaticallyupdateyourentirestylesheettoincludesupportforallofthe
variousrequiredCSS3vendorprefixes.Thisway,youneverhavetovisitthewebsiteitselfyoumerelytypeakeyboardcommand,and:
.box{
borderradius:10px;
boxshadow:005pxrgba(0,0,0,.4);
}
...willbeconvertedto:
.box{
webkitborderradius:10px;
mozborderradius:10px;
borderradius:10px;
webkitboxshadow:005pxrgba(0,0,0,.4);
mozboxshadow:005pxrgba(0,0,0,.4);
boxshadow:005pxrgba(0,0,0,.4);
Usage
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
11/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Onceinstalled(viaPackageControl),selectyourstylesheet(orasingleblock),pressctrl+alt+xonWindowsandLinux,orcmd+ctrl+xonOSX,andthecodewill
instantlyberunthroughthePrefixrwebservice.
16LaunchSublimeFromtheTerminal
SublimeText2includesacommandlinetool,subl,toworkwithfilesonthecommandline."
Touseit,createasymlinktothetool.
lns"/Applications/SublimeText2.app/Contents/SharedSupport/bin/subl"~/bin/subl
Aslongas~/binisinyourpath,thatshoulddothetrick!
cdmyProject
subl.
Referhereforadditionalinstructions.
17AutoformatHTML
Abitoddly,theabilitytoautoformatHTMLisnotincludedaspartofthedefaultbuildofSublimeText.TheTagplugin,amongotherthings,hopestoprovidea
solution,however,duetoafewshortcomingsnamelywhendealingwithHTMLcommentsitfallsshort.
TheTagplugincanbeinstalledviaPackageControl.
Totestitsautoformattingskills,thefollowingHTML:
<html>
<head>
<metacharset=utf8>
<title></title>
<!begin>
<!endcomment>
</head>
<body>
<h1>Hithere</h1>
<h2>Bye</h2>
</body>
</html>
...willbechangedto:
<html>
<head>
<metacharset=utf8>
<title></title><!begin>
<!endcomment>
</head>
<body><h1>Hithere</h1>
<h2>Bye</h2>
</body>
</html>
Yikesitlooksworsethanitis.Frommytests,itincorrectlydoesnotplacethebodytagonitsownline,andgetspissywhendealingwithHTMLcomments.Untilthese
issuesarefixed(oranativesolutionisprovided),it'sbesttomanuallyselectablockofHTMLtoreformat,ratherthantheentirepage.
A$200bonuswillbepaidtothefirstSublimeTextplugindeveloperwhocreatesandsubmitsthedefinitive"Nettuts+HTMLFormatter"plugin.
18CreateaPlugin
Ifyou'refeelingadventurous,digintoSublimeText'shugeplugindevelopmentcommunity,andstartcontributing.Wehaveanexcellenttutorialontheprocessof
buildingaSTpluginhereonNettuts+.Besuretocheckitoutifthatinterestsyou!
Conclusion
ThemoreIworkwithSublimeText2,themoreIrealizehowincredibleitis.Butallofthiswouldmeannothingifnotforthefactthatit'saninsanelyfasteditor,and,
evenbetter,it'snotfinished!
Advertisement
Difficulty:
Intermediate
Length:
Medium
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
12/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Categories:
WebDevelopmentTextEditorsSublimeTextFrontEndHTMLJavaScriptSublimePlugins
Translations:
Tuts+tutorialsaretranslatedintootherlanguagesbyourcommunitymembersyoucanbeinvolvedtoo!
Translatethispost
AboutJeffreyWay
IusedtobetheeditorofNettuts+andheadofwebdevelopmentcoursesatTuts+.
+ExpandBioCollapseBio
Advertisement
SuggestedTuts+Course
CreatingAngularDirectives$15
RelatedTutorials
CreatingaWebAppFromScratchUsingPythonFlaskandMySQL
Code
25SyntaxHighlighters:TriedandTested
WebDesign
UsingGulpforWordPressAutomation
Code
363Comments
Recommend 4
Nettuts+
Share
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
Login
SortbyBest
13/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Jointhediscussion
RicardoZea 3yearsago
To"AutoformatHTML",youdon'tneedapackage.
Allyouneedtodoisoneofthreethings:
1.GotoEdit/Line/Reindent=Toofrigginglong.
2.TypeAlt+E+L+R=SamethingasaboveandcertainlyMUCHfaster,but3rdoptionisevenfaster.
3.TypeCTRL+SHIFT+R=NoneedtohavetheyourHTMLmarkupselected
Now,for#3youneedtocreatetheshortcutsinceSublimeText2doesn'tcomewithitforthisfunction.VERYweirdifyouaskme.
Andcreatingtheshortcutisnotdifficultatall.It'salsoaonetimestep:
A.GotoPreferences/KeyBindingsUser(ablankfilewillopen)
B.Inthatfilepastethefollowingpieceofcode:
[
{"keys":["ctrl+shift+r"],"command":"reindent","args":{"single_line":false}}
]
C.Saveandclosethatfile.
NOTE:Itdoesn'thavetobeCTRL+SHIFT+R,justchangethekeystowhateveryoufeelcomfortable.
Done:)
PS.It'dbeniceifJeffreydecidestoupdatethisarticlewiththisadvice.Aftertryingdifferent"AutoformatHTML"packages,nopackageindentedthe
markupascleanasthis'native'mode,noranyofthemwasaseasytouseastheauthorsclaimed.Isearcharoundthewebandthissolutionisusedby
many,manypeople.Tnx.
36
Reply Share
pabloliz>RicardoZea 2yearsago
IuseTidyHTMLpackage.simplycommand+pand"tidy"totrigger.itsnaturalandeasytoremember.youcanaddyourcustomshortcuttoo.
Inicetrick,butbecautious:Ifyouselecttheentirehtmlpageandusethecommanditwillcropallcodeoutsidethebodytags(html,head,scripts)
leavingyouonlywiththeinnerhtmlinsidethebodytag.ThisisveryconvenientwhenintegratingcodetoaCMSwhereyouonlyneedchunksof
code.Iendedupusingitmorethanimagined.Savesmelotoftime.
Ifyoudon'tselectnothingatallitwilltidyupallyourmarkup.
Prettyuseful.worksalsowiththescriptsinthepage.
1
Reply Share
Mauro>pabloliz ayearago
IkeepgettingthewrongoutputafterrunningTidyHtmlfromthecommandpalette.
ThisistheoriginalHTMLstring:
Australasiasecology.
andthisisthecodeoutput:
Australasiasecology.
whichinthebrowsershowsuplikethis:
Australasiasecology.
IplayedabitwiththeTidyHTMLSublimesettingoptions,seehttp://w3c.github.com/tidyhtm...butwithnoavail.
IsthereawaytotellTidyHTMLtoleavethesespecialcharactersuntouched?
Thankyou
Reply Share
Guest>pabloliz 2yearsago
IhaveissueswithTidyHtmlregardingspecialcharacters,seehttp://sublimetext.userecho.co...
Reply Share
AdrianPauly>RicardoZea 2yearsago
Awesome,thanksRicardo!Thiswillcumulativelysavemehours.
Reply Share
SaraSoueidan>RicardoZea 2yearsago
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
14/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
SaraSoueidan>RicardoZea 2yearsago
Thankyouforthistip!:)
Reply Share
jen 2yearsago
holdrightclick,scroll.filehopping.
7
Reply Share
nosykretts>jen 2yearsago
Thankyou....
Reply Share
mittulphp 2yearsago
"ThemoreIworkwithSublimeText2,themoreIrealizehowincredibleitis."
Itis100%true.
6
Reply Share
Cosmin 3yearsago
Thankyouforthisusefulinfo.IcamehereforthePackageManagerpartbutafteralmosthalfanhourIfoundmyselfreadingallthearticle.
IfI'mnotmistaken,SublimeTextiswritteninPythonwhichIthinkisthereasonforbeingsofastandgoodlooking.Iloveitanyway.
3
Reply Share
WaleedAsender 2yearsago
Ohgod,howiwasusingSublimeTextwithoutthesepluginsandsnippits!?!
1
Reply Share
AlejandroRubio 2yearsago
Imentionedthisinareplybelowalready,butforVIM,IalsoinstallVintageEx.ItworkslikeregularVIMinthatcolonbringsupacommandline,skipsthe
sublimepopup.
SublimeCursorBlockappearstonowloadfromPackageInstalleranddidn'trequirearestart.
1
Reply Share
matthewfordham 2yearsago
I'mtryingtowrapmybrainaroundVintagemode.Pressing"escape"doesnotworkforme,asstatedinthisarticle.Anyonehaveluckwiththis?
1
Reply Share
AlejandroRubio>matthewfordham 2yearsago
IfoundthatthingsworkedmoresmoothlyonceIusedpackageinstallertoalsoinstalVintageEx.Then,insteadofthesublimelikepopupwhenIhit
colon,I'dgetthe(morefamiliar)commandlikeandwasabletoentermyVIMcommands.Escapewasn'tneededotherthantoclosethatcommand
line,andremainincommandmode.
Reply Share
Guest 3yearsago
TheretwopackagesforSublimethatIsimplycan'tlivewithoutthesedays...Well,twothataren'talreadylistedhereatleast.:)
So,toexpandabiton#12,ifyoufindyourselfswitchingthemesquiteoften(asItendtodo),thenonepackageworthlookingatisThemr
(https://github.com/skt84/Themr....
Also,IseeZenCodingwasmentionedverybrieflyatthebottomof#8,butthere'snodescriptionofwhatitis...Forthoseofyouwhodon'tknow,it'sa
abbreviationexpansionpluginthatworkswithmanypopularcodinglanguages.Itessentiallyturnsthis:
ul#mylist>li.first+li*3+li.last
Intothis:
<ulid="mylist">
<liclass="first"></li>
<li></li>
<li></li>
<li></li>
<liclass="last"></li>
</ul>
Anyway,it'srecentlybeenreplacedbyapackagecalledEmmet(https://github.com/sergeche/em....Allthesamefeatures,newnameandmoreuptodate.
1
Reply Share
themanuelrc>Guest 2yearsago
Emmet,niceplugin:D
1
Reply Share
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
15/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Matt 3yearsago
Here'syetanotherreplacementiconmoreinlinewiththecurrentkeyboardbuttonlook:http://dribbble.com/shots/7072...
1
Reply Share
SebastianScaramuzza 3yearsago
GreatSoftwareandGreatArticle!!!:)
Ijustwanttoreportamistakeonthe5thtrick.Youwrote:
PressAltorCommandandthenclickineachregionwhereyourequireacursor.
ButforWindowsusersisCTRL,notAlt!!!
Hiiiiii!
1
Reply Share
TamsBarta>SebastianScaramuzza 3yearsago
Also,forLinuxusers(Ubuntu),sinceAlt+Mouse1isusuallyusedtomovewindows.
1
Reply Share
Tady 7monthsago
AnychanceofanupdatedversionofthispageforST3?ManyofthepackagesarenotavailableinPackageControlforST3(forexample,FetchandSublime
Alignment).Triedinstallingfetchmanuallyandcanonlymanagethepackages,don'thaveaccesstotheactualfetching.
Reply Share
Fissure 9monthsago
Changesublimetexticononwindows
seemore
Reply Share
VinayKashyap ayearago
ifijustwanttoaddclassorIDtoandexistingdivtagiwanttobeabletojusttype.or#andtheST2shouldautocompleteittoclass=""orid=""insidethe
existing<div>insteadofmehavingtotrypediv.+tabwhichcreateextralinesandtagshowdoidothis?
Reply Share
dan>VinayKashyap ayearago
thepluginyouarelookingforiscalledEmmet
Reply Share
maryan 2yearsago
Iwasalwaysmissingthebuiltinfilesdiffandmergeutilityuptotoday.IjustdiscoveredSublimergeandmylifegotblessed:)
Reply Share
Sariam 2yearsago
Itswasamazingandbutireallymissafeaturealwaysontopidothiswithwindowsthirdpartyextension.
Reply Share
ahmed 2yearsago
newuserbecauseofmultipleselection
Reply Share
Ajeesh 2yearsago
Itwouldbegreatifsomeonecancreateapluginforselectingatextandcopyingittotheclipboard.
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
16/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Itwouldbegreatifsomeonecancreateapluginforselectingatextandcopyingittotheclipboard.
Fornow,Iunderstandthat,thereisCTRL+DtoselectandCTRL+Ctodothis.
But,Iwonder,ifthereisanymethodtodoitonasinglekeystroke.
IdontknowPython,but,Iguess,forthosewhoPythonandSublimeTextplugindevelopment,itwouldbeveryeasy.
Reply Share
TEMITAYOAKEEM 2yearsago
CansomeonewhopmeintheassforusingSublimetextwithoutknowingallthese,Ohmy.............
Reply Share
RobertP. 2yearsago
BrilliantSoftandGreatPost!HappyCoding!:)
Reply Share
Nicolas 2yearsago
Hiandthank'sforthisarticle.
Iwouldknowifyouknowhowtomakelinkinsideaopeneddoc.
Assometimescssfilesareverylongtextfiles,isthereawaytohaveaminimenuto"jump"betweensectionsofthedocument?
Asifthecode(forexample):##automaticallyaddaanchorwithalinksublimecreated.
Thank'sforyourreply.
Nicolas.
Reply Share
tnanek>Nicolas 2yearsago
Youcancollapseareasofyourcodetomakethescreenmorelikeamenu,ifyoucommentandspaceitright.
Usingjavascript,thisworkswell:
[code]
/**
*Thisisanexamplefunctionthattakesparametersx,y,zandsetsvariablesa,b,ctothem.
*/
functionmyFunc(x,y,z){
//Ifx,setatox
if(x){
a=x
}
//Ify,setbtoy
if(y){
b=y
}
//ifz,setctoz
if(z){
c=z
}
}
[/code]
Reply Share
HimanshuMishra 3yearsago
nicearticle.thankyou.:)
Reply Share
jefftschwartz 3yearsago
I'mworkingwithamixofthesamepluginsyoumentioned,Jeff.Unfortunately,ithasleftSublimeunstableandpronetonumerouscrashes.Iamrunning
thelatestofficialrelease2.0.1,build2217andnotthebleedingedgereleasesbecausethoseareonlyavailabletolicenseholders.Iwon'tpurchasealicense
untiltheyreleasethenextgenerallyavailableversionanditisabletohandlethemixofpluginsI'musingnow.AsmuchasIwashopingtomakeSublime
myprimarydevelopmentenvironment,WebStormhasbecomethatformeandI'mlovingit.ThefolksoveratJetBrainsareconstantlyfeedingusnewpoint
releasesandtheyarediligentaboutrespondingtoissues.Sofornowatleastit'sWebStormformeandI'menjoyingitverymuch.
Reply Share
curtisblackwell 3yearsago
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
17/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
"youcanalsotype,Control/Command+p,andthen:LINE_NUMBER."
doesn'tworkforme.
Reply Share
Cosmin>curtisblackwell 3yearsago
Haveyoutyped":"beforethenumberitself?e.g.:25
Reply Share
curtisblackwell>Cosmin 3yearsago
yes.
Reply Share
RicardoZea 3yearsago
To"AutoformatHTML",youdon'tneedapackage.
Allyouneedtodoisoneofthreethings:
1.GotoEdit/Line/Reindent=Toofrigginglong.
2.TypeAlt+E+L+R=SamethingasaboveandcertainlyMUCHfaster,but3rdoptionisevenfaster.
3.TypeCTRL+SHIFT+R=NoneedtohavetheyourHTMLmarkupselected
Now,for#3youneedtocreatetheshortcutsinceSublimeText2doesn'tcomewithitforthisfunction.VERYweirdifyouaskme.
Andcreatingtheshortcutisnotdifficultatall.It'salsoaonetimestep:
A.GotoPreferences/KeyBindingsUser(ablankfilewillopen)
B.Inthatfilepastethefollowingpieceofcode:
[
{"keys":["ctrl+shift+r"],"command":"reindent","args":{"single_line":false}}
]
NOTE:Itdoesn'thavetobeCTRL+SHIFT+R,justchangethekeystowhateveryoufeelcomfortable.
Done:)
Reply Share
RicardoZea>RicardoZea 3yearsago
Pleasedeletethispostsinceit'sincomplete.Tnx
Reply Share
Jay 3yearsago
DoingsomeevaluationofSublimeText2andI'malmostcertainlybuyingit.IloveEspressoonmyMacs,andIuseNotepad++onWindowsbecausethere
hasn'treallybeenanythingbetter(ifyoudon'tcountVimofcourse...Ihavenotbeenabletowrapmyheadaroundthatone,andIjustdon'thavethetime
toreallydiginandlearnit),andGeditorKateonUbuntu.ThefactthatST2isonallplatformsisenoughformetobuyitnow.
Butthere'sonethingthatI'mtryingtofigureoutifit'sevenpossible:Multiselectionpointswiththekeyboardonly.
Iknowyoucanholddowncmd/alt/superandclickpointstohavemultipleselections,butitseemslikeitwouldbesomuchfasterifyoucouldhitashortcut
tomarkaspot,alt/ctrl+tabtothenextword,markthenextspot,repeatuntilyou'vemadeyourselectionsandthenstarttyping/makingyouredits.
ThiscametometodaywhenIwastryingtosortacommaseparatedlistofcitynames,andtodothatIhavetofirstputeachcityonit'sownline,selectthe
lines,sort,thenrejointhelines.Currentlyhavingtoalt/cmd+clickinfrontofeachcitytomarkselectionsbecauseitseemskeyboardonlymultiselectis
onlyinacolumnandnotabletosplittheselectionpointsonaline,orevenoverseverallines.
AmIjustmissingtheshortcuttodothis,oristhereperhapsaplugin/packageavailabletodothis?
Reply Share
b00nz00 3yearsago
Ineedapluginthatformatcodelikecmd+FinAptana...Someoneknowifexist?
Reply Share
Afflicto>b00nz00 2yearsago
Ohyeah.iwantthattoo,Imissthat!
Reply Share
jcook 3yearsago
I'vebeentryingST2forafewdaysnowanditlooksinteresting,butIhaven'tfoundthesecretbuildsystemincantationrequiredtoletST2seemy
PYTHONPATH.I'veaddedan"ENV"statementinthebuildfiletonoeffect.AmImissingsomething?
Reply Share
Macap 3yearsago
Theitem7doesnotworkscorrectlyinversion2.0.1..
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
18/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
Youcanusethisstepsinstead:
http://wbond.net/sublime_packa...
regards
Reply Share
Socks 3yearsago
Higuys,greatarticle.
AnyoneknowswhichisthebeautifulcolorthemeintheIndentGuidesscreenshot?
It'samazing!
Reply Share
JeffreyT.Schwartz 3yearsago
Greatarticle,Jeff.YourpassionforVIMconvincedmetogiveitatry.Iloveit.IalsoloveST2.SonowI'mfacedwithaquandaryeverytimeIneedtoedit
somethingwhichoneofthesegreateditorsdoIuse?I'vegotVINTAGEmodeturnedoninST2andit'slikehavingyourcakeandeatingittoo.
I'malittlebitolderthanyou(OK,alotolderlol)andbackinthedaysofMSDOSmyeditorandwordprocessingprogramofchoice(notmuchchoice
reallybackinthosedays)wasaprogramcalledWordStarwhich,amongotherthings,hadasimilarkeyboardmodeofmovementthatVIM'scommand
modehas.WheneverythingturnedGUIWordStarwastobenomoreandImisseditdearly.VIM,inmanywaysbringsbackmanyofthosejoysthatIhad
whenusingWordStar,namelyneverhavingtotakemyhandsoffthekeyboardandrelyingonthehomerowkeystodo99.99ofthemovementI'dneedina
document.
TextmatewasagreateditorbutIfearthatnow,withitsreleaseasOSandhostedonGIT,aversion2willneverseethelightofday.Itsprolongedstateas
anAlphareleaseledmetoVIMandtoST2.There'sanexpression,"whenonedoorclosesanotherdooropens",andinthiscaseitcertainlyringstrue.
There'salsoanotherone,"TheKingisdead.LonglivetheKing."
Thankyouforallthegreatvideotutorialsandarticles.Keepatit.
JeffSchwartz
Reply Share
JeffreyWay>JeffreyT.Schwartz 3yearsago
Thanks,Jeffrey!WhetheryouendupwithVimorSublimeText...thereisn'tawrongchoice.Botharefantastic.
Reply Share
BrunoBatista 3yearsago
Ispossibletogetthefilenametoincludewithsnippet?
http://www.sublimetext.com/for...
Reply Share
AntoxaGray 3yearsago
I'mgladit'sstillfreesoftware.
Reply Share
Matt 3yearsago
InoneofJeffrey'stutorialshesaysthathehasdeletedSublimesdefaultsnippetsandaddedhisownsnippetstomakethemeasiertoremember.
Ifollowedalongandhavemadesomesnippets,alotofthemworkwellbutafewseemtobegettingoverriddenbythedefaultsnippets.
Doesanyoneknowhowtodeletethesedefaultsnippets?
Thanks
Reply Share
PinkieB 3yearsago
Ihavetosay,IthinkI'maprettycompetentcomputeruserIhavenoproblemusingacommandlineandIhavebasicexperienceinmultiple
programminglanguagesbutIcan'tevengettheprogramtoproducea.pdfandnoneoftheonlineguidesmakeanysense.Howaboutusingsome
*English*?Orprovidingadictionary?Ormaybejustdistributingtheprograminawaythatworks?
Advertisement
Teachingskillstomillionsworldwide.
19,978
Tutorials
570
VideoCourses
FollowUs
HelpandSupport
FAQ
TermsofUse
ContactSupport
AboutTuts+
Advertise
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
19/20
7/11/2015
SublimeText2TipsandTricks(Updated)Tuts+CodeTutorial
TeachatTuts+
TranslateforTuts+
Meetups
EmailNewsletters
GetTuts+updates,news,surveys&offers.
EmailAddress
Subscribe
PrivacyPolicy
Customdigitalserviceslikelogodesign,WordPressinstallation,videoproductionandmore.CheckoutEnvatoStudio
Buildanythingfromsocialnetworkstofileuploadsystems.BuildfasterwithprecodedPHPscripts.BrowsePHPonCodeCanyon
2015EnvatoPtyLtd.Trademarksandbrandsarethepropertyoftheirrespectiveowners.
http://code.tutsplus.com/tutorials/sublimetext2tipsandtricksupdatednet21519
20/20