Go to Sublime Text 2 > Preferences > Key Bindings - User
and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}
Go to Sublime Text 2 > Preferences > Key Bindings - User
and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}
// Copy this to your keybindings (Preferences > Key Bindings - User) | |
// Change the keybinding, color schemes, and themes to your preferences | |
{ "keys": ["ctrl+1"], "command": "toggle_color_scheme", | |
"args": { | |
"light_color_scheme": "Packages/User/Espresso Soda.tmTheme", | |
"dark_color_scheme": "Packages/User/Monokai Soda.tmTheme", | |
"light_theme": "Soda Light.sublime-theme", | |
"dark_theme": "Soda Dark.sublime-theme" | |
} |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent