Hello,
As the XML language is widly used and many XML files doesn't have a ".xml" extension, it should be cool to have an option in npp that detect that a file is a xml one if it starts with "<?xml version="1.0" encoding=".*" ?>", and if its extension is not already linked to another language (I know that it's possible to link an extension to a language)
This could be also implemented when creating a new document (useful when using ctrl+N and paste a xml document)
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
good idea. I would rather propose to make some custom on-first-line detection rules. For ex. I personally need to maintain some files, which have .php extension, but are in fact in JavaScript files (with some php parsings). So it would be nice to write something like /* JS here */ on the first line and editor would auto-select the language accordingly
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
As the XML language is widly used and many XML files doesn't have a ".xml" extension, it should be cool to have an option in npp that detect that a file is a xml one if it starts with "<?xml version="1.0" encoding=".*" ?>", and if its extension is not already linked to another language (I know that it's possible to link an extension to a language)
This could be also implemented when creating a new document (useful when using ctrl+N and paste a xml document)
Thanks
good idea. I would rather propose to make some custom on-first-line detection rules. For ex. I personally need to maintain some files, which have .php extension, but are in fact in JavaScript files (with some php parsings). So it would be nice to write something like /* JS here */ on the first line and editor would auto-select the language accordingly