Issues

Issue #1 wontfix

Auto indenting not working with user defined language?

Anonymous created an issue

Hi,

I have a user defined language definition for Tcl for Notepad++ (v5.9.4).

When I use IndentByFold (v0.7) together with NotePad++'s builtin Tcl (Language/T/TCL), the auto indentation works beatifully!

But when I select my user defined language definition nothing happens, for example after you write ".. if { test == 1 } { "

Could it be a bug that IndentByFold doesn't work together with user defined laguages?

Best regards Johan

Comments (3)

  1. Ben Bluemel repo owner

    Hi Johan,

    I don't believe Notepad++ supports fold points in user defined languages (the lines in the margins with the +/-'s to collapse and expand).
    IndentByFold heavily relies upon the fold points to know whether to indent or unindent.

    If its the case that there are no fold points, then you have a few options:
    a) use one of the scripting plugins to send scintilla the messages to create the fold points
    b) convert your UDF to a lexer plugin so the fold points can be handled for the language
    c) ask jvdanilo to see whether he can put something in his plugin called Notepad# that might be able to do what you want, as that handles indentation too, but doesn't use the fold points.

    Ben

  2. Anonymous

    Hi Ben,

    and thanks for answering. I did notice now that I miss the +/- signs at "If.." etc.

    If I added

    <Keywords name="Folder+">{</Keywords>

    <Keywords name="Folder-">}</Keywords>

    to my userDefineLang.xml I got the +/- folding, but then the changing of color for matching braces stopped working, so maybe it broke something else.. At least the indent after { seemed to be working though. But the deintent with } didn't work.

    But I'll have a look at your other suggestions too.

    Thanks again! /Johan

  3. Log in to comment