Skip to content

Commit

Permalink
Fixes for some Sublime 3 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ttscoff committed Jul 9, 2013
1 parent 75189d0 commit 0f2f95c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 30 deletions.
14 changes: 7 additions & 7 deletions footnotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def run(self, edit):
self.view.end_edit(edit)

def is_enabled(self):
return self.view.sel()
return True


class InsertFootnoteCommand(sublime_plugin.TextCommand):
Expand All @@ -110,7 +110,7 @@ def run(self, edit):
self.view.end_edit(edit)

def is_enabled(self):
return self.view.sel()
return True


class GoToFootnoteDefinitionCommand(sublime_plugin.TextCommand):
Expand All @@ -137,7 +137,7 @@ def run(self, edit):
self.view.show(defs[target])

def is_enabled(self):
return self.view.sel()
return True


class GoToFootnoteReferenceCommand(sublime_plugin.TextCommand):
Expand All @@ -151,7 +151,7 @@ def run(self, edit):
self.view.show(refs[target][0])

def is_enabled(self):
return self.view.sel()
return True


class MagicFootnotesCommand(sublime_plugin.TextCommand):
Expand All @@ -164,7 +164,7 @@ def run(self, edit):
self.view.run_command('insert_footnote')

def is_enabled(self):
return self.view.sel()
return True


class SwitchToFromFootnoteCommand(sublime_plugin.TextCommand):
Expand All @@ -175,7 +175,7 @@ def run(self, edit):
self.view.run_command('go_to_footnote_definition')

def is_enabled(self):
return self.view.sel()
return True


class SortFootnotesCommand(sublime_plugin.TextCommand):
Expand Down Expand Up @@ -207,4 +207,4 @@ def run(self, edit):
self.view.end_edit(edit)

def is_enabled(self):
return self.view.sel()
return True
2 changes: 1 addition & 1 deletion gather_missing_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def run(self, edit):
self.view.end_edit(edit)

def is_enabled(self):
return self.view.sel()
return True
4 changes: 2 additions & 2 deletions insert_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def insert_link(self, linkurl, newref, actually_insert=True):
self.view.end_edit(edit)

def is_enabled(self):
return self.view.sel()
return True


# Inspired by http://www.leancrew.com/all-this/2012/08/markdown-reference-links-in-bbedit/
Expand Down Expand Up @@ -153,4 +153,4 @@ def insert_link(self, linkurl):
self.view.end_edit(edit)

def is_enabled(self):
return self.view.sel()
return True
20 changes: 11 additions & 9 deletions paste_as_link.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import sublime, sublime_plugin
import sublime
import sublime_plugin


class PasteAsLinkCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
sel = view.sel()[0]
text = view.substr(sel)
contents = sublime.get_clipboard()
view.replace(edit,sel,"["+text+"]("+contents+")")
def run(self, edit):
view = self.view
sel = view.sel()[0]
text = view.substr(sel)
contents = sublime.get_clipboard()
view.replace(edit, sel, "["+text+"]("+contents+")")

def is_enabled(self):
return self.view.sel()
def is_enabled(self):
return True
20 changes: 11 additions & 9 deletions paste_as_reference.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import sublime, sublime_plugin
import sublime
import sublime_plugin


class PasteAsReferenceCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
sel = view.sel()[0]
text = view.substr(sel)
contents = sublime.get_clipboard()
self.view.replace(edit,sel,"["+text+"]: "+contents)
def run(self, edit):
view = self.view
sel = view.sel()[0]
text = view.substr(sel)
contents = sublime.get_clipboard()
self.view.replace(edit, sel, "["+text+"]: "+contents)

def is_enabled(self):
return self.view.sel()
def is_enabled(self):
return True
4 changes: 2 additions & 2 deletions quote_indenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run(self, edit):
selections.add(selection)

def is_enabled(self):
return self.view.sel()
return True


class DeindentQuote(sublime_plugin.TextCommand):
Expand Down Expand Up @@ -70,4 +70,4 @@ def run(self, edit):
selections.add(selection)

def is_enabled(self):
return self.view.sel()
return True

0 comments on commit 0f2f95c

Please sign in to comment.