How to make XML files always open in the text editor rather than the XML editor?

前端 未结 3 374
日久生厌
日久生厌 2021-02-02 05:40

I went to file associations there was no .xml format, when I added it, all editors were added automatically and they are static writing me something like:

相关标签:
3条回答
  • 2021-02-02 06:08

    enter image description here

    Click default on *.xml and Text editor

    Close all files and then try to open an XML file again.

    0 讨论(0)
  • 2021-02-02 06:22

    For people who are looking for a simple text based XML editor, the default XML editor in Eclipse comes with a text based view with syntax highlighting (as it should). It's just not intuitive to know this view exists.

    • After you open the file with "XML Editor" the text view can be toggled by clicking on the "Source" tab on the bar just below the file.

    By default the view is "Design". "Source" is the simple text based view with syntax highlighting.

    For a much better illustration, see:

    How do I view xml in Eclipse with simple syntax highlighting?

    0 讨论(0)
  • 2021-02-02 06:24

    My problem was that I opened the pom.xml with the maven editor - I wanted it to be opened with the maven editor but to open in the "source" view - achieved it by:

    enter image description here

    Typing xml in the search box did not include this page in the results.

    0 讨论(0)
提交回复
热议问题