Following is my command in a plugin that is banded to ctrl+’(not ctrl+`). It does not work exactly. It is expected to add the 3-quote mark to the beginning side and end of the selected region(s). However, in fact, the open quote-mark lies on right place, but the close dose not, it inserts to the last-third of the region. Why? How?
class AddQuoteCommand(PyBasicCommand):
# a simple command that appends 3-quote mark to the two sides of selected region(s)
def run(self, edit):
for sel in self.view.sel():
b, e = sel.begin(), sel.end()
self.view.insert(edit, b, "'''")
self.view.insert(edit, e, "'''")
system: winxp
version: 3.3083
ps: There are so many posts unrelated to sublime