This file contains 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
import sublime | |
import sublime_plugin | |
import OracleSQL.oracle_lib | |
class OracleGotoBodyCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
def _on_change(result): | |
try: | |
ln = int(result) - 1 |
This file contains 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
import sublime | |
import re | |
import os.path | |
import os | |
from . import oracle_lib | |
from Default import exec as execmod | |
RE_ENTITIES = re.compile("^\\((.+?)/(0):[0-9]+\\) ([0-9]+):[0-9]+ (.+)$", re.M) | |
class OracleExecCommand(execmod.ExecCommand): |
This file contains 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
''' | |
@author Josh Bjornson | |
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. | |
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ | |
or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
''' | |
import sublime, sublime_plugin | |
import glob, os, shutil, codecs, time, difflib, datetime |
This file contains 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
import sublime_plugin | |
import os | |
# ------------------------------------------- | |
# You will need to create a key mapping for this, something like: | |
# { "keys": ["alt+e"], "command": "switch_to_file" } | |
# ------------------------------------------- | |
class SwitchToFileCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
self.display_list = [] | |
self.views = [] |
This file contains 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
import sublime, sublime_plugin | |
import os.path, string | |
VALID_FILENAME_CHARS = "-_.() %s%s%s" % (string.ascii_letters, string.digits, "/:\\") | |
# { "keys": ["alt+o"], "command": "open_filename_under_cursor" } | |
# https://gist.github.com/1186126 | |
class OpenFilenameUnderCursor(sublime_plugin.TextCommand): | |
def run(self, edit): | |
for region in self.view.sel(): |
This file contains 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
import sublime, sublime_plugin, re | |
# Search for the text in the clipboard and cut the containing line to the clipboard | |
# { "keys": ["alt+x"], "command": "slurp_line_using_clipboard" } | |
# https://gist.github.com/1178622 | |
class SlurpLineUsingClipboardCommand(sublime_plugin.TextCommand): | |
def run(self, edit, block=True): | |
search_string = re.escape(sublime.get_clipboard()) | |
region = self.view.find(search_string, 0, sublime.IGNORECASE) |
This file contains 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
''' | |
@author Josh Bjornson | |
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. | |
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ | |
or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
''' | |
import sublime, sublime_plugin | |
import glob, os |
This file contains 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
import sublime_plugin | |
# { "keys": ["alt+m"], "command": "convert_to_fixed_column", "args": {"split_char": ";"}} | |
# https://gist.github.com/1178594 | |
class ConvertToFixedColumnCommand(sublime_plugin.TextCommand): | |
def run(self, edit, split_char=';'): | |
for region in self.view.sel(): | |
self.view.replace(edit, region, self.align_content(self.view.substr(region), split_char)) | |
def align_content(self, content, split_char): |
This file contains 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
''' | |
@author Josh Bjornson | |
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. | |
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ | |
or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
''' | |
# Plugin to provide access to the history of accessed files: | |
# https://gist.github.com/1133602 | |
# |