That’s about a million times better than clicking CTRL + D a hundred times because your main variable changed!” Don’t worry, Sublime has got you covered. Now, if you’ve coded for a bit you might say “Well, that’s great, but if I want to do that in my editor of choice, I just have to search & replace. Sublime Text finds every occurrence of the selected word, and with every press of CRTL + D it selects the next one! E.g., if you want to change the name of a variable, all you have to do is select it, press CTRL + D a bunch times and write the new one! The magic starts happening when you press it multiple times. When you click it for the first time, it selects the word your cursor is placed in. Wait, didn’t I tell you, your hand won’t have to leave the keyboard anymore for full immersion? You’re right, that’s why there’s two more keyboard shortcuts which make your life easier.ĬTRL + D is the first one. Then you can write at different positions in your code at the same time, so you don’t have to repeatedly write the same thing over and over. The easiest way to use it is CTRL + Click, which you can place multiple cursors with. Basically, it allows you to edit multiple words in different lines of your file at the same time, just as if you had multiple cursors. This is one of the hardest concepts to grasp when starting off with Sublime Text, but once you get the hang of it you never want to work with another code editor again. (It almost seems to know which file I want to open!) Multiple Cursors You just start typing the name of the file you want to open, and press Enter as soon as Sublime found it with its fuzzy search algorithm. Instead of issuing different commands, with the CTRL + P command you can search and open files in the integrated file explorer. To quickly change between files, use CTRL + P, which opens a similar bar like the command palette. Committing, adding, branching and pushing can be done without leaving your code editor and opening the command line, which is great for full immersion into your project. ![]() From here, you can handle your project, change the syntax of the current file and even use git! E.g., to initialize git in the current directory, just press CTRL + Shift + P, type `git init’ and you’re done. The most important shortcut is CTRL + Shift + p, which opens the Command Palette. Essential Vanilla Sublime Text Features & Commands The Command Palette All of this is possible because of a selected handful of excellent plugins and built-in commands. This saves time and energy, and my efficiency and immersion into the code noticeably went up after I started using it. I don’t even need to refresh my browser to see the changes! I almost never have to move my hand to my mouse anymore, almost all navigation in Sublime Text can be done with the keyboard. With a simple “CTRL-S”, all my changed files get compiled, minified, saved and then uploaded to my Web Server. ![]() It is available cross-platform for Mac, Windows and Linux, and it’s free! ![]() It’s brilliant features along with it’s great plugin ecosystem make this code editor my definite favorite. It all started when I tried out Sublime Text - and loved it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |