コード例 #1
0
 def run(self, edit):
     blocks = [block_at(self.view, p) for p in list_cursors(self.view)]
     set_selection(self.view, blocks)
コード例 #2
0
 def run(self, edit):
     for pos in list_cursors(self.view):
         word1 = word_at(self.view, pos)
         word2 = word_b(self.view, word1.begin())
         swap_regions(self.view, edit, word2, word1)
コード例 #3
0
 def run(self, edit):
     # We go from right to left to correctly handle overlapping regions
     for pos in reversed(list_cursors(self.view)):
         word1 = word_at(self.view, pos)
         word2 = word_f(self.view, pos)
         swap_regions(self.view, edit, word1, word2)
コード例 #4
0
 def run(self, edit):
    blocks = [block_at(self.view, p) for p in list_cursors(self.view)]
    set_selection(self.view, blocks)
コード例 #5
0
 def run(self, edit):
     for pos in list_cursors(self.view):
         word1 = word_at(self.view, pos)
         word2 = word_b(self.view, word1.begin())
         swap_regions(self.view, edit, word2, word1)
コード例 #6
0
 def run(self, edit):
     # We go from right to left to correctly handle overlapping regions
     for pos in reversed(list_cursors(self.view)):
         word1 = word_at(self.view, pos)
         word2 = word_f(self.view, pos)
         swap_regions(self.view, edit, word1, word2)