|
Tab column search
[Back]
This macro allows you to do a vertical search
on tab-delimited columns of data, e.g. for a table of numbers, place your
cursor on the column you want to search, run the macro and then type in
your search string, and it will jump down the column to the first occurance.
tab_column_search.nm
If instead your file uses fixed columns (spaces, etc.) instead of tabs,
you can start with the above macro, remove the count the number of
tabs bit, remove the [^\t]* bit from the search which uses
the regex, and change the build the regex part to
for(i = 0; i < $column; ++i) re = re "."
Note that this fixed-column approach will fail horribly if your file contains
tabs; I'm not sure what to do about that. Another difference is that it
will only match strings which begin at the current column (rather than anywhere
in the column as the tab-delimited one will).
[Back]
Released on Wed, 21 Nov 2001
by
C. Denat
|
|