Advance usage of Sublime Text-3

          I am posting this for coding your life easily using Sublime Text -3. 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) To find a file :
         Keys            : ctrl+p  => File name.

         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) To get a method in a file :
        Keys            : 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) To find a word in a file :
        Keys            : 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 : 
        Keys           : 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) To find unsaved changes :
        Keys           : mouse 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) To put tags to file : 
        Keys            : 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) To put tag to multiple lines :
         Keys            : select the text area you need to place 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) To bring a line/word to somewhere :
        Keys            : 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) To duplicate a line : 
        Keys            : click in between word => ctrl + shift + d

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

10) To remove a line :
        Keys            : click in between word => 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) To bring a line left or right :
         Keys            : click in between word => ctrl + [ or ]  (left [ , right ] )

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

12) To bring your code into a coding standard :
         Keys            : select area you need => menu bar => Edit => Line => Reindent

         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 was really helped me.
                           

13) Intelligent paste : 
        Keys            : copy the code => ctrl + shift + v

        Description : If you just use ctrl+v, the code you pasted get messy, you have to reindent that
                             again. But if you use Sublime's intelligent paste option no worries.

14) To get multiple views : 
          Keys            : menu bar => View => Layout => your selection

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


                  I am using Sublime Text editor for development works for years now. Mainly because of its open source and can run in a limited resource environment. During my software internship, my friend Dharshana said "Use a rich IDE like PHP Storm for Laravel development works".

                  I tried to install it and run, but need to crack it and when its running my laptop is getting 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.

Comments

Popular posts from this blog

Youtube-dl cheatsheet

Git mistakes - 1

Docker Development - Mistakes 1