Skip to content

Instantly share code, notes, and snippets.

import sublime, sublime_plugin
import datetime
class SimplyInsertDateCommand(sublime_plugin.TextCommand):
def run(self, edit):
dateAsStr = datetime.datetime.today().strftime("%d.%m.%Y")
sels = self.view.sel()
cursor1 = sels[0]
self.view.insert(edit, cursor1.begin(), dateAsStr)
[
{ "keys": ["ctrl+alt+w"], "command": "close_workspace" },
{ "keys": ["ctrl+alt+o"], "command": "prompt_open_project" },
{ "keys": ["ctrl+alt+s"], "command": "save_project_as" }, //doesnt work
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_explorer" },
{ "keys": ["ctrl+shift+x"], "command": "open_localhost_in_explorer" },
//{ "keys": ["ctrl+alt+d"], "command": "simply_insert_date" },
{ "keys": ["ctrl+shift+r"], "command": "refresh_folder_list" },
{ "keys": ["ctrl+shift+b"], "command": "toggle_side_bar" },
{ "keys": ["alt+."], "command": "reveal_in_side_bar" },
{
"always_prompt_for_file_reload": true,
"color_scheme": "Packages/User/Coda.tmTheme",
"default_line_ending": "unix",
"detect_indentation": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 10.0,
"hot_exit": false,
"ignored_packages":
<snippet>
<content><![CDATA[
echo '<pre class="${2:debug-me}" style="color:#${3:666}; width:500px; font-size:11px; white-space: pre-wrap;">';
echo '($1): ';
var_dump($1);
echo '</pre>';
exit;
]]></content>
<tabTrigger>pre</tabTrigger>
@hamsterbacke23
hamsterbacke23 / Coda.tmTheme
Last active December 27, 2015 18:19
coda theme angepasst
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Coda</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@hamsterbacke23
hamsterbacke23 / deleteSpotifyFolder.bat
Created November 15, 2013 09:54
Autostart Delete Spotify Folders
rmdir /s /q "%userprofile%\AppData\Local\Spotify\Storage";
rmdir /s /q "%userprofile%\AppData\Local\Spotify\Browser";
@hamsterbacke23
hamsterbacke23 / npm.sublime-build
Created February 26, 2014 15:20
sublime build
{
"cmd": ["grunt", "version"],
"shell" : "true",
"variants": [
{ "cmd": ["grunt", "build"],
"name": "Concrete5 package: Get rid of grunt and cli stuff",
"shell": true
},
@hamsterbacke23
hamsterbacke23 / gist:9682999
Created March 21, 2014 10:00
sublime klickmodell to concrete5 areas regex
// strg - h
(.*)echo(?:\s.*)isset\(\$areas\['(.*)'\]\).+
$1$a = new Area('$2');\n$1$a->display($c);
@hamsterbacke23
hamsterbacke23 / html bootstrap
Created April 30, 2014 07:37
html bootstrap
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Bootstrap 101 Template</title>
@hamsterbacke23
hamsterbacke23 / grunt-regex-links
Created June 30, 2014 08:07
grunt regex replace intern links