11/21/2023 0 Comments Using launchbar multiple copy![]() I’m going to have to play with it a bit and see how it goes. However, since I want this functionality so I can immediately paste what I selected, when I then click to put the insertion point where I want to paste, I get more on_selection_modified events, but this time region.empty() will be true, so I can put what I stored onto the clipboard, then paste. When selecting text with the mouse, region.empty() is false when the mouse button goes up (ie, the selection is over), so I don’t know that the selection has actually ended. So after a bit of experimenting, it might suffice, at least for now. But for my purposes, that actually might work. So I would not know when the selection stopped until a second mouse down. In fact, if you have something selected, it stays selected on a new mouse down, then clears on the mouse up. That almost works, except the selection will be true if something is selected, even on the last firing of the event on the mouse up. But I’m not sure if enough people would use it to warrant it being part of the core. Better than that, though, would be for ST2 to have a copy_on_select option (default to false, of course) that would let ST2 handle this internally. Then I could just check the view to see if anything is selected and run_command(‘copy’) when necessary. Ideally, I’d like to have an on_selection_complete event that fires when the entire selection event is completed. Looking through the API documentation, I don’t see anything that I could use to make this idea work, but I wanted to ask here in case I’m missing anything. I did a simple: import sublime, sublime_pluginĬlass CopyOnSelectCommand(sublime_plugin.EventListener):Īnd selecting the first line from beginning to end prints (0, 0)] It fires once on mouse_down and again on mouse_up, even if nothing is selected. It acts more like a mouse event than a selection event. I thought of the on_selection_modified event and issuing n_command(‘copy’), but that is not going to work. ![]() The Option view in nearly all items lets you customize results even further.I’d like to mimic iTerm’s “copy on select” functionality, that is, when I’m finished selecting something, I’d like it to be automatically copied to the clipboard. If you never want certain apps to appear as matches, use the Applications index item to uncheck the ones you wanted omitted. You can Control-click any item in the list and choose Disable to remove it from the index. I continue to tweak this list over time, particularly as the developer adds and improves it.įor instance, you might want to avoid Calendar entries, Safari Bookmarks, and songs in your Music library from matching. Sometimes that can be too much for your needs. A list scrolling down the left-hand side shows everything LaunchBar takes into account when you type into its bar. New users to LaunchBar should start with the LaunchBar Index, accessible via Index > Show Index. LaunchBar displays more information about contacts, exposes the innards of an application package, plops you into a file directory’s contents, or just provides its reasons for why you’re seeing that result. You can also drill down into details for an item by pressing the right-arrow key for almost any match. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |