Author Topic: FEATURE REQUEST: Choose clipboard entry by typing.  (Read 8916 times)

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
FEATURE REQUEST: Choose clipboard entry by typing.
« on: June 04, 2009, 04:37:55 AM »
Hi!

When you use Ctrl-L to list the clipboards, it's possible to type the entry number that you want and then hit enter to paste it.

What would be even better is to match on the "Text" column instead. Most of the time when I use this dialog I know what I want to paste, so if I could type the first few characters of this and the selection list reduces depending upon what I type it would be awesome.

The entry numbers constantly change so they are not that helpful.

So I guess what I'm saying is replace the number selection with the same algorithm used in the fast open dialog, working on the lines in the "Text" column.

I'm patting myself on the back now. Give me hero points, its a cool idea  :P

Cheers,
--
Greg.

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #1 on: June 04, 2009, 12:21:29 PM »
HP++.  It is a cool idea.  Heck, I rarely use the multiple clipboard feature (I grew up without it and never figured out how to make it work that quickly for me) and I think it's a great idea.

Why does it have to be the first few letters, though? If you know you're looking for a variable such as iLoopCounter, why not be able to select on that? If I have three snippets that contain that variable, I'd think that filtering by whatever I type (just like the quick-open) would help me more than the first few characters
if (...
vs
...iLoopCounter....

Jim.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #2 on: June 04, 2009, 04:02:27 PM »
A hero point for both of you!  I filed a CR for this. We'll see when we can get to it.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #3 on: June 04, 2009, 05:10:09 PM »
I'll also appreciate it for the new clipboard tool window. I've patched i-searching into the legacy sellist stuff in v12 for this reason :)
HS2

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #4 on: November 16, 2009, 11:18:37 PM »
Hi.

Further to this, perhaps we could use the same login to select an entry in the "Tags in Current File" aka Ctrl-G in Brief mode. There is a custom macro for this in the windows version which has not made its way to Linux.

Cheers,
--
Greg.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #5 on: November 18, 2009, 02:56:46 PM »
Sorry, Greg, but I don't understand what you're asking for here. Can you provide a little more detail? Also, what is the macro that exists for Windows but not Linux?

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #6 on: November 19, 2009, 06:19:57 AM »
Hi!

When you get the "Tags in current file" listing you can currently start typing the function name to focus in on the selection of the function you want. Want I'm asking is that rather than matching upon the exact function name, can the text we type be used to perform a grep of the contents in the list, in a similar manner to the smart open dialog and what we've requested here for the clipboard list.

For the windows version asandler/chrisant et al have provided a custom macro called open_local_symbol (http://community.slickedit.com/index.php?topic=2245.0) which does this. It may actually work under Linux, I haven't tried but have just had the impression that it wouldn't.

I may give it a go tomorrow.

Cheers,
--
Greg.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #7 on: November 19, 2009, 03:37:26 PM »
How do you get the "Tags in current file" listing? I'm not sure what feature this refers to. Can you provide the menu item or command to get this list?

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #8 on: November 19, 2009, 03:40:43 PM »
list-tags

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #9 on: November 19, 2009, 04:30:01 PM »
@lambertia: back to the original request for a better search on the Clipboards list. I'm struggling to see exactly how to do this. I think we'd still want the capability to select by Name. Would that be more useful if there was an option to specify whether new clipboards are inserted as 1 or the next highest number. I guess we'd need an option to control the sort order. That way you could have new clipboards inserted as the next highest number, like 3 if this is the third clipboard, and sort by name descending. That way the most recent clipboards would be on top but you could always rely on the number to refer to the same thing.

If we add filtering by the Text field, it seems like we'd need a filter field to type in and a way to clear the filter. It would be common for multiple entries to match the typed text, so you'd still need a way to select one and insert it. So, when the focus isn't in the search field, the typing would match the clipboard name. You could use the up and down arrows to select a match too.

Whatever we do here would set the pattern for other similar filters, like the Tags in current file. I need to reiterate that we may not be able to do this (these) for the SlickEdit 2010 release. But I need to get a clear understanding of the request before we can consider it.

lambertia

  • Senior Community Member
  • Posts: 382
  • Hero Points: 14
  • I have nothing sufficiently witty to say.
Re: FEATURE REQUEST: Choose clipboard entry by typing.
« Reply #10 on: November 27, 2009, 01:21:11 AM »
Hi Scott.

I'm sorry for the late response. Thanks for taking an interest.

One problem with the names for the clipboard entries is that when the clipboard limit is reached an older entry must be discarded. I assume that you discard the least used entry? Whatever the algorithm once the limit has been reached, each time you perform another cut/copy operation it may be that the names can no longer be trusted as they are reassigned to different entries. So one time you'd use name "3" and then the next time you use "3" you could get a different result!

For me, if the text search mechanism were implemented I would never need to select by name. I have my SE setup to hold 50 clipboard entries and to restore them from disk at startup. After not very long I would lose total track of clipboard numbers (plus the problem above) so I would still need to search the text to determine the name to use.

In my workflow, when I want to paste in some text I know exactly what I want in my head, so as soon as I bring up the dialog, I could type some of the text to narrow down the selection, and then use the arrow keys to select from some subset on entries. Then hit enter and its all done.

In terms of clearing the filter, I would expect the filter to be clear when the dialog comes up and if I make mistakes as I type then backspace would be sufficient - the same as the smart open I think.

In my view, it may be that the "name" concept could be discarded as it does have problems, especially once the clipboard size has been reached and names are reassigned to other entries.

Cheers!
--
Greg.