Bert Wesarg wrote: > do you plan to introduce some tags/tips information macros, like these > for highlight/rangesets? I may also interessted in these.
The problem with a current version of nedit is that macros don't know what tags/tips files are loaded. Still, one could write macros that read_file() tags/tips files and work separatedley from the built-in load_tags/tips_file() nedit provides. My plan isn't to provide a pure macro solution, but to make more of nedit accessible to macros. This is also the main idea behind the mocume patch, btw. For a tag completion, I thought one could quickly get out all possible extensions from a loaded tags file. This is the find_completions() part [named after find_definition() - list_completions() was a typo], and I can confirm it is fast. Then one may have to look up things like scope information from the tags file to further exclude some of the possible completions. These parts are done inside the macro. It needs to know the loaded tags files, though. This is rather simple by introducing $loaded_tags/tips_files array variables containing the names of all currently loaded tags/tips files, with integer keys starting at 0. Along these lines, TK wrote a tag stack patch (like vi's tag stack), and later on changed it to a pure macro solution. To remember the previous positions, he set marks naturally. Such a macro is necessarily hackish, because macros have no information about marks. But since nedit knows about associative arrays, it is again rather simple to introduce a $marks array containing the positions of the currently set marks in the window, where the array keys are the mark labels a-z and 0-9. In addition, I have a mark_unset() action so a macro can release a mark after it isn't used any more - in the case of the tag stack, if the stack is popped. With that one can write a simple and satisfying tag stack macro. Cheers, Jörg -- NEdit Develop mailing list - [email protected] http://www.nedit.org/mailman/listinfo/develop
