If you maintain nice, clean indenting within your document, you'll be able to quickly fold and unfold several levels of code in just a few key strokes. Selecting the code you want to fold can be a pain. *Note: Windows users, substitute command and option for CTRL + SHIFT Block level code folding is where its at! To unfold your code, hit the opposite Command + Option + ]. You'll now see you have a little icon indicating you have folded some code. Select the text you want to fold and hit Command + Option + [. you want to select a few lines of text and fold them out of the way. This is probably what you came here looking for. Copy and paste this into Sublime and set the document mode as JavaScript. I've created a small snippet of JavaScript which we can use to practice. With those cautions in mind lets take a look at how to work code folding in Sublime.Ĭode folding works in all languages. This is the first iteration of code folding in sublime text 2, so I'm sure it will only get better. The code is also folded into a single character which makes it easy to delete an entire block of folded code without noticing you have done so. Unfortunately, collapsing of code in sublime text isn't exactly the same as textmate, so you dont get the little arrows in the sidebar. To continue on with my string of blog posts on Sublime Text, I'm going to show you a short but handy feature that was just pushed to the stable build.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |