T
T
Timur2013-03-22 10:44:40
PHP
Timur, 2013-03-22 10:44:40

Coda 2 does not highlight PHP if after "

If there is no gap after the opening of the short tag, then the PHP code is not highlighted. Haven't seen this problem with other editors. Unfortunately, it is not possible to refactor the entire project. And whoever worked with Bitrix is ​​familiar with the ubiquitous "<?$APPLICATION->..." construct. Has anyone encountered this issue and found a solution?

image

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vitaly Peretyatko, 2013-03-22
@timursun

The Coda developers are quite responsive to questions. Write to them about this flaw and in the next update everything will be ok. Or, if you can’t wait, open Coda2.app, and in it Resources / PHP-HTML.mode
This is also a package in which highlighting rules are set in xml and so on, everything can be corrected and pushed back into Coda2. By the way, if it works out, you can share it with the community.

J
Jonh Doe, 2013-03-22
@CodeByZen

It does not highlight because these are short tags and this is not native, or rather native but not completely true. It is necessary to write "<?php "
akral wrote how to do it quickly. But you need to add php

E
egorinsk, 2013-03-22
@egorinsk

Why not switch to the now fashionable style of writing a long opening tag [?php? I don't think editor vendors will be guided by your unique coding style and you'll run into similar problems.

M
Max, 2013-03-22
@AloneCoder

It seems to me that refactoring the project is the simplest solution, besides, I don’t see any difficulties in this, the script that delivers spaces is written in a dozen lines and will take you 15 minutes of your time.

A
akral, 2013-03-22
@akral

15 minutes time?

find . -type f -print 0 | xargs -0 sed -i '' 's/\<?([^ ])/<? \1/g'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question