Sublime text editor

Overview

This Tutorial will teach you how to use and configure Sublime Text.

  1. How to install packages in sublime text editor
  2. How to remove packages in sublime text editor
  3. Visual requirements
  4. Ftp connection
  5. Git  
  6. Find & replace
  7. Bonus
  8. Pros & cons

Features of Sublime text editor

1. How to install packages in sublime text editor

Package control: To install package control, follow the instructions below:

Procedure:

  1. Open the command palette
    win/Linux:ctrl+shift+p, mac:cmd+shift+p
  2. Type install package control, press enter
  3. When you click on the package control:install package, the package window appears  as shown below. You can search for the particular  package and press enter.
  4. Preferences > package setting show all your installed packages.installation of packages

2. How to remove packages in sublime text editor

To remove package control, follow the instructions below:

Procedure:

  1. Open the command palette
    win/Linux:ctrl+shift+p, mac:cmd+shift+p
  2. Type remove package control, press enterremove package in sublime

3. Basic Requirements

  • Code styling (auto)
  • Code beautification
  • Auto complete tag
  • Commenting options
  • Shortcut keys
  • Error detection
  • Automatic code suggestion

3. FTP connection

  • Remote FTP/SFTP with sublime
  • FTP connection within multiple accounts
  • Auto complete on save
  • Comparison with remote
  • Upload & download multiple files
  • Remote FTP/SFTP with sublime

    1. Install sftp via package control (ctrl+shift+p) go to the package control:install package and press enter then type sftp. Selecting sftp will start to install package
    2. Right click on the folder icon/name and go to sftp/ftp > map to remote and set the configuration and save file as sftp-config.jsoninstall FTP in sublime
  • FTP connection within multiple accounts

    • Right click on the folder icon/name and go to sftp/ftp > add alternate remote mapping this will create alternative sftp-config-alt.json file.
    • Set the configuration with another account and save file.
    • Right click on the folder icon/name and go to sftp/ftp > switch remote mapping option show the multiple remote accounts. Select one and right click on the folder & upload file.multiple remote connection in sublime
  • Auto complete on save

    • In the ftp-config.json file "upload_on_save":false, set to true 
  • Comparison with remote

    • Right click on the folder icon/name and go to sftp/ftp > Diff remote file.this will show the comparison with remotedifferentiate with remote file
  • Upload & download multiple files

    •  Right click on the folder icon/name and go to sftp/ftp >Upload file 
    •  Right click on the folder icon/name and go to sftp/ftp >Upload folder
    •  Right click on the folder icon/name and go to sftp/ftp >Download file
    •  Right click on the folder icon/name and go to sftp/ftp > Download folder

5. Git

  • Git in sublime text

  • Highlight untracked and staged files

    The sidebar will show the git status of files and folders with a icon like,
    • Untracked
    • Modified
    • Missing
    • Staged addition
    • Staged modification
    • Staged deletion
  • Git all facilities

    • Install sublime merge package
    • Right click on file > open git repositorygit features
    • Tools > command palette >search git status will display status window with tracked and untracked files. We can perform multiple action on it using the short keys given below,git in sublime

6. Find & Replace

  • Find and replace in particular extensions files inside folder
  • Find and replace in current, selected files
  • Find and replace in folder
  • Find and replace within multiple files
  • Find and replace in particular extensions files inside folder

    • Using extensions like .js, .php, /project/*js we can find words and replace.
  • Find and replace in current, selected files

    • You can find word in file and replace with another word
  • Find and replace in folder

    • Type word which you want to replace & the name of the file or folder and replace word
  • Find and replace within multiple files

    • Find>find in files and then type word which you want to replace & the name of the file or folder and word you want to replace with.find and replace in sublimefind and replace in sublime

6. Workspace

  • Create workspace/project

    • Project > add folder to project >open recent project.
  • Switch between projects

    • Project > switch project > select another project.manage workspace

7. Bonus

  • Code snippet

    • You can create your own snippet in sublime (tools > developer > new snippet).
    • Add / before $.
    • Save snippet with filename.sublime.snippet.
    • Add snippets in other files(tools > snippet >search snippet which you create).snippets in sublimesnippets in sublime

8. Pros & cons

  • Pros

    1. Better find replace feature than others.
    2. Accurate syntax suggestions.
    3. Color coding:Every element in your code is color coded.this makes it very easy to debug your code.
    4. Can easily work with multiple projects without confusion.
    5. Easy to use.
    6. Ftp connection within multiple accounts.
    7. Automatic syntax checking & support for various languages.
  • Cons

    1.  Less & complicated plugins.

Conclusion

Sublime is a flexible and fast code editor.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.