Created
September 26, 2014 20:14
-
-
Save fabiomontefuscolo/7006641160356ac00bf4 to your computer and use it in GitHub Desktop.
My Sublime 3 conf files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import hashlib | |
import sublime | |
import sublime_plugin | |
class Md5fyCommand(sublime_plugin.TextCommand): | |
def run(self, edit, *args): | |
for region in self.view.sel(): | |
if not region.empty(): | |
s = self.view.substr(region) | |
s = s.encode('utf-8') | |
s = hashlib.md5(s).hexdigest() | |
self.view.replace(edit, region, s) | |
class NumberingCommand(sublime_plugin.TextCommand): | |
def run(self, edit, *args): | |
i = 1 | |
for region in self.view.sel(): | |
if not region.empty(): | |
s = self.view.substr(region) | |
s = '%d. %s' % (i, s) | |
self.view.replace(edit, region, s) | |
i = i + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["ctrl+k", "ctrl+m"], "command": "md5fy" }, | |
{ "keys": ["ctrl+k", "ctrl+n"], "command": "numbering" } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"installed_packages": | |
[ | |
"GitGutter-Edge", | |
"Javascript Beautify", | |
"LESS", | |
"SublimeLinter", | |
"SublimeLinter-jshint", | |
"SublimeLinter-pep8" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"color_scheme": "Packages/User/Monokai (SL).tmTheme", | |
"detect_indentation": false, | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment