Neil Hodgson wrote:
Since I currently have to work on code in multiple languages stored in files without extensions I've been annoyed by them not being styled by default so am looking at adding some detection of language from the initial #! line that is favoured by Unix users. This would work only when there was no extension, and would use the same override mechanism used by the Language menu. The plan is after the file is opened:if first line starts with "#!": for each word in line: if properties["shbang." + word]: use that property value as the override file extension So with properties: shbang.python=py shbang.ruby=rb
I am glad that you started working on my request: http://sourceforge.net/tracker/?func=detail&aid=1244324&group_id=2439&atid=352439 My $0.02: 1. Initial line checking should be done if no style is found using the filename rather than just when there's no extension. For me, XML and HTML are much more important than #!. 2. It should not be limited to "#!" and full-word matching. I think that any sequence of characters should be matched anywhere in the first line (for example, "/perl" => perl), or a regexp (/^#!\s*\S*perl(\s|$)/ -> perl). Piotr _______________________________________________ Scite-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scite-interest
