SynNotes icon indicating copy to clipboard operation
SynNotes copied to clipboard

Custom formats

Open sorashadow opened this issue 8 years ago • 3 comments

Hello there

First of all, thanks for this great little app. It has saved me a lot of formatting time done in Redmine Issues (yeah, I like code neatly formatted XD)

I would like to know if it is possible to add custom languages to the formatting options without having to rebuild the Scintilla... Redmine issues are formatted as Txstyle, and there is no similar highlighting embedded in the app (bash does recognize comments, but that's all).

I tried editing the langs.model.xml, but had no success in making it work. The code added is as follows (insert beside C and CAML). I adapted the code using this XML file of Notepad++ CustomLang:

        <Language name="textile" ext="txstyle" commentLine="###." commentStart="" commentEnd="">
            <Keywords name="instre1">h5. h4. h3. h2. h1.</Keywords>
            <Keywords name="instre2">*&#x000D;&#x000A;#&#x000D;&#x000A;</Keywords>
            <Keywords name="type1">&lt;pre&gt;&#x000D;&#x000A;&lt;/pre&gt;&#x000D;&#x000A;&lt;pre&#x000D;&#x000A;:http://&#x000D;&#x000A;:https://&#x000D;&#x000A;</Keywords>
        </Language>

Can you help me?

Thanks in advance

sorashadow avatar May 11 '17 23:05 sorashadow

Seems like no. Per your code sample 'textile' lexer is needed, and it is not included https://github.com/sepich/SynNotes/blob/master/SynNotes/Note.cs#L99 Fix seems to be easy, but i'm mac user now - feel free to submit a PR

sepich avatar May 15 '17 19:05 sepich

I'm sorry, but I'm not familiarized with C Sharp... If I understand correctly, I have to include the "textile" reference in the ScintillaNET.dll resource, with needs to be rebuilt, so it may have this lexer. Is that it? Based on this, looks like I will have to edit and rebuild: Your code and ScintillaNET are C#, and Scintilla is Python with C++, correct?

sorashadow avatar May 15 '17 20:05 sorashadow

Stintilla.NET has all included, it's just SynNotes has limited number of lexers in menu. You need to add it to menu, and it should work. No need to rebuild Scintilla.

On May 15, 2017 23:05, "Marcelo Diez" [email protected] wrote:

I'm sorry, but I'm not familiarized with C Sharp... If I understand correctly, I have to include the "textile" reference in the ScintillaNET.dll resource, with needs to be rebuilt, so it may have this lexer. Is that it? Based on this, looks like I will have to edit and rebuild: Your code and ScintillaNET are C#, and Scintilla is Python with C++, correct?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sepich/SynNotes/issues/10#issuecomment-301589010, or mute the thread https://github.com/notifications/unsubscribe-auth/ABuGHDGXgSgFRb_ALxaWzU1v0Mv6dj2Sks5r6K_8gaJpZM4NYrh8 .

sepich avatar May 16 '17 20:05 sepich