Skip to content

Instantly share code, notes, and snippets.

{
"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":
[
{ "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" },
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)