Skip to content

Instantly share code, notes, and snippets.

@DaRaFF
Last active December 7, 2015 15:48
Show Gist options
  • Save DaRaFF/26d157c98eee41337ab1 to your computer and use it in GitHub Desktop.
Save DaRaFF/26d157c98eee41337ab1 to your computer and use it in GitHub Desktop.
sublime 3

Articles

Plugins

General

Coffeescript

Node

Shell

Sublime Keymap for PHPStorm

preferences -> settings user

{
"args":
{
		"parser": "markdown",
		"target": "browser"
},
"auto_complete_triggers":
[
	{
		"characters": ".@",
		"selector": "source.coffee, source.litcoffee, source.coffee.md"
	}
],
"command": "markdown_preview",
"font_size": 11,
"ignored_packages":
[
	"Vintage"
],
	"keys":
[
	"alt+m"
],
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
    "ensure_newline_at_eof_on_save": true,
    "rulers": [100],
    "scroll_past_end": true,
    "show_full_path": true,
    "highlight_line": true,
    "highlight_modified_tabs": true,
    "find_selected_text": true,
    "fold_buttons": false,
    "enable_tab_scrolling": false,
    "bold_folder_labels": true
}

preferences -> key bindings user

[
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} },
    { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+b"], "command": "goto_definition" },
{ "keys": ["alt+left"], "command": "jump_back" },
{ "keys": ["alt+right"], "command": "jump_forward" },
    { "keys": ["alt+shift+f"], "command": "reindent" , "args": { "single_line": false } }
]

better coffeescript plugin

# add this to .bashrc
export NVM_SYMLINK_CURRENT=true

# preferences -> package settings -> better coffeescript -> settings user
# add the home path from coffee "which coffee"
{
    "envPATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/daraff/.nvm/current/bin:",
    "binDir": "/usr/bin"
}

node requirer plugin

# preferences -> package settings -> node requirer -> settings user
{
    "quotes": "single",
    "semicolon_free": true,
    "var": "",
    "omit_extensions": ["js", "coffee"],
    "snippets": true
}

Templates

# cl.sublime-snippet
<snippet>
  <content><![CDATA[
console.log(${1})
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>cl</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <!-- <scope>source.python</scope> -->
</snippet>

# cls.sublime-snippet
<snippet>
  <content><![CDATA[
console.log(JSON.stringify(${1},10,4))
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>clj</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <!-- <scope>source.python</scope> -->
</snippet>

Add a shortcut to switch to sublime

"switch to sublime" wmctrl -a Sublime ctrl 3

Jump to the next window

http://askubuntu.com/questions/22207/quickly-place-a-window-to-another-screen-using-only-the-keyboard sudo apt-get install compizconfig-settings-manager sudo apt-get update && sudo apt-get install compiz-plugins

open compiz manager -> jump to next window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment