SublimeText-3 Pro tips

Sachith Muhandiram
4 min readMar 19, 2020

--

Image source : https://css-tricks.com/wp-content/uploads/2018/05/sublime-text-logo.jpg

Today I will share some pro tips to use with Sublime Text-3, which was my favorite editor a few years ago. Before I switched to vscode.

These are a few but helpful shortcuts every sublime user should know. I hope these will make your coding life very easy and comfortable.
Note : => is not a key word, I just use it to show you what is the next step.

  1. Find a file in working directory

ctrl+p -> filename

Description : When you need to find a file inside your working directory and you know the name of that file (at least a fraction of it). Else you have to use sidebar.

2. Find a function from a file

ctrl+p -> @method

Description : When you need to find a method inside your file, get the command pallet and
just type @. This will bring all the functions inside your working file.

3. Find a word from file

ctrl+p -> #word

Description : When you need to find a word. after you get command pallet just type #. Then
type the first few letters of the word you need to find.

4. To find a line

ctrl+p -> :line_number

Description : This is really helpful when you are debugging your program. You can just find
the exact line you need just by getting command pallet and type : line number.

5. Find unsaved changes

right-click -> show unsaved changes.

Description : This is helpful to see unsaved changes in your file. You can have a clear look at your file changes before saving them. Sublime gives a command line like window at the bottom. You can see places with +or -where you made changes.

6. Put tags to file

alt+shift+w

Description : Default this will give you <p> </p> tag, but you just have to put the tag you need. Really helpful when work with html.

7. Put tag to multiple lines

select text area need to tag -> alt+shift+w

Description : Don’t panic you forgot to place a html tag in your code. Just follow above steps and you are done.

8. Bring a line/word to somewhere

select the word -> ctrl+shift+arrow keys

Description : If you used cut and paste to bring a line to few place above or below, just try this one. Clean and smooth.

9. Duplicate a line

select words -> ctrl+shift+d

Description : just place your mouse pointer inside the word/line in your code and then click the key combination.

10. Remove a line

select line text -> ctrl+shift+k

Description : This removes the entire line and brings the line below into the right place. The code format does not change. That is the advantage of this code.

11. Bring a line left or right

select word / line -> ctrl + left/right arrow

Description : This creates a one tab space to left or right.

12. Bring your code into a coding standard

select code area -> Menu -> Edit -> Line -> Re-intent

Description : If you have a messy code, and trying to bring it into a standard format line by line.That was history. Just use this default method. This really helped me. Hope this would be the best trick you may learn :-)

13. Get multiple views

Menu -> View -> Layout -> Your selection

Description : When you need to work in multiple files, you can use this option.

I used Sublime Text editor for development works for years now. Mainly because its open source and uses limited resource . During my software internship, my friend said “Use a rich IDE like PHP Storm for Laravel development works”.

I tried to use it, but need to crack it and when its running my laptop got very slow. So I decided to go with my old buddy Sublime. Then looked for some YouTube videos about ‘How to make Sublime more powerful’. I found this helpful tutorial series from LearnWebCode channel.

To become familiar with these you have to do more and more coding. I hope these commands will help you to save your time and make coding much more fun. Enjoy this and please comment if you have a problem.

PS : Right now I use VSCode, just because its rich nature and easy integrations for languages and Docker. But as its Covid-19 WFH situation, I may try to go back and use Sublime Text-3.

--

--