एक संभावित समाधान बुकमार्क्स का उपयोग करना है (यदि आप पहले से नहीं हैं)। मैं अपने सिर के शीर्ष से लिनक्स कुंजी बाइंडिंग नहीं जानता, लेकिन आप बुकमार्क जोड़ सकते हैं, फिर सभी का चयन करें। अपने प्लेटफॉर्म के लिए बाइंडिंग देखने के लिए, Goto -> Bookmarks
पर जाएं, उन्हें कमांड द्वारा सूचीबद्ध किया जाना चाहिए। आप डिफ़ॉल्ट कुंजी बाध्यकारी फ़ाइल को भी देख सकते हैं।
एक दूसरा समाधान प्लगइन का उपयोग करना है। मैंने कुछ समय पहले लिखा था। वास्तव में यह नहीं कह सकता कि यह कितना अच्छा काम करता है, क्योंकि मुझे याद नहीं है। इसके साथ एक त्वरित परीक्षण मुझे विश्वास दिलाता है कि यह ठीक काम करता है।
import sublime
import sublime_plugin
class MultiCursorCommand(sublime_plugin.TextCommand):
def run(self, edit, action="add"):
self.key = "multi_cursor"
cursors = self.view.sel()
saved_cursors = self.view.get_regions(self.key)
if action == "add":
self.view.add_regions(self.key, list(cursors) + saved_cursors, "keyword", "", sublime.DRAW_EMPTY)
elif action == "show":
cursors.add_all(saved_cursors)
self.view.add_regions(self.key, [])
elif action == "show_begin":
saved_cursors += list(cursors)
cursors.clear()
cursors.add_all([c.begin() for c in saved_cursors])
self.view.add_regions(self.key, [])
elif action == "show_end":
saved_cursors += list(cursors)
cursors.clear()
cursors.add_all([c.end() for c in saved_cursors])
self.view.add_regions(self.key, [])
elif action == "show_visible":
pass
elif action == "clear":
self.view.add_regions(self.key, [])
elif action == "remove":
for cursor in cursors:
if cursor in saved_cursors:
saved_cursors.remove(cursor)
self.view.add_regions(self.key, saved_cursors, "keyword", "", sublime.DRAW_EMPTY)
class RemoveCursorCommand(sublime_plugin.TextCommand):
def is_enabled(self):
return len(self.view.sel()) > 1
def run(self, edit, forward=True):
self.view.sel().subtract(self.view.sel()[0 if forward else -1])
कुंजी बाइंडिंग संभवतः वाले प्लग इन लोगों ने लिखा है कि पैकेज नियंत्रण पर हैं कि एक ही बात कर रहे हैं की तरह
{ "keys": ["alt+a"], "command": "multi_cursor", "args": {"action": "add"} },
{ "keys": ["alt+s"], "command": "multi_cursor", "args": {"action": "show"} }
कुछ ऐसी दिखाई देगी, मैं सिर्फ उन्हें के बारे में पता नहीं कर रहा हूँ।