[Github-comments] [geany/geany] Highlight syntax for files without an extension (#1899)

toxpal notifications at xxxxx
Thu Jul 19 12:30:12 UTC 2018


I didn't find such a feature request/enhancement, but if it was already requested (or feature already exists), feel free to close this issue.

It would be nice if Geany can highlight syntax for files without extensions. Let's say I open a new tab and copy/paste some PHP snippet to it. Some other editors will automatically highlight syntax as PHP in this tab if content starts with **<?php** (even if tan wasn't saved as some file with *.php extension extension).

Now, it's needed to save tab as a file with corresponding extension just to enable syntax highlight. Sometimes it's a pain in the a** because I often create a new tab, copy/paste some PHP snippet for temporary purposes, and close this tab in minutes. But if I need syntax highlight (which I need, of course), I have to manually save every tab as PHP file.

I realize some languages might not have starting words, but if it has, maybe Geany can auto-recognize and highlight syntax?

For example, these starting words surely indicate which language should be highlighted:

```
<?php
<html
<?xml
```
...and I'm sure the list will go on

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1899
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180719/19c8e118/attachment.html>


More information about the Github-comments mailing list