jEdit Community - Resources for users of the jEdit Text Editor
modifying xml mode breaks auto-complete
Submitted by McSwell on Friday, 2 March, 2007 - 21:54
I copied the xml.xml mode file from the jEdit install directory to my .jedit directory (under docs-and-settings: this is on Windows). Then I slightly modified it by altering
<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
to
<SPAN TYPE="LITERAL1" NO_LINE_BREAK="FALSE">
for the case where Literal1 is begun by (and ended by) a double quote. (I did this to get the coloring to work right in a .xsd file, since quoted materials can easily span multiple lines.) I then altered the 'catalog' file in that same dir to refer to the local xml.xml file, by copying the entry for xml files from the catalog in the install dir.

But that seems to have broken the auto-completion, and auto-indentation as well. In particulary, when I type a tag
<foobar>
it used to be that jEdit would automagically supplying a close tag, giving:
<foobar></foobar>
(with the cursor conveniently placed between the two tags).
But with the modified xml.xml file, jEdit no longer does this.

Do I need to do s.t. else?

Mike Maxwell
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
That should be all to do.
by Robert Schwenn on Sun, 04/03/2007 - 21:39
That should be all to do.

Does the auto-completion work, if there were no differences between the "local" mode file and the original one in jEdit's program directory?

Robert
 
auto-complete (and auto-indent)
by McSwell on Tue, 06/03/2007 - 14:21
No, auto-complete still doesn't work with a copy of the xml.xml file in my Windows local jEdit/mode directory, providing of course the catalog in that same dir points to the local xml.xml file. That is, auto-complete stops working if the local catalog points to the local (unmodified) xml.xml file, but works if the local catalog doesn't point there. Here's the diff between the working catalog and the non-working catalog:
  • > diff catalog catalog.new
  • 7a8,16
  • > <!--Ff. is to override the XML mode defined in jEdit by default;
  • > the FILE_NAME_GLOB and FIRST_LINE_GLOB are stolen from the > catalog.
  • > -->
  • > <MODE NAME="XML"
  • > FILE="xml.xml"
  • > FILE_NAME_GLOB="*.{xml,xhtml,xsd}"
  • > FIRST_LINE_GLOB="<\?xml*"
  • > />
  • (I had to mung a couple things in this wiki to make the xml tags show up, hopefully it's accurate.) BTW, I had said that auto-indent stopped working, but it appears it never was working.
  • Mike Maxwell
  • User login
    Browse archives
    « April 2024  
    MoTuWeThFrSaSu
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
     
    Poll
    Are you interested in language packs for jEdit?
    Yes, and I could help maintain translations
    26%
    Yes, I'd like to have translations
    32%
    Indifferent
    35%
    No, that'd be bad (please comment)
    7%
    Total votes: 1093
    Syndication
    file   ver   dls
    German Localization light   4.4.2.1   82348
    Context Free Art (*.cfdg)   0.31   46055
    JBuilder scheme   .001   18495
    BBEdit scheme   1.0   18116
    ColdFusion scheme   1.0   18024
    R Edit Mode - extensive version   0.1   17473
    Advanced HTML edit mode   1.0   16206
    Matlab Edit Mode   1.0   16068
    jEdit XP icons   1.0   15229
    XP icons for jEdit   1.1   14293