Created
May 6, 2014 18:12
-
-
Save craigkeeling/108e49042a61f46e5c15 to your computer and use it in GitHub Desktop.
Find/replace those curly ones
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
# 1. Make a folder under your Data/Packages folder, call it "Straight Quotes" | |
# 2. Create a file in there called "Straight Quotes.py" and paste in the following: | |
# 3. Create another file in there called "Main.sublime-menu" (see that filename) | |
# http://www.sublimetext.com/forum/viewtopic.php?f=3&t=14451 | |
import sublime, sublime_plugin | |
class StraightQuotesCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
for rgn in self.view.find_all("[“”]"): | |
self.view.replace(edit, rgn, "\"") | |
for rgn in self.view.find_all("[‘’]"): | |
self.view.replace(edit, rgn, "\'") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment