(Created page with "<seo title="Collate Tables | vEdit" description="vEdit uses a collate table to control the order in which characters are sorted, these are more flexible than typical sort util...") |
(→Manually Load a Collate Table) |
||
| Line 24: | Line 24: | ||
===Manually Load a Collate Table=== | ===Manually Load a Collate Table=== | ||
| + | |||
| + | #Select <kbd>Edit</kbd> > <kbd>Sort</kbd> > <kbd>Sort Lines</kbd> | ||
| + | #In the sort dialog box, click the <kbd>Load table...</kbd> button. In the file dialog box, select the desired collate table. | ||
| + | #Upon returning to the sort dialog box, you should see the name of the new collate table in the title. | ||
| + | #Click <kbd>Cancel</kbd> to return to normal editing or click <kbd>OK</kbd> to immediately sort using the new collate table. | ||
| + | |||
| + | |||
| + | ===Automatically Load a Collate Table at Startup=== | ||
| + | |||
| + | vEdit can automatically load a collate table at startup. The online help topic “STARTUP.VDM and USTARTUP.VDM Files” describes the startup process in detail. | ||
| + | |||
| + | #Open the file '''ustartup.vdm''' in the ''User Config Directory'' for editing. | ||
| + | #ocate the line: // Sort_Load("COLLDEF.TBL") ... | ||
| + | #Delete the leftmost “//” to enable the command. | ||
| + | #Change the “COLLDEF.TBL” to the desired filename. | ||
| + | #Enable <kbd>CONFIG</kbd> > <kbd>Misc</kbd> > <kbd>Enable USTARTUP.VDM file</kbd>. | ||
| + | #Select <kbd>CONFIG</kbd> > <kbd>Save config</kbd> to ensure this setting is saved into the '''vedit.cfg''' file. | ||
| + | #Save the file and exit vEdit. | ||
| + | #Restart vEdit and select <kbd>EDIT</kbd> > <kbd>Sort</kbd> > <kbd>Sort lines</kbd>. | ||
| + | #You Should see the name of the new collate table in the title, click <kbd>Cancel</kbd>. | ||
| + | |||
| + | ==Creating Your Own Collate Tables== | ||
| + | |||
| + | Custom collate tables can be created from “source” text files. The source to the supplied collate tables is included in the files '''collansi.txt''', '''colloem.txt''' and '''collebc.txt'''. The file closest to your needs should be used as a model. The supplied collate.vdm macro is then used to convert (compile) the source collate table .TXT file into the binary .TBL file. | ||
| + | |||
| + | ===Create a Custom Collate Table=== | ||
| + | |||
| + | #Select the closest “source” collate table COLLxxxx.TXT file and open it in vEdit. | ||
| + | #Select <kbd>FILE</kbd> > <kbd>Save as</kbd> and enter a suitable name for the new source table, e.g. “collnew.txt”. | ||
| + | #Edit the source collate table to create the desired sort order. Refer to the file '''collate.vdm''' for detailed information about the syntax and commands in these source files. | ||
| + | #Select <kbd>FILE</kbd> > <kbd>Save</kbd> to save your changes. | ||
| + | #Select <kbd>MISC</kbd> > <kbd>Load/execute macro</kbd> and select the '''collate.vdm''' macro. | ||
| + | |||
| + | If necessary, correct any mistakes that this macro reports. | ||
| + | |||
| + | When the source collate table is error free, the macro will create a binary. TBL file, e.g. it will create '''collnew.tbl''' | ||
| + | |||
| + | As described above, you can then manually or automatically load the new collate table. | ||
vEdit uses a "collate table” to control the order in which characters are sorted. This is much more flexible than the typical sort utility that simply orders all characters by their hex value.
For example, by modifying the collate table, you could have vEdit:
vEdit is supplied with these collate tables:
If you need to load a different collate table, you can manually load it from within vEdit or have vEdit automatically load it at startup.
vEdit can automatically load a collate table at startup. The online help topic “STARTUP.VDM and USTARTUP.VDM Files” describes the startup process in detail.
Custom collate tables can be created from “source” text files. The source to the supplied collate tables is included in the files collansi.txt, colloem.txt and collebc.txt. The file closest to your needs should be used as a model. The supplied collate.vdm macro is then used to convert (compile) the source collate table .TXT file into the binary .TBL file.
If necessary, correct any mistakes that this macro reports.
When the source collate table is error free, the macro will create a binary. TBL file, e.g. it will create collnew.tbl
As described above, you can then manually or automatically load the new collate table.