colorer / FarColorer

Syntax highlighting plugin for FAR Manager.
MIT License
69 stars 17 forks source link

proto.hrc edit #76

Closed mark-lobanov closed 8 months ago

mark-lobanov commented 1 year ago

Hello

I changed line <filename>/\.sql$/i</filename> to <filename>/\.\~?sql$/i</filename> After Far restarting the script.~sql file is not colored What did i do wrong ?

Far 3.0.6161.0 x64 Colorer 1.4.16.0

viccpp commented 1 year ago

Try <filename>/\.(\~)?sql$/i</filename>

mark-lobanov commented 1 year ago

@viccpp the same effect, file is not colored ((

ctapmex commented 8 months ago

Where do you change the settings? For example far\plugins\FarColorer\base\auto\empty.hrc

.....
<annotation><documentation>
    'auto' is a place for include
    to colorer your own HRCs
</documentation></annotation>
    <prototype name="sql" group="database" description="SQL, PL/SQL">
        <location link="jar:d:/home/Code/colorer/FarColorer/out/install/x64-debug/far/plugins/FarColorer/base/common.zip!hrc/db/sql.hrc" />
        <filename>/\.\~?sql$/i</filename>
        <parameters>
            <param name="backslash_escapes" value="true" description="Treat \' in character literals as an escaped '" />
        </parameters>
    </prototype>
</hrc>
mark-lobanov commented 8 months ago

@ctapmex I made changes in prototype name="sql" in %Far%\Plugins\FarColorer\base\hrc\proto.hrc

ctapmex commented 8 months ago

ok, I edited the file <filename>/\.sql$/i</filename> to <filename>/\.\~?sql$/i</filename> reload schemes or restart Far. And all greate

mark-lobanov commented 8 months ago

@ctapmex What is the full name (with path) of the file you edited?

ctapmex commented 8 months ago

Far.x64.3.0.6250.3650\Plugins\FarColorer\base\hrc\proto.hrc

mark-lobanov commented 8 months ago

Very strange. I did the same and it doesn't work.

ctapmex commented 8 months ago

Поток мыслей, поэтому проще на родном языке написать. В поставке Far схемы идут в виде 'all packed' - https://github.com/colorer/Colorer-schemes/releases/download/v1.2.0.35/colorer-base.allpacked.1.2.0.35.zip Т.е. все hrc файлы лежат в архиве. Если у вас используется именно такая сборка, то править надо файл в архиве Far.x64.3.0.6250.3650\Plugins\FarColorer\base\common.zip\hrc\proto.hrc , после чего измененный файл сохранить в архиве. Возможно очевидные вещи говорю, но мало ли.

после изменений рестарт Far, или перечитать схемы. Мой пример выше с Far.x64.3.0.6250.3650\Plugins\FarColorer\base\hrc\proto.hrc - это когда из поставляемого в far плагина удаляем папку с схемами и ставим такую https://github.com/colorer/Colorer-schemes/releases/download/v1.2.0.35/colorer-base.packed.1.2.0.35.zip . может быть у вас в настройках указано использовать другой catalog.xml ?

image

mark-lobanov commented 8 months ago

после чего измененный файл сохранить в архиве. Возможно очевидные вещи говорю

it wasn't obvious

Thanks for advice, I placed proto.hrc file into common.zip, restarted the Far and problem was gone