AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Unity3d sublime text theme1/18/2024 ![]() Permutations (reverse, shuffle, sort and unique) ![]() Alternatively, use the shortcut, ⌘+Ctrl+I Simply set up a multiple selection, open the Command Palette ( ⌘+Shift+P), and look for "Incremement selection" – this will insert 1-N into each cursor, or if you've selected a number, it will increment up from the first value. In fact, if it happens to be equals that you're aligning, you needn't even use multiple cursors, just ⌘+Alt+A on a selection.Īnother thing I often find myself doing is numbering things, which is pretty laborious done manually.Īgain, Sublime doesn't have anything for this out of the box, but you get a lot of the way there with the Increment Selection package. Now alignment is as simple as using multiple cursors, then hitting ⌘+Alt+A. Simply grab the bits you want, exit multiple selections (with Esc) and paste it elsewhere, or match the number of selections (in this case: 3) and paste into another multiple selection – super useful if you've got several things to name:Īnother thing I often find myself doing is lining things up for readability, now whilst Sublime Text won't do this out of box, Sublime Alignment can. Copy & paste selectionsĪnother killer feature of multiple selections is that Sublime Text knows how to handle copying and pasting them. Note that whilst the username line gets out of sync because it has one less word, its easily remedied by moving a few characters back, and then reselecting "populated". So taking my example, this is how you would change the latter portion of the method definition – using Ctrl+Left/ Ctrl+Right – despite the fact there are a different number of words each of different lengths. They're intuitive, easily remembered, and as you' expect, can be simply combined with Shift to select text.Īdditionally, for manipulating the selections I use: ⌘+Left/ ⌘+Right move to start/end of line.Ctrl+Left/ Ctrl+Right move one word left/right.You have a number of options available for complicated selections, but the main things I use are simply: Simple, right?Īn important skill to master to make multiple cursors as useful is learning how to traverse your document whilst using them. ![]() So how do you do it? Just select a piece of text and press ⌘+D to find the next occurence. And I am of the opinion, that you can get 90% of the way there in terms of writing code fast using this killer feature alone. Using multiple cursors has sped up my workflow by a factor or 10-20. I don't know how I lived before multiple cursors. Yet, on a day to day basis, I see people doing boring repetitive tasks manually in Sublime, on a computer, a machine designed to do boring repetitive tasks for you. I don't think it's the be all and end all of text editors, and I'm certain I could write code faster if I invested the time in Vim, but it simply doesn't meet any of my above criteria. having to do without when away from my machineĪ big advantage is being able to jump into a default setup and have as few of a foriegn machine's quirks interupting my flow.memorising hundreds of keyboard shortcuts.I am a big advocate of leveraging tools to help me do my job faster, and a big part of that is knowing how to utilise the power of a text editor/IDE to speed up day to day tasks.
0 Comments
Read More
Leave a Reply. |