Sublime Text 3 Best Packages (Plugins) and Settings

Plugins

1. Package Control

This is required to install any package (this will be already installed if you have installed any package before)
https://packagecontrol.io/installation

2. Clang Format

Benefits

This Package has many advantage. You can decide in one set of coding guidelines and create Custom Style file in clang format and distribute it with your project code. This way every develop can use this coding style without much effort and complete project will be in one consistent format. No trailing white spaces , not bad indentation, no long lines and over all easy to read and review.

  1. Install clang in windows

Note : during installation it will ask if you want to add binary path to environment path. check that box. doing this you will not need to do 3rd point.

windows 64bit https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe

windows 32bit https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win32.exe

  1. Install package in sublime

open sublime.press “Ctrl+Shift+P”

type “Install Package” and press “Enter”

<wait 2-3 sec for it load >

type “Clang Format” and click on package in drop down list

<now it will install the package in background and open a release note in new tab>

  1. Update path to binary
{
// if binary is present in environment path
// otherwise go to install directory and copy location to clang-format.exe and // paste it here 
	"binary": "clang-format.exe"
// if format_on_save is true, clang format settings applied on save other wise // use Ctrl+Alt+A to apply clang format on selected code
        "format_on_save": false,
}

Reference:

https://packagecontrol.io/packages/Clang%20Format

https://github.com/rosshemsley/SublimeClangFormat#clang-format

3. Highlight

Benefits

I like this plugin because it make sharing code snippet over mail and chat a pleasant experience for everyone.

By default when you copy paste code in mail or chat all formatting and colors are lost but this package help you keep all that intact and help you share a very readable code.

Install

do Shift+Ctrl+P and type SublimeHighlight and select package from drop menu

Reference:

https://packagecontrol.io/packages/Highlight

https://github.com/n1k0/SublimeHighlight#sublimehighlight

4. Easy Clang Complete

benefit

obvious benefit is it make writing code faster and easier.

Install

do Shift+Ctrl+P and type Easy​Clang​Complete and select package from drop menu

Reference:

https://packagecontrol.io/packages/EasyClangComplete

https://niosus.github.io/EasyClangComplete/

5. Outline

Benefits

Some good editor provide this feature natively but in sublime there is still no best way to get a list of methods/functions but this one is can make life easier for some.

Install

do Shift+Ctrl+P and type Outline and select package from drop menu

Reference

https://packagecontrol.io/packages/Outline

https://github.com/warmdev/SublimeOutline#outline-for-sublime-text-3

6. Sublime Merge

benefits

This is not a package like others but its a separate program which adds “Git” functionality to Sublime. You can right click inside a file already opened in sublime and you will see option to see file history, line history, commit details, branch details etc. It adds great value if the code you are working on is a git repo.

Reference

https://www.sublimemerge.com/

Settings

Benefits

I like following settings in sublime these does make life easier, since you don’t have care about line endings, trailing spaces and tabs showing up in code review process.

File Location

Go to Preference->settings

{
// Determines what character(s) are used to terminate each line in new files.  // Valid values are 'system' (whatever the OS uses), 'windows' (CRLF) and      // 'unix' (LF only).
"default_line_ending": "unix",

// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true,

// Set to true to removing trailing white space on save
"trim_trailing_white_space_on_save": true
}