๐ Some useful Sublime Text configurations and usages
Sublime Package manager
First thing you have to do is to install the package controll manager. You can basically follow the instructions on this website https://packagecontrol.io/installation and have it installed on your Sublime Text.
After you install the package manager you can press
ctrl + shift + p
or on a Mac it is
โ + shift + p
to use the package controll manager to install, enable or disable packages that you want to use within Sublime Text.
Packages that are useful to almost everyone
- Babel
This helps you style es6 and JSX codes correctly
- SublimeLinter
- SublimeLinter-contrib-eslint
you need to npm install -g eslint
first to make this work
The sublime linters will point out what functions or variables are not used correctly. It highlights the syntax errors or unused variables and stuff in your files so that you can easily see. I think it looks for package.json
in the folder and once it found the found it will look for .eslintrc
in the same folder and apply the linting rules to all the subfolders.
- SublimeREPL
you can run an node.js or other languages interpreter inside sublime text
- ColorPicker (I donโt actually use this)
Surprisingly useful when youโre coding in css. The Eyedropper is similar to photoshop but it lets you to choose colors even on your desktop.
Snippets
Since I primarily code in Javascript I setup a console.log
snippet. Yes I am lazy but this gets things done.
<snippet>
<content><![CDATA[
console.log();
]]></content>
<tabTrigger>co</tabTrigger>
</snippet>
and later when you type co
and press tab
it will have a console.log for you.
<snippet>
<content><![CDATA[
JSON.parse(JSON.stringify());
]]></content>
<tabTrigger>jsonp</tabTrigger>
</snippet>
Or maybe this jsonp
snippet. I use this surprisingly often.
โ
references:
- https://packagecontrol.io/installation#st3
- http://www.sublimelinter.com/
- https://github.com/wuub/SublimeREPL
01 Jul 2015