Home Download Buy Blog Forum Support

Is "Copy Bookmarked Lines" doable in Sublime?

Re: Is "Copy Bookmarked Lines" doable in Sublime?

Postby jps on Wed Sep 28, 2011 12:45 am

btw, 'Find All' on the find panel (which is bound to alt+enter) will do steps 3 and 4 for you
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Is "Copy Bookmarked Lines" doable in Sublime?

Postby ctrager on Wed Sep 28, 2011 2:01 am

Even better:

class CopyBookmarkedLinesCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.run_command("select_all_bookmarks")
self.view.run_command("expand_selection", {"to": "line"})
self.view.run_command("split_selection_into_lines")
self.view.run_command("copy")
ctrager
 
Posts: 5
Joined: Mon Sep 26, 2011 7:40 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: jbrooksuk, Yahoo [Bot] and 46 guests