Need a text search program like a browser URL bar.
December 4, 2009 12:49 PM   Subscribe

Is there a utility for Windows that will take a text file, and let you enter words into a field and remove entries from the list as you type in more words? Something like typing in the address bar of a browser, where as you type, the entries that no longer match are removed.

I have a text file with entries of performer/song titles, one to a line. I generally just use the search function of a text editor to find all the matching lines for a keyword. However if there was something that would remove entries the more I typed, I wouldn't spend as much time typing out full performer names or song titles.

Winamp does this with the "Jump to file" box in it's playlist. I need something for text files however.
posted by inthe80s to Computers & Internet (15 answers total)
 
If you used Excel instead, placing artist in one column and song title in another, you could use the Datafilter functionality to quickly filter down the list as you need. If you wanted to get flash you could use some VBA to hide rows as you type a name or title.

Other than that, I think you would need a standalone app that allows you to import the text file (but not edit it) into a grid or something and then filter the list dynamically. It's easy to write (I'm not aware of one that already exists) but Excel would be simpler (if you have access to it).
posted by NailsTheCat at 1:24 PM on December 4, 2009


Any decent text editor (e.g. UltraEdit) should have an incremental search feature. It's not quite what you describe but it can be used in the same way. You start typing your keyword and it jumps around in the file live as you type. If you want to move to the next partial match you can usually just hit the incremental search keystroke again.
posted by Rhomboid at 1:56 PM on December 4, 2009


Response by poster: If you used Excel instead, placing artist in one column and song title in another, you could use the Datafilter functionality to quickly filter down the list as you need.

Excel craps out at 65,535 lines unfortunately... which is fine for a small text file, but I have one with 300,000 lines I'd like to use this with.

I can code something myself to do what I want, but I'd really like to make sure I'm not re-inventing the wheel, not to mention the lack of time to spend on even a simple project in my spare time lately.
posted by inthe80s at 1:59 PM on December 4, 2009


Response by poster: Any decent text editor (e.g. UltraEdit) should have an incremental search feature

I do have one that does that already, but when I need a list of all the songs by a group for instance, it's much easier to have a list to scroll through than to keep hitting the next key. Generally the file is sorted, but not always in the manner in which I want to search it, so it is definitely more time consuming that way.
posted by inthe80s at 2:02 PM on December 4, 2009


Response by poster: Before someone suggests it, no I don't want to place this in a database and run queries against it either.
posted by inthe80s at 2:05 PM on December 4, 2009


Info Select is a program that will do this type of searching. You will need to import the one text file into IS to create a number of separate items, one for each line, before you can do this.

Zoot is another, again requiring that the text file be split up into numerous individual items, but it might take a little while to learn to use it.
posted by megatherium at 2:19 PM on December 4, 2009


I was curious as to quickly you could evaluate whizz through 300,000 records in a file evaluate them for matching string and dump them into a grid. Just tried it, it's remarkably fast. Less than a second to read 300,000 records and load 10,000 into a listbox. I did it in VBA FWIW. You're welcome to it, if it would be useful.
posted by NailsTheCat at 2:43 PM on December 4, 2009


Best answer: Textpad, a lightweight text editor does this (and so much more).

It is free (nagware, but fully featured), and very small, so it can't hurt to try.
posted by Pogo_Fuzzybutt at 3:10 PM on December 4, 2009


Response by poster: TextPad's "Incremental Search" is pretty close to what I need, and I have been thinking of a switch away from Multi-Edit 9 (which has been my text editing choice for the past 15 years). I can't seem to find a keyboard shortcut that does the "next find" for the incremental search (only the regular search).

Those other programs, InfoSelect and Zoot, um.. InfoSelect is like $250, which seems rather expensive for what it is to begin with and way more complicated than anything I'm trying to do.
posted by inthe80s at 4:56 PM on December 4, 2009


Best answer: Yeah, InfoSelect and Zoot strike me not only as sort of not right for this case but also as completely pointless for anything else, since there are plenty of free alternatives that should do whatever they purport to with a little tweaking.

And TextPad is okay, but I have a feeling you'll get a lot more mileage out of the fantastic and well-supported Notepad ++, which has a ridiculous number of functions which include both a very, very good standard search/replace utility and what's supposed to be an "advanced" search/replace utility which I'm not as familiar with. I'm still slightly fuzzy on what you're looking for - you say you want something that will "remove entries the more I type," and you seem to want a keyboard shortcut for "next find," so I'm assuming you're just hoping for something where repeatedly hitting a key combination will delete the next appearance, then the next, then the next... is that it? If so, I'm almost certain Notepad ++ does this; I'm not going to log out of Linux at the moment to try it, but my recollection is that the find box is always on top and that the hotkeys are well-defined and static regardless of focus. There are also a lot of other good functions in Notepad ++ that you could probably use to make this easier like line joining and splitting, alphabetical sorting, and column editing.

It occurs to me that if you want to save time typing in long names or titles, you could pretty easily write a regular expression for "line beginning with" and add the first few letters of what you're looking for every time. That'll begin to do what you're looking for, too. In Notepad ++, that would mean opening the replace box, clicking the "extended" option, and searching for \r\nSEARCHTERM, since in their 'extended' mode \r\n means "beginning of line."

Seriously, when I'm editing textfiles in Windows, Notepad ++ is my favorite thing in the world. It's sort of shocking what you can do with it.
posted by koeselitz at 5:47 PM on December 4, 2009


Response by poster: I'll check out Notepad ++ ... I've already tried a couple others tonight once I figured out the keyword here is "incremental find" or "incremental search". I knew there had to be a GUI term that would help me zero in on what I was looking for. Ultraedit for example claims to have it, but you need to hit enter after typing in characters for it to jump to a line. Ok, but a lot slower. Jedit was promising, but kind of buggy.

What I mean by removing lines, is just not displaying them anymore, not a search/replace type of thing.

The best example is in WinAmp... once you select the jump to file function it starts off in a popup window with all the lines listed in a text box, and as you type your search term in, the lines without the keywords are no longer listed. In the end you select your line and it jumps to that place in the playlist.
posted by inthe80s at 6:10 PM on December 4, 2009


Best answer: [Notepad ++ link]

Reading through your other comments, it sounds like what you want is to be able to type in the band's name and see all the different entries that start with that name listed right there. (That actually makes perfect sense; sorry I didn't see that.) Something like Notepad ++'s "seach and highlight" function might work for this, but it also sounds like that would involve way too much scrolling.

I'll bet you could get a lot out of using CSVedit, a free utility which is great for editing comma-separated value files. CSVedit is one of my favorite little utilities because it offers a GUI-database-like frontend editor for CSV files, and it has no row limit. So it's always what I use when I'm manipulating a spreadsheet and I hit the ceiling on Calc or Excel.

You could use CSVedit to do more complex sorts - i.e. sort by the third or fourth field in a line rather than the first - that text editors generally can't do without a lot of hassle. I don't know if that would solve your problem, but I guess it's worth a try.
posted by koeselitz at 6:11 PM on December 4, 2009


Response by poster: Notepad++ is awesome. Just awesome. I wasn't even looking to replace my default editor at this moment, but I have a feeling I might be doing that. If they had hotkeys for the incremental search for next/previous match it would be really good. As it stands though I can certainly use it. The price is right too.

CSVEdit is very neat. I do a lot of work with CSV files (unfortunately) and it even worked with the text file I was talking about, I set the separator to a backslash and it took my file full of files with full paths and split them nicely into columns. It's a VERY slow search on column though, and actually timed out with one big file. The search is kind of clunky overall, but I imagine I can still find use for that.
posted by inthe80s at 6:31 PM on December 4, 2009


FWIW there is a utility that does this for files and folders on your disk: It's called "everything", from www.voidtools.com (check the forums for the latest version).

You type in the name of a file...it dynamically filters the list down for you. Pure gold.
posted by flutable at 3:15 AM on December 5, 2009


If you used Excel instead, placing artist in one column and song title in another, you could use the Datafilter functionality to quickly filter down the list as you need.

Excel craps out at 65,535 lines unfortunately... which is fine for a small text file, but I have one with 300,000 lines I'd like to use this with.


BTW, Excel 2007 has a limit of 1,048,576 rows.
posted by mmascolino at 1:29 PM on December 5, 2009


« Older Is This Really Death Metal... For My Car?   |   Non-cavernous pill organizers Newer »
This thread is closed to new comments.